Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
An object of this class represents a tool of a Polhemus tracking device. A tool has to be added to a tracking device which will then continuously update the tool coordinates. More...
#include <mitkPolhemusTool.h>
Public Types | |
enum | DistortionLevel { UNDEFINED, NO_DISTORTION, MINOR_DISTORTION, SIGNIFICANT_DISTORTION } |
Public Member Functions | |
mitkClassMacro (PolhemusTool, TrackingTool) | |
virtual void | SetToolPort (int _ToolPort) |
Sets the port of the tool. (e.g. 1 for port "SENS 1" etc.) More... | |
virtual int | GetToolPort () |
Sets the port of the tool. (e.g. 1 for port "SENS 1" etc.) More... | |
void | SetDistortionLevel (const int level) |
Sets the distortion level by mapping the integer value (read from the response frame) to the corresponding enumeration literal. More... | |
DistortionLevel | GetDistortionLevel () const |
Returns the distortion level. More... | |
![]() | |
mitkClassMacroItkParent (TrackingTool, itk::Object) | |
Pointer | Clone () const |
void | PrintSelf (std::ostream &os, itk::Indent indent) const override |
virtual const char * | GetToolName () const |
every tool has a name thatgit can be used to identify it. More... | |
virtual void | SetToolName (const std::string _arg) |
Sets the name of the tool. More... | |
virtual void | SetToolName (const char *_arg) |
Sets the name of the tool. More... | |
Point3D | GetToolTipPosition () const |
returns the tool tip in tool coordinates, which where set by SetToolTip More... | |
Quaternion | GetToolAxisOrientation () const |
returns the transformation of the tool axis with respect to the MITK-IGT main tool axis (0,0,-1) More... | |
virtual void | SetToolTipPosition (Point3D toolTipPosition, Quaternion orientation, ScalarType eps=0.0) |
defines a tool tip for this tool in tool coordinates. GetPosition() and GetOrientation() return the data of the tool tip if it is defined. By default no tooltip is defined. More... | |
virtual bool | IsToolTipSet () const |
returns true if a tool tip is set, false if not More... | |
virtual void | GetPosition (Point3D &position) const |
returns the current position of the tool as an array of three floats (in the tracking device coordinate system) More... | |
virtual void | SetPosition (Point3D position) |
sets the position More... | |
virtual void | GetOrientation (Quaternion &orientation) const |
returns the current orientation of the tool as a quaternion in a mitk::Point4D (in the tracking device coordinate system) More... | |
virtual void | SetOrientation (Quaternion orientation) |
sets the orientation as a quaternion More... | |
virtual bool | Enable () |
enables the tool, so that it will be tracked More... | |
virtual bool | Disable () |
disables the tool, so that it will not be tracked anymore More... | |
virtual bool | IsEnabled () const |
returns whether the tool is enabled or disabled More... | |
virtual void | SetDataValid (bool isDataValid) |
sets if the tracking data (position & orientation) is valid More... | |
virtual bool | IsDataValid () const |
returns true if the current position data is valid (no error during tracking, tracking error below threshold, ...) More... | |
virtual float | GetTrackingError () const |
returns one value that corresponds to the overall tracking error. More... | |
virtual void | SetTrackingError (float error) |
sets the tracking error More... | |
virtual const char * | GetErrorMessage () const |
if the data is not valid, ErrorMessage should contain a string explaining why it is invalid (the Set-method should be implemented in subclasses, it should not be accessible by the user) More... | |
virtual void | SetErrorMessage (const char *_arg) |
sets the error message More... | |
virtual void | SetIGTTimeStamp (double _arg) |
Sets the IGT timestamp of the tracking tool object (time in milliseconds) More... | |
virtual double | GetIGTTimeStamp () const |
Gets the IGT timestamp of the tracking tool object (time in milliseconds). Returns 0 if the timestamp was not set. More... | |
Protected Member Functions | |
Pointer | Clone () const |
PolhemusTool () | |
virtual | ~PolhemusTool () |
![]() | |
TrackingTool () | |
~TrackingTool () override | |
Static Protected Member Functions | |
static Pointer | New () |
Protected Attributes | |
int | m_ToolPort |
DistortionLevel | m_DistortionLevel |
![]() | |
std::string | m_ToolName |
every tool has a name that can be used to identify it. More... | |
std::string | m_ErrorMessage |
if a tool is invalid, this member should contain a human readable explanation of why it is invalid More... | |
double | m_IGTTimeStamp |
contains the time at which the tracking data was recorded More... | |
itk::FastMutexLock::Pointer | m_MyMutex |
mutex to control concurrent access to the tool More... | |
Point3D | m_Position |
holds the position of the tool in global tracking coordinates More... | |
Quaternion | m_Orientation |
holds the orientation of the tool´in global tracking coordinates More... | |
float | m_TrackingError |
holds the tracking error of the tool More... | |
bool | m_Enabled |
if true, tool is enabled and should receive tracking updates from the tracking device More... | |
bool | m_DataValid |
if true, data in m_Position and m_Orientation is valid, e.g. true tracking data More... | |
Point3D | m_ToolTipPosition |
holds the position of the tool tip in the coordinate system of the tracking sensor More... | |
Quaternion | m_ToolAxisOrientation |
holds the rotation of the sensor coordinate system such that the z-axis coincides with the main tool axis e.g. obtained by a tool calibration More... | |
bool | m_ToolTipSet |
Additional Inherited Members | |
![]() | |
static Pointer | New () |
An object of this class represents a tool of a Polhemus tracking device. A tool has to be added to a tracking device which will then continuously update the tool coordinates.
Documentation:
Definition at line 29 of file mitkPolhemusTool.h.
Definition at line 35 of file mitkPolhemusTool.h.
|
protected |
Definition at line 15 of file mitkPolhemusTool.cpp.
|
protectedvirtual |
Definition at line 22 of file mitkPolhemusTool.cpp.
|
protected |
mitk::PolhemusTool::DistortionLevel mitk::PolhemusTool::GetDistortionLevel | ( | ) | const |
Returns the distortion level.
Definition at line 56 of file mitkPolhemusTool.cpp.
References m_DistortionLevel.
|
virtual |
Sets the port of the tool. (e.g. 1 for port "SENS 1" etc.)
Definition at line 31 of file mitkPolhemusTool.cpp.
References m_ToolPort.
Referenced by QmitkPolhemusTrackerWidget::on_m_AdvancedSettings_clicked().
mitk::PolhemusTool::mitkClassMacro | ( | PolhemusTool | , |
TrackingTool | |||
) |
|
staticprotected |
Referenced by mitk::PolhemusTrackingDevice::AddTool().
void mitk::PolhemusTool::SetDistortionLevel | ( | const int | level | ) |
Sets the distortion level by mapping the integer value (read from the response frame) to the corresponding enumeration literal.
According to the Polhemus Liberty documentation:
level | The distortion level represented as 0, 1 or 2. |
Definition at line 36 of file mitkPolhemusTool.cpp.
References m_DistortionLevel.
|
virtual |
Sets the port of the tool. (e.g. 1 for port "SENS 1" etc.)
Definition at line 26 of file mitkPolhemusTool.cpp.
References m_ToolPort.
|
protected |
Definition at line 81 of file mitkPolhemusTool.h.
Referenced by GetDistortionLevel(), and SetDistortionLevel().
|
protected |
Definition at line 79 of file mitkPolhemusTool.h.
Referenced by GetToolPort(), and SetToolPort().