00001 /*========================================================================= 00002 00003 Program: Image Guided Surgery Software Toolkit 00004 Module: $RCSfile: igstkCoordinateSystemTransformToResult.h,v $ 00005 Language: C++ 00006 Date: $Date: 2008-02-13 16:27:26 $ 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 __igstkCoordinateSystemTransformToResult_h 00019 #define __igstkCoordinateSystemTransformToResult_h 00020 00021 #include "igstkCoordinateSystem.h" 00022 00023 namespace igstk 00024 { 00025 00038 class CoordinateSystemTransformToResult 00039 { 00040 public: 00041 00043 CoordinateSystemTransformToResult(); 00044 00046 CoordinateSystemTransformToResult( 00047 const CoordinateSystemTransformToResult& in); 00048 00050 const CoordinateSystemTransformToResult &operator = ( 00051 const CoordinateSystemTransformToResult& in); 00052 00058 void Clear(); 00059 00061 void Initialize(const Transform& transform, 00062 const CoordinateSystem* source, 00063 const CoordinateSystem* destination); 00064 00067 template <class TSource, class TDestination> 00068 void Initialize(const Transform& transform, 00069 const TSource * sourceObject, 00070 const TDestination * destinationObject ) 00071 { 00072 const CoordinateSystem * source = 00073 Friends::CoordinateSystemHelper::GetCoordinateSystem( sourceObject ); 00074 00075 const CoordinateSystem * destination = 00076 Friends::CoordinateSystemHelper::GetCoordinateSystem( destinationObject ); 00077 00078 this->Initialize( transform, source, destination ); 00079 } 00080 00082 const Transform & GetTransform() const; 00083 00085 const CoordinateSystem * GetSource() const; 00086 00088 const CoordinateSystem * GetDestination() const; 00089 00090 private: 00091 00092 Transform m_Transform; 00093 const CoordinateSystem * m_Source; 00094 const CoordinateSystem * m_Destination; 00095 00096 }; 00097 00101 igstkLoadedEventMacro( CoordinateSystemTransformToEvent, 00102 IGSTKEvent, CoordinateSystemTransformToResult ); 00103 00104 } // end namespace igstk 00105 00106 #endif