MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkNavigationData.h
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found 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
21namespace mitk {
22
36 class MITKIGTBASE_EXPORT NavigationData : public itk::DataObject
37 {
38 public:
42 mitkNewMacro2Param(Self, mitk::AffineTransform3D::Pointer, const bool);
43 mitkNewMacro1Param(Self, mitk::AffineTransform3D::Pointer);
44
48 typedef mitk::Point3D PositionType;
52 typedef mitk::Quaternion OrientationType;
56 typedef itk::Matrix<mitk::ScalarType,6,6> CovarianceMatrixType;
60 typedef double TimeStampType;
61
81 virtual bool IsDataValid() const;
85 itkSetMacro(DataValid, bool);
98 itkSetMacro(HasPosition, bool);
102 itkGetConstMacro(HasPosition, bool);
106 itkSetMacro(HasOrientation, bool);
110 itkGetConstMacro(HasOrientation, bool);
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:
205
207
208 /*
209 * Copy constructor internally used.
210 */
212
225 NavigationData(mitk::AffineTransform3D::Pointer affineTransform3D, const bool checkForRotationMatrix = true);
226
227 ~NavigationData() override;
228
237
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
Time stamp in milliseconds.
itkGetConstMacro(HasOrientation, bool)
gets the HasOrientation flag of the NavigationData object
mitkClassMacroItkParent(NavigationData, itk::DataObject)
std::string m_Name
name of the navigation data
itkGetConstMacro(Position, PositionType)
returns position of the NavigationData object
itkSetMacro(HasOrientation, bool)
sets the HasOrientation flag of the NavigationData object
itkSetMacro(DataValid, bool)
sets the dataValid flag of the NavigationData object indicating if the object contains valid data
TimeStampType m_IGTTimeStamp
contains the time at which the tracking data was recorded
bool m_HasOrientation
defines if orientation part of m_CovErrorMatrix is valid
itkGetConstMacro(HasPosition, bool)
gets the HasPosition flag of the NavigationData object
itkSetMacro(CovErrorMatrix, CovarianceMatrixType)
sets the 6x6 Error Covariance Matrix of the NavigationData object
itk::Matrix< mitk::ScalarType, 6, 6 > CovarianceMatrixType
type that holds the error characterization of the position and orientation measurements
OrientationType m_Orientation
holds the orientation part of the tracking data
itkGetConstMacro(CovErrorMatrix, CovarianceMatrixType)
gets the 6x6 Error Covariance Matrix of the NavigationData object
bool m_HasPosition
defines if position part of m_CovErrorMatrix is valid
itkSetStringMacro(Name)
set the name of the NavigationData object
mitkNewMacro2Param(Self, mitk::AffineTransform3D::Pointer, const bool)
mitk::Quaternion OrientationType
Type that holds the orientation part of the tracking data.
itkSetMacro(Position, PositionType)
sets the position of the NavigationData object
itkGetConstMacro(Orientation, OrientationType)
returns the orientation of the NavigationData object
double TimeStampType
type that holds the time at which the data was recorded in milliseconds
PositionType m_Position
holds the position part of the tracking data
itkSetMacro(Orientation, OrientationType)
sets the orientation of the NavigationData object
itkGetConstMacro(IGTTimeStamp, TimeStampType)
gets the IGT timestamp of the NavigationData object in milliseconds Please note, that there is also t...
itkSetMacro(HasPosition, bool)
sets the HasPosition flag of the NavigationData object
CovarianceMatrixType m_CovErrorMatrix
A 6x6 covariance matrix parameterizing the Gaussian error distribution of the measured position and o...
itkGetStringMacro(Name)
returns the name of the NavigationData object
itkSetMacro(IGTTimeStamp, TimeStampType)
sets the IGT timestamp of the NavigationData object in milliseconds
mitk::Point3D PositionType
Type that holds the position part of the tracking data.
bool m_DataValid
defines if the object contains valid values
mitkNewMacro1Param(Self, mitk::AffineTransform3D::Pointer)
IGT Exceptions.
MITKIGTBASE_EXPORT bool Equal(const mitk::NavigationData &leftHandSide, const mitk::NavigationData &rightHandSide, ScalarType eps=mitk::eps, bool verbose=false)
Equal A function comparing two navigation data objects for beeing equal in meta- and imagedata.