IGSTK
igstkCoordinateSystemSetTransformResult.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Image Guided Surgery Software Toolkit
4  Module: $RCSfile: igstkCoordinateSystemSetTransformResult.h,v $
5  Language: C++
6  Date: $Date: 2010-11-16 18:13:07 $
7  Version: $Revision: 1.4 $
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 __igstkCoordinateSystemSetTransformResult_h
19 #define __igstkCoordinateSystemSetTransformResult_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  bool isAttaching);
65 
68  template <class TSource, class TDestination>
69  void Initialize(const Transform& transform,
70  const TSource * sourceObject,
71  const TDestination * destinationObject ,
72  bool isAttaching)
73  {
74  const CoordinateSystem * source =
76 
77  const CoordinateSystem * destination =
79 
80  this->Initialize( transform, source, destination , isAttaching);
81  }
82 
84  const Transform & GetTransform() const;
85 
87  const CoordinateSystem * GetSource() const;
88 
90  const CoordinateSystem * GetDestination() const;
91 
93  bool IsAttach() const;
94 
95 private:
96 
97  Transform m_Transform;
98  const CoordinateSystem * m_Source;
99  const CoordinateSystem * m_Destination;
100  bool m_IsAttach;
101 
102 };
103 
107 igstkLoadedEventMacro( CoordinateSystemSetTransformEvent,
108  IGSTKEvent, CoordinateSystemSetTransformResult );
109 
110 } // end namespace igstk
111 
112 #endif
const CoordinateSystem * GetSource() const
Returns the source coordinate system.
const CoordinateSystemSetTransformResult & operator=(const CoordinateSystemSetTransformResult &in)
Assignment operator.
void Clear()
Clears the pointers that the event is holding.
const Transform & GetTransform() const
Returns the computed transform.
static const CoordinateSystem * GetCoordinateSystem(const T &input)
Templated method to extract the CoordinateSystem from a holder class.
This class encapsulates the details of setting parent and child relationships between coordinate syst...
void Initialize(const Transform &transform, const TSource *sourceObject, const TDestination *destinationObject, bool isAttaching)
Sets the transform, source, and destination coordinate systems from two given objects that respective...
bool IsAttach() const
Returns whether this result is being used for attach or detach.
void Initialize(const Transform &transform, const CoordinateSystem *source, const CoordinateSystem *destination, bool isAttaching)
Sets the transform, source, and destination coordinate systems.
A class representing a 3D Rigid transform.
This class represents the frame of a coordinate reference system.
igstkLoadedEventMacro(Ascension3DGErrorEvent, IGSTKErrorEvent, Ascension3DGEventErrorType)
const CoordinateSystem * GetDestination() const
Returns the destination coordinate system.