Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
mitkNavigationData.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 
14 #ifndef mitkNavigationData_h
15 #define mitkNavigationData_h
16 #include <itkDataObject.h>
17 #include <MitkIGTBaseExports.h>
18 #include <mitkCommon.h>
19 #include <mitkNumericTypes.h>
20 
21 namespace mitk {
22 
36  class MITKIGTBASE_EXPORT NavigationData : public itk::DataObject
37  {
38  public:
39  mitkClassMacroItkParent(NavigationData, itk::DataObject);
40  itkFactorylessNewMacro(Self);
41  itkCloneMacro(Self);
42  mitkNewMacro2Param(Self, mitk::AffineTransform3D::Pointer, const bool);
43  mitkNewMacro1Param(Self, mitk::AffineTransform3D::Pointer);
44 
56  typedef itk::Matrix<mitk::ScalarType,6,6> CovarianceMatrixType;
60  typedef double TimeStampType;
61 
65  itkSetMacro(Position, PositionType);
69  itkGetConstMacro(Position, PositionType);
73  itkSetMacro(Orientation, OrientationType);
77  itkGetConstMacro(Orientation, OrientationType);
81  virtual bool IsDataValid() const;
85  itkSetMacro(DataValid, bool);
89  itkSetMacro(IGTTimeStamp, TimeStampType);
94  itkGetConstMacro(IGTTimeStamp, TimeStampType);
98  itkSetMacro(HasPosition, bool);
102  itkGetConstMacro(HasPosition, bool);
106  itkSetMacro(HasOrientation, bool);
110  itkGetConstMacro(HasOrientation, bool);
114  itkSetMacro(CovErrorMatrix, CovarianceMatrixType);
118  itkGetConstMacro(CovErrorMatrix, CovarianceMatrixType);
122  itkSetStringMacro(Name);
126  itkGetStringMacro(Name);
127 
138  void Graft(const DataObject *data) override;
139 
145  void CopyInformation(const DataObject* data) override;
146 
152  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
153 
158  void SetPositionAccuracy(mitk::ScalarType error);
159 
164  void SetOrientationAccuracy(mitk::ScalarType error);
165 
170  mitk::AffineTransform3D::Pointer GetAffineTransform3D() const;
171 
175  mitk::Matrix3D GetRotationMatrix() const;
176 
183  mitk::Point3D TransformPoint(const mitk::Point3D point) const;
184 
189  mitk::NavigationData::Pointer GetInverse() const;
190 
201  void Compose(const mitk::NavigationData::Pointer n, const bool pre = false);
202 
203  protected:
204  mitkCloneMacro(Self);
205 
206  NavigationData();
207 
208  /*
209  * Copy constructor internally used.
210  */
211  NavigationData(const mitk::NavigationData& toCopy);
212 
225  NavigationData(mitk::AffineTransform3D::Pointer affineTransform3D, const bool checkForRotationMatrix = true);
226 
227  ~NavigationData() override;
228 
237 
246 
265  std::string m_Name;
266 
267  private:
268 
269  void ResetCovarianceValidity();
270 
271  // pre = false
272  static mitk::NavigationData::Pointer getComposition(const mitk::NavigationData::Pointer nd1, const mitk::NavigationData::Pointer nd2);
273 
274  };
275 
292  MITKIGTBASE_EXPORT bool Equal( const mitk::NavigationData& leftHandSide, const mitk::NavigationData& rightHandSide, ScalarType eps = mitk::eps, bool verbose = false );
293 
294 } // namespace mitk
295 #endif
mitk::eps
const MITKCORE_EXPORT ScalarType eps
mitk::IGTTimeStamp
Time stamp in milliseconds.
Definition: mitkIGTTimeStamp.h:48
mitkNewMacro2Param
#define mitkNewMacro2Param(classname, typea, typeb)
Definition: mitkCommon.h:81
mitk::NavigationData::m_HasPosition
bool m_HasPosition
defines if position part of m_CovErrorMatrix is valid
Definition: mitkNavigationData.h:249
mitkNewMacro1Param
#define mitkNewMacro1Param(classname, type)
Definition: mitkCommon.h:68
MITKIGTBASE_EXPORT
#define MITKIGTBASE_EXPORT
Definition: MitkIGTBaseExports.h:15
mitk::NavigationData::m_CovErrorMatrix
CovarianceMatrixType m_CovErrorMatrix
A 6x6 covariance matrix parameterizing the Gaussian error distribution of the measured position and o...
Definition: mitkNavigationData.h:245
mitk::NavigationData::m_Orientation
OrientationType m_Orientation
holds the orientation part of the tracking data
Definition: mitkNavigationData.h:236
mitk::Equal
MITKNEWMODULE_EXPORT bool Equal(mitk::ExampleDataStructure *leftHandSide, mitk::ExampleDataStructure *rightHandSide, mitk::ScalarType eps, bool verbose)
Returns true if the example data structures are considered equal.
mitk::NavigationData::OrientationType
mitk::Quaternion OrientationType
Type that holds the orientation part of the tracking data.
Definition: mitkNavigationData.h:52
mitk::NavigationData
Navigation Data.
Definition: mitkNavigationData.h:36
mitk::NavigationData::m_DataValid
bool m_DataValid
defines if the object contains valid values
Definition: mitkNavigationData.h:257
mitkClassMacroItkParent
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:45
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
MitkIGTBaseExports.h
mitk::NavigationData::m_Name
std::string m_Name
name of the navigation data
Definition: mitkNavigationData.h:265
mitk::Point< ScalarType, 3 >
mitk::Matrix
Definition: mitkMatrix.h:25
mitkNumericTypes.h
mitkCommon.h
mitk::NavigationData::PositionType
mitk::Point3D PositionType
Type that holds the position part of the tracking data.
Definition: mitkNavigationData.h:48
mitk::NavigationData::m_Position
PositionType m_Position
holds the position part of the tracking data
Definition: mitkNavigationData.h:232
mitkCloneMacro
#define mitkCloneMacro(classname)
Definition: mitkCommon.h:154
mitk::NavigationData::TimeStampType
double TimeStampType
type that holds the time at which the data was recorded in milliseconds
Definition: mitkNavigationData.h:60
mitk::NavigationData::m_IGTTimeStamp
TimeStampType m_IGTTimeStamp
contains the time at which the tracking data was recorded
Definition: mitkNavigationData.h:261
mitk::NavigationData::m_HasOrientation
bool m_HasOrientation
defines if orientation part of m_CovErrorMatrix is valid
Definition: mitkNavigationData.h:253
mitk::Quaternion
vnl_quaternion< ScalarType > Quaternion
Definition: mitkQuaternion.h:21
mitk::NavigationData::CovarianceMatrixType
itk::Matrix< mitk::ScalarType, 6, 6 > CovarianceMatrixType
type that holds the error characterization of the position and orientation measurements
Definition: mitkNavigationData.h:56
mitk::ScalarType
double ScalarType
Definition: mitkNumericConstants.h:20