Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 
18 #ifndef MITKNAVIGATIONDATA_H_HEADER_INCLUDED_
19 #define MITKNAVIGATIONDATA_H_HEADER_INCLUDED_
20 #include <itkDataObject.h>
21 #include <MitkIGTBaseExports.h>
22 #include <mitkCommon.h>
23 #include <mitkNumericTypes.h>
24 
25 namespace mitk {
26 
40  class MITKIGTBASE_EXPORT NavigationData : public itk::DataObject
41  {
42  public:
43  mitkClassMacroItkParent(NavigationData, itk::DataObject);
44  itkFactorylessNewMacro(Self);
45  itkCloneMacro(Self);
48 
60  typedef itk::Matrix<mitk::ScalarType,6,6> CovarianceMatrixType;
64  typedef double TimeStampType;
65 
69  itkSetMacro(Position, PositionType);
73  itkGetConstMacro(Position, PositionType);
77  itkSetMacro(Orientation, OrientationType);
81  itkGetConstMacro(Orientation, OrientationType);
85  virtual bool IsDataValid() const;
89  itkSetMacro(DataValid, bool);
93  itkSetMacro(IGTTimeStamp, TimeStampType);
97  itkGetConstMacro(IGTTimeStamp, TimeStampType);
101  itkSetMacro(HasPosition, bool);
105  itkGetConstMacro(HasPosition, bool);
109  itkSetMacro(HasOrientation, bool);
113  itkGetConstMacro(HasOrientation, bool);
117  itkSetMacro(CovErrorMatrix, CovarianceMatrixType);
121  itkGetConstMacro(CovErrorMatrix, CovarianceMatrixType);
125  itkSetStringMacro(Name);
129  itkGetStringMacro(Name);
130 
141  virtual void Graft(const DataObject *data) override;
142 
148  virtual void CopyInformation(const DataObject* data) override;
149 
155  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
156 
161  void SetPositionAccuracy(mitk::ScalarType error);
162 
167  void SetOrientationAccuracy(mitk::ScalarType error);
168 
173  mitk::AffineTransform3D::Pointer GetAffineTransform3D() const;
174 
178  mitk::Matrix3D GetRotationMatrix() const;
179 
186  mitk::Point3D TransformPoint(const mitk::Point3D point) const;
187 
192  mitk::NavigationData::Pointer GetInverse() const;
193 
204  void Compose(const mitk::NavigationData::Pointer n, const bool pre = false);
205 
206  protected:
207  mitkCloneMacro(Self);
208 
209  NavigationData();
210 
211  /*
212  * Copy constructor internally used.
213  */
214  NavigationData(const mitk::NavigationData& toCopy);
215 
227  NavigationData(mitk::AffineTransform3D::Pointer affineTransform3D, const bool checkForRotationMatrix = true);
228 
229  virtual ~NavigationData();
230 
234  PositionType m_Position;
238  OrientationType m_Orientation;
239 
247  CovarianceMatrixType m_CovErrorMatrix;
248 
263  TimeStampType m_IGTTimeStamp;
267  std::string m_Name;
268 
269  private:
270 
271  void ResetCovarianceValidity();
272 
273  // pre = false
275 
276  };
277 
294  MITKIGTBASE_EXPORT bool Equal( const mitk::NavigationData& leftHandSide, const mitk::NavigationData& rightHandSide, ScalarType eps = mitk::eps, bool verbose = false );
295 
296 } // namespace mitk
297 #endif /* MITKNAVIGATIONDATA_H_HEADER_INCLUDED_ */
itk::SmartPointer< Self > Pointer
#define mitkNewMacro1Param(classname, type)
Definition: mitkCommon.h:76
itk::Matrix< mitk::ScalarType, 6, 6 > CovarianceMatrixType
type that holds the error characterization of the position and orientation measurements ...
bool m_HasPosition
defines if position part of m_CovErrorMatrix is valid
bool m_HasOrientation
defines if orientation part of m_CovErrorMatrix is valid
double ScalarType
Navigation Data.
OrientationType m_Orientation
holds the orientation part of the tracking data
DataCollection - Class to facilitate loading/accessing structured data.
CovarianceMatrixType m_CovErrorMatrix
A 6x6 covariance matrix parameterizing the Gaussian error distribution of the measured position and o...
mitk::Quaternion OrientationType
Type that holds the orientation part of the tracking data.
Time stamp in milliseconds.
#define mitkNewMacro2Param(classname, typea, typeb)
Definition: mitkCommon.h:89
double TimeStampType
type that holds the time at which the data was recorded
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:53
std::string m_Name
name of the navigation data
vnl_quaternion< ScalarType > Quaternion
#define mitkCloneMacro(classname)
Definition: mitkCommon.h:162
TimeStampType m_IGTTimeStamp
contains the time at which the tracking data was recorded
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.
#define MITKIGTBASE_EXPORT
PositionType m_Position
holds the position part of the tracking data
MITKCORE_EXPORT const ScalarType eps
bool m_DataValid
defines if the object contains valid values
mitk::Point3D PositionType
Type that holds the position part of the tracking data.