Medical Imaging Interaction Toolkit  2018.4.99-08619e4f
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 NAVIGATIONTOOL_H_INCLUDED
14 #define NAVIGATIONTOOL_H_INCLUDED
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 //NAVIGATIONTOOL
mitk::Quaternion m_ToolAxisOrientation
Holds the transformation of the main tool axis to the negative z-axis (0,0,-1)
std::string m_SerialNumber
A unique serial number of the tool which is needed to identify the tool correctly. This is very important in case of the NDI Aurora System.
mitk::DataNode::Pointer m_DataNode
This DataNode holds a toolname and a tool surface.
mitk::Point3D m_ToolTipPosition
Holds the position of the tool tip.
DataCollection - Class to facilitate loading/accessing structured data.
An object of this class represents a navigation tool in the view of the software. A few informations ...
mitk::TrackingDeviceType m_TrackingDeviceType
This member holds the tracking device type of the tool.
NavigationToolType m_Type
#define MITKIGT_EXPORT
itk::SpatialObject< 3 >::Pointer m_SpatialObject
This member variable holds a mathamatical description of the tool.
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:49
vnl_quaternion< ScalarType > Quaternion
std::string m_CalibrationFile
The path to the calibration file of the tool.
std::string TrackingDeviceType
mitk::PointSet::Pointer m_ToolControlPoints
Holds control points in the tool coordinate system, e.g. 2 landmarks for a 5DoF tool and 3 landmarks ...
mitk::PointSet::Pointer m_ToolLandmarks
Holds landmarks for tool registration.
Class for nodes of the DataTree.
Definition: mitkDataNode.h:57