IGSTK
|
00001 /*========================================================================= 00002 00003 Program: Image Guided Surgery Software Toolkit 00004 Module: $RCSfile: igstkCoordinateSystemSetTransformResult.h,v $ 00005 Language: C++ 00006 Date: $Date: 2009-06-15 19:41:18 $ 00007 Version: $Revision: 1.3 $ 00008 00009 Copyright (c) ISC Insight Software Consortium. All rights reserved. 00010 See IGSTKCopyright.txt or http://www.igstk.org/copyright.htm for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 #ifndef __igstkCoordinateSystemSetTransformResult_h 00019 #define __igstkCoordinateSystemSetTransformResult_h 00020 00021 #include "igstkCoordinateSystem.h" 00022 00023 namespace igstk 00024 { 00025 00038 class CoordinateSystemSetTransformResult 00039 { 00040 public: 00041 00043 CoordinateSystemSetTransformResult(); 00044 00046 CoordinateSystemSetTransformResult( 00047 const CoordinateSystemSetTransformResult& in); 00048 00050 const CoordinateSystemSetTransformResult &operator = ( 00051 const CoordinateSystemSetTransformResult& in); 00052 00058 void Clear(); 00059 00061 void Initialize(const Transform& transform, 00062 const CoordinateSystem* source, 00063 const CoordinateSystem* destination, 00064 bool isAttaching); 00065 00068 template <class TSource, class TDestination> 00069 void Initialize(const Transform& transform, 00070 const TSource * sourceObject, 00071 const TDestination * destinationObject , 00072 bool isAttaching) 00073 { 00074 const CoordinateSystem * source = 00075 Friends::CoordinateSystemHelper::GetCoordinateSystem( sourceObject ); 00076 00077 const CoordinateSystem * destination = 00078 Friends::CoordinateSystemHelper::GetCoordinateSystem( destinationObject ); 00079 00080 this->Initialize( transform, source, destination , isAttaching); 00081 } 00082 00084 const Transform & GetTransform() const; 00085 00087 const CoordinateSystem * GetSource() const; 00088 00090 const CoordinateSystem * GetDestination() const; 00091 00093 const bool IsAttach() const; 00094 00095 private: 00096 00097 Transform m_Transform; 00098 const CoordinateSystem * m_Source; 00099 const CoordinateSystem * m_Destination; 00100 bool m_IsAttach; 00101 00102 }; 00103 00107 igstkLoadedEventMacro( CoordinateSystemSetTransformEvent, 00108 IGSTKEvent, CoordinateSystemSetTransformResult ); 00109 00110 } // end namespace igstk 00111 00112 #endif