Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
mitkNavigationTool.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 #ifndef mitkNavigationTool_h
14 #define mitkNavigationTool_h
15 
16 //itk headers
17 #include <itkObjectFactory.h>
18 #include <itkSpatialObject.h>
19 #include <itkDataObject.h>
20 
21 //mitk headers
22 #include <mitkCommon.h>
23 #include <mitkDataNode.h>
24 #include <mitkPointSet.h>
25 #include <mitkTrackingTypes.h>
26 #include <mitkSurface.h>
27 #include <MitkIGTExports.h>
28 
29 namespace mitk {
39  class MITKIGT_EXPORT NavigationTool : public itk::DataObject
40  {
41  public:
42 
43  mitkClassMacroItkParent(NavigationTool,itk::DataObject);
44  itkFactorylessNewMacro(Self);
45  itkCloneMacro(Self);
46 
47  enum NavigationToolType {Instrument, Fiducial, Skinmarker, Unknown};
48 
49  //## getter and setter ##
50  //NavigationToolType:
51  itkGetConstMacro(Type,NavigationToolType);
52  itkSetMacro(Type,NavigationToolType);
53 
54  //Identifier:
55  itkGetConstMacro(Identifier,std::string);
56  itkSetMacro(Identifier,std::string);
57 
58  //Datatreenode:
59  itkGetConstMacro(DataNode,mitk::DataNode::Pointer);
60  itkSetMacro(DataNode,mitk::DataNode::Pointer);
61 
62  //SpatialObject:
63  itkGetConstMacro(SpatialObject,itk::SpatialObject<3>::Pointer);
64  itkSetMacro(SpatialObject,itk::SpatialObject<3>::Pointer);
65 
66  //CalibrationFile:
67  itkGetConstMacro(CalibrationFile,std::string);
68  void SetCalibrationFile(const std::string filename);
69 
70  //Tool tip definition:
71  itkGetConstMacro(ToolTipPosition,mitk::Point3D);
72  itkSetMacro(ToolTipPosition,mitk::Point3D);
73  itkGetConstMacro(ToolAxisOrientation,mitk::Quaternion);
74  itkSetMacro(ToolAxisOrientation,mitk::Quaternion);
75 
76  //Tool Axis definition:
78  mitk::Point3D GetToolAxis();
82  void SetToolAxis(mitk::Point3D toolAxis);
83 
85  mitk::AffineTransform3D::Pointer GetToolTipTransform();
86 
88  bool IsToolTipSet();
89 
90  //Tool Landmarks:
109  itkGetConstMacro(ToolLandmarks,mitk::PointSet::Pointer);
113  itkSetMacro(ToolLandmarks,mitk::PointSet::Pointer);
117  itkGetConstMacro(ToolControlPoints,mitk::PointSet::Pointer);
121  itkSetMacro(ToolControlPoints,mitk::PointSet::Pointer);
122 
123  //SerialNumber:
124  itkGetConstMacro(SerialNumber,std::string);
125  itkSetMacro(SerialNumber,std::string);
126  //TrackingDeviceType:
129  //ToolName (only getter):
138  std::string GetToolName();
139  //ToolSurface (only getter):
147  mitk::Surface::Pointer GetToolSurface();
158  void Graft(const DataObject *data) override;
159 
160 
164  std::string GetStringWithAllToolInformation() const;
165 
166 
167  void SetDefaultSurface();
168 
169  //#######################
170 
171  protected:
172 
173  NavigationTool();
174  NavigationTool(const NavigationTool &other);
175  ~NavigationTool() override;
176  itk::LightObject::Pointer InternalClone() const override;
177 
178  //## data structure of a navigation tool object ##
179  std::string m_Identifier;
184  itk::SpatialObject<3>::Pointer m_SpatialObject;
186  std::string m_CalibrationFile;
189  std::string m_SerialNumber;
202 
203  };
204 } // namespace mitk
205 #endif
mitk::NavigationTool::m_CalibrationFile
std::string m_CalibrationFile
The path to the calibration file of the tool.
Definition: mitkNavigationTool.h:186
mitk::NavigationTool
An object of this class represents a navigation tool in the view of the software. A few informations ...
Definition: mitkNavigationTool.h:39
mitk::NavigationTool::NavigationToolType
NavigationToolType
Definition: mitkNavigationTool.h:47
mitk::NavigationTool::m_ToolControlPoints
mitk::PointSet::Pointer m_ToolControlPoints
Holds control points in the tool coordinate system, e.g. 2 landmarks for a 5DoF tool and 3 landmarks ...
Definition: mitkNavigationTool.h:197
itk::SmartPointer< Self >
mitkClassMacroItkParent
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:45
mitkPointSet.h
mitk
DataCollection - Class to facilitate loading/accessing structured data.
Definition: RenderingTests.dox:1
mitkSurface.h
mitk::NavigationTool::m_SerialNumber
std::string m_SerialNumber
A unique serial number of the tool which is needed to identify the tool correctly....
Definition: mitkNavigationTool.h:189
mitk::NavigationTool::m_ToolAxisOrientation
mitk::Quaternion m_ToolAxisOrientation
Holds the transformation of the main tool axis to the negative z-axis (0,0,-1)
Definition: mitkNavigationTool.h:201
mitk::Point< ScalarType, 3 >
mitk::NavigationTool::m_ToolLandmarks
mitk::PointSet::Pointer m_ToolLandmarks
Holds landmarks for tool registration.
Definition: mitkNavigationTool.h:193
mitk::NavigationTool::m_ToolTipPosition
mitk::Point3D m_ToolTipPosition
Holds the position of the tool tip.
Definition: mitkNavigationTool.h:199
mitkCommon.h
mitk::NavigationTool::m_DataNode
mitk::DataNode::Pointer m_DataNode
This DataNode holds a toolname and a tool surface.
Definition: mitkNavigationTool.h:182
mitkDataNode.h
mitk::NavigationTool::m_Identifier
std::string m_Identifier
Definition: mitkNavigationTool.h:179
mitk::NavigationTool::m_TrackingDeviceType
mitk::TrackingDeviceType m_TrackingDeviceType
This member holds the tracking device type of the tool.
Definition: mitkNavigationTool.h:191
mitk::Quaternion
vnl_quaternion< ScalarType > Quaternion
Definition: mitkQuaternion.h:21
mitk::NavigationTool::m_SpatialObject
itk::SpatialObject< 3 >::Pointer m_SpatialObject
This member variable holds a mathamatical description of the tool.
Definition: mitkNavigationTool.h:184
mitk::TrackingDeviceType
std::string TrackingDeviceType
Definition: mitkTrackingTypes.h:22
mitk::DataNode
Class for nodes of the DataTree.
Definition: mitkDataNode.h:63
mitkTrackingTypes.h
mitk::NavigationTool::m_Type
NavigationToolType m_Type
Definition: mitkNavigationTool.h:180