MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkTrackingTool.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 mitkTrackingTool_h
15#define mitkTrackingTool_h
16
17#include <itkObject.h>
18#include <MitkIGTExports.h>
19#include <mitkCommon.h>
20#include <mitkNumericTypes.h>
21#include <mutex>
22
23namespace mitk
24{
42 class MITKIGT_EXPORT TrackingTool : public itk::Object
43 {
44 public:
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
80 itkGetConstMacro(IGTTimeStamp, double)
81
82 protected:
84 ~TrackingTool() override;
85
86 std::string m_ToolName;
87 std::string m_ErrorMessage;
89 mutable std::mutex m_MyMutex;
90
91 Point3D m_Position;
92 Quaternion m_Orientation;
94 bool m_Enabled;
99 };
100} // namespace mitk
101#endif
Time stamp in milliseconds.
Interface for all Tracking Tools.
itkSetMacro(IGTTimeStamp, double) itkGetConstMacro(IGTTimeStamp
std::string m_ToolName
every tool has a name that can be used to identify it.
std::string m_ErrorMessage
if a tool is invalid, this member should contain a human readable explanation of why it is invalid
mitkClassMacroItkParent(TrackingTool, itk::Object)
std::mutex m_MyMutex
mutex to control concurrent access to the tool
bool m_DataValid
if true, data in m_Position and m_Orientation is valid, e.g. true tracking data
Point3D m_Position
holds the position of the tool in global tracking coordinates
double m_IGTTimeStamp
contains the time at which the tracking data was recorded
Point3D m_ToolTipPosition
holds the position of the tool tip in the coordinate system of the tracking sensor
float m_TrackingError
holds the tracking error of the tool
Quaternion m_Orientation
holds the orientation of the tool´in global tracking coordinates
bool m_Enabled
if true, tool is enabled and should receive tracking updates from the tracking device
itkFactorylessNewMacro(Self)
Quaternion m_ToolAxisOrientation
holds the rotation of the sensor coordinate system such that the z-axis coincides with the main tool ...
IGT Exceptions.