Medical Imaging Interaction Toolkit  2022.10.99-efe2ad43
Medical Imaging Interaction Toolkit
mitkTrackingTool.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 MITKTRACKINGTOOL_H_HEADER_INCLUDED_
15 #define MITKTRACKINGTOOL_H_HEADER_INCLUDED_
16 
17 #include <itkObject.h>
18 #include <MitkIGTExports.h>
19 #include <mitkCommon.h>
20 #include <mitkNumericTypes.h>
21 #include <mutex>
22 
23 namespace mitk
24 {
42  class MITKIGT_EXPORT TrackingTool : public itk::Object
43  {
44  public:
46  itkFactorylessNewMacro(Self);
47  itkCloneMacro(Self);
48 
49  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
50 
51  virtual const char* GetToolName() const;
52  virtual void SetToolName(const std::string _arg);
53  virtual void SetToolName(const char* _arg);
54 
55  Point3D GetToolTipPosition() const;
56  Quaternion GetToolAxisOrientation() const;
57  virtual void SetToolTipPosition(Point3D toolTipPosition, Quaternion orientation, ScalarType eps=0.0);
58  virtual bool IsToolTipSet() const;
59 
60  virtual void GetPosition(Point3D& position) const;
61  virtual void SetPosition(Point3D position);
62 
63  virtual void GetOrientation(Quaternion& orientation) const;
64  virtual void SetOrientation(Quaternion orientation);
65 
66  virtual bool Enable();
67  virtual bool Disable();
68  virtual bool IsEnabled() const;
69 
70  virtual void SetDataValid(bool isDataValid);
71  virtual bool IsDataValid() const;
72 
73  virtual float GetTrackingError() const;
74  virtual void SetTrackingError(float error);
75 
76  virtual const char* GetErrorMessage() const;
77  virtual void SetErrorMessage(const char* _arg);
78 
79  itkSetMacro(IGTTimeStamp, double)
80  itkGetConstMacro(IGTTimeStamp, double)
81 
82  protected:
83  TrackingTool();
84  ~TrackingTool() override;
85 
86  std::string m_ToolName;
87  std::string m_ErrorMessage;
88  double m_IGTTimeStamp;
89  mutable std::mutex m_MyMutex;
90 
94  bool m_Enabled;
95  bool m_DataValid;
99  };
100 } // namespace mitk
101 #endif /* MITKTRACKINGTOOL_H_HEADER_INCLUDED_ */
MITKIGT_EXPORT
#define MITKIGT_EXPORT
Definition: MitkIGTExports.h:15
mitk::eps
const MITKCORE_EXPORT ScalarType eps
mitk::IGTTimeStamp
Time stamp in milliseconds.
Definition: mitkIGTTimeStamp.h:48
mitk::TrackingTool::m_Enabled
bool m_Enabled
if true, tool is enabled and should receive tracking updates from the tracking device
Definition: mitkTrackingTool.h:94
mitk::TrackingTool::m_ToolTipSet
bool m_ToolTipSet
Definition: mitkTrackingTool.h:98
mitk::TrackingTool::m_IGTTimeStamp
double m_IGTTimeStamp
contains the time at which the tracking data was recorded
Definition: mitkTrackingTool.h:88
mitkClassMacroItkParent
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:45
mitk
DataCollection - Class to facilitate loading/accessing structured data.
Definition: RenderingTests.dox:1
mitk::TrackingTool::m_ToolName
std::string m_ToolName
every tool has a name that can be used to identify it.
Definition: mitkTrackingTool.h:86
mitk::Point< ScalarType, 3 >
mitkNumericTypes.h
mitkCommon.h
mitk::TrackingTool::m_Orientation
Quaternion m_Orientation
holds the orientation of the tool´in global tracking coordinates
Definition: mitkTrackingTool.h:92
mitk::TrackingTool::m_DataValid
bool m_DataValid
if true, data in m_Position and m_Orientation is valid, e.g. true tracking data
Definition: mitkTrackingTool.h:95
mitk::TrackingTool::m_TrackingError
float m_TrackingError
holds the tracking error of the tool
Definition: mitkTrackingTool.h:93
mitk::TrackingTool::m_ToolTipPosition
Point3D m_ToolTipPosition
holds the position of the tool tip in the coordinate system of the tracking sensor
Definition: mitkTrackingTool.h:96
mitk::TrackingTool
Interface for all Tracking Tools.
Definition: mitkTrackingTool.h:42
mitk::TrackingTool::m_ErrorMessage
std::string m_ErrorMessage
if a tool is invalid, this member should contain a human readable explanation of why it is invalid
Definition: mitkTrackingTool.h:87
mitk::Quaternion
vnl_quaternion< ScalarType > Quaternion
Definition: mitkQuaternion.h:21
mitk::TrackingTool::m_Position
Point3D m_Position
holds the position of the tool in global tracking coordinates
Definition: mitkTrackingTool.h:91
mitk::TrackingTool::m_MyMutex
std::mutex m_MyMutex
mutex to control concurrent access to the tool
Definition: mitkTrackingTool.h:89
MitkIGTExports.h
mitk::TrackingTool::m_ToolAxisOrientation
Quaternion m_ToolAxisOrientation
holds the rotation of the sensor coordinate system such that the z-axis coincides with the main tool ...
Definition: mitkTrackingTool.h:97
mitk::ScalarType
double ScalarType
Definition: mitkNumericConstants.h:20