IGSTK
igstkCoordinateSystemTransformToResult.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Image Guided Surgery Software Toolkit
4  Module: $RCSfile: igstkCoordinateSystemTransformToResult.h,v $
5  Language: C++
6  Date: $Date: 2009-02-02 21:00:06 $
7  Version: $Revision: 1.6 $
8 
9  Copyright (c) ISC Insight Software Consortium. All rights reserved.
10  See IGSTKCopyright.txt or http://www.igstk.org/copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 
18 #ifndef __igstkCoordinateSystemTransformToResult_h
19 #define __igstkCoordinateSystemTransformToResult_h
20 
21 #include "igstkCoordinateSystem.h"
22 
23 namespace igstk
24 {
25 
39 {
40 public:
41 
44 
48 
52 
58  void Clear();
59 
61  void Initialize(const Transform& transform,
62  const CoordinateSystem* source,
63  const CoordinateSystem* destination,
64  const CoordinateSystem* commonAncestor);
65 
68  void Initialize(const Transform& transform,
69  const CoordinateSystem* source,
70  const CoordinateSystem* destination);
71 
74  template <class TSource, class TDestination>
75  void Initialize(const Transform& transform,
76  const TSource * sourceObject,
77  const TDestination * destinationObject )
78  {
79  const CoordinateSystem * source =
81 
82  const CoordinateSystem * destination =
84 
85  this->Initialize( transform, source, destination );
86  }
87 
89  const Transform & GetTransform() const;
90 
92  const CoordinateSystem * GetSource() const;
93 
95  const CoordinateSystem * GetDestination() const;
96 
98  const CoordinateSystem * GetCommonAncestor() const;
99 
100 private:
101 
102  Transform m_Transform;
103  const CoordinateSystem * m_Source;
104  const CoordinateSystem * m_Destination;
105  const CoordinateSystem * m_CommonAncestor;
106 
107 };
108 
112 igstkLoadedEventMacro( CoordinateSystemTransformToEvent,
113  IGSTKEvent, CoordinateSystemTransformToResult );
114 
115 } // end namespace igstk
116 
117 #endif
void Initialize(const Transform &transform, const CoordinateSystem *source, const CoordinateSystem *destination, const CoordinateSystem *commonAncestor)
Sets the transform, source, and destination coordinate systems.
static const CoordinateSystem * GetCoordinateSystem(const T &input)
Templated method to extract the CoordinateSystem from a holder class.
const Transform & GetTransform() const
Returns the computed transform.
const CoordinateSystem * GetDestination() const
Returns the destination coordinate system.
const CoordinateSystem * GetCommonAncestor() const
Returns the common ancestor coordinate system for Scene Graph.
const CoordinateSystem * GetSource() const
Returns the source coordinate system.
void Initialize(const Transform &transform, const TSource *sourceObject, const TDestination *destinationObject)
Sets the transform, source, and destination coordinate systems from two given objects that respective...
const CoordinateSystemTransformToResult & operator=(const CoordinateSystemTransformToResult &in)
Assignment operator.
void Clear()
Clears the pointers that the event is holding.
A class representing a 3D Rigid transform.
This class represents the frame of a coordinate reference system.
This class encapsulates the results of asking the coordinate reference system for a transform to anot...
igstkLoadedEventMacro(Ascension3DGErrorEvent, IGSTKErrorEvent, Ascension3DGEventErrorType)