Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::InternalTrackingTool Class Reference

implements TrackingTool interface More...

#include <mitkInternalTrackingTool.h>

Inheritance diagram for mitk::InternalTrackingTool:
Collaboration diagram for mitk::InternalTrackingTool:

Public Member Functions

 mitkClassMacro (InternalTrackingTool, TrackingTool)
 
virtual void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
virtual void GetPosition (Point3D &position) const override
 returns the current position of the tool as an array of three floats (in the tracking device coordinate system) More...
 
virtual void GetOrientation (Quaternion &orientation) const override
 returns the current orientation of the tool as a quaternion (in the tracking device coordinate system) More...
 
virtual bool Enable () override
 enablea the tool, so that it will be tracked. Returns true if enabling was successfull More...
 
virtual bool Disable () override
 disables the tool, so that it will not be tracked anymore. Returns true if disabling was successfull More...
 
virtual bool IsEnabled () const override
 returns whether the tool is enabled or disabled More...
 
virtual bool IsDataValid () const override
 returns true if the current position data is valid (no error during tracking, tracking error below threshold, ...) More...
 
virtual float GetTrackingError () const override
 return one value that corresponds to the overall tracking error. The dimension of this value is specific to each tracking device More...
 
virtual bool IsTooltipSet () const
 returns true if a tooltip is set, false if not 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...
 
virtual void SetPosition (Point3D position)
 sets the position More...
 
virtual void SetOrientation (Quaternion orientation)
 sets the orientation as a quaternion More...
 
virtual void SetTrackingError (float error)
 sets the tracking error More...
 
virtual void SetDataValid (bool _arg)
 sets if the tracking data (position & Orientation) is valid More...
 
virtual void SetErrorMessage (const char *_arg)
 sets the error message More...
 
virtual void SetToolTip (Point3D toolTipPosition, Quaternion orientation=Quaternion(0, 0, 0, 1), ScalarType eps=0.0) override
 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...
 
- Public Member Functions inherited from mitk::TrackingTool
 mitkClassMacroItkParent (TrackingTool, itk::Object)
 
virtual const char * GetToolName () const
 every tool has a name that can be used to identify it. 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 SetIGTTimeStamp (double _arg)
 
virtual double GetIGTTimeStamp () const
 Sets the IGT timestamp of the tracking tool object (time in milliseconds) More...
 

Protected Member Functions

Pointer Clone () const
 
 InternalTrackingTool ()
 
virtual ~InternalTrackingTool ()
 
- Protected Member Functions inherited from mitk::TrackingTool
 TrackingTool ()
 Gets the IGT timestamp of the tracking tool object (time in milliseconds). Returns 0 if the timestamp was not set. More...
 
virtual ~TrackingTool ()
 

Static Protected Member Functions

static Pointer New ()
 

Protected Attributes

Point3D m_Position
 holds the position of the tool More...
 
Quaternion m_Orientation
 holds the orientation of the tool 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_ToolTip
 
Quaternion m_ToolTipRotation
 
bool m_ToolTipSet
 
- Protected Attributes inherited from mitk::TrackingTool
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...
 

Detailed Description

implements TrackingTool interface

Documentation This class is a complete TrackingTool implementation. It can either be used directly by TrackingDevices, or be subclassed for more specific implementations. mitk::MicroBirdTrackingDevice uses this class to manage its tools. Other tracking devices uses specialized versions of this class (e.g. mitk::NDITrackingTool)

Definition at line 39 of file mitkInternalTrackingTool.h.

Constructor & Destructor Documentation

mitk::InternalTrackingTool::InternalTrackingTool ( )
protected

Definition at line 23 of file mitkInternalTrackingTool.cpp.

References m_Orientation, m_Position, m_ToolTip, and m_ToolTipRotation.

mitk::InternalTrackingTool::~InternalTrackingTool ( )
protectedvirtual

Definition at line 47 of file mitkInternalTrackingTool.cpp.

Member Function Documentation

Pointer mitk::InternalTrackingTool::Clone ( ) const
protected
bool mitk::InternalTrackingTool::Disable ( )
overridevirtual

disables the tool, so that it will not be tracked anymore. Returns true if disabling was successfull

Implements mitk::TrackingTool.

Reimplemented in mitk::OptitrackTrackingTool.

Definition at line 215 of file mitkInternalTrackingTool.cpp.

bool mitk::InternalTrackingTool::Enable ( )
overridevirtual

enablea the tool, so that it will be tracked. Returns true if enabling was successfull

Implements mitk::TrackingTool.

Reimplemented in mitk::OptitrackTrackingTool.

Definition at line 203 of file mitkInternalTrackingTool.cpp.

void mitk::InternalTrackingTool::GetOrientation ( mitk::Quaternion orientation) const
overridevirtual

returns the current orientation of the tool as a quaternion (in the tracking device coordinate system)

Implements mitk::TrackingTool.

Reimplemented in mitk::OptitrackTrackingTool.

Definition at line 126 of file mitkInternalTrackingTool.cpp.

void mitk::InternalTrackingTool::GetPosition ( mitk::Point3D position) const
overridevirtual

returns the current position of the tool as an array of three floats (in the tracking device coordinate system)

Implements mitk::TrackingTool.

Reimplemented in mitk::OptitrackTrackingTool.

Definition at line 91 of file mitkInternalTrackingTool.cpp.

float mitk::InternalTrackingTool::GetTrackingError ( ) const
overridevirtual

return one value that corresponds to the overall tracking error. The dimension of this value is specific to each tracking device

Implements mitk::TrackingTool.

Reimplemented in mitk::OptitrackTrackingTool.

Definition at line 195 of file mitkInternalTrackingTool.cpp.

bool mitk::InternalTrackingTool::IsDataValid ( ) const
overridevirtual

returns true if the current position data is valid (no error during tracking, tracking error below threshold, ...)

Implements mitk::TrackingTool.

Reimplemented in mitk::OptitrackTrackingTool.

Definition at line 239 of file mitkInternalTrackingTool.cpp.

bool mitk::InternalTrackingTool::IsEnabled ( ) const
overridevirtual

returns whether the tool is enabled or disabled

Implements mitk::TrackingTool.

Reimplemented in mitk::OptitrackTrackingTool.

Definition at line 227 of file mitkInternalTrackingTool.cpp.

Referenced by mitk::NDITrackingDevice::InitializeWiredTools().

bool mitk::InternalTrackingTool::IsTooltipSet ( ) const
virtual

returns true if a tooltip is set, false if not

Definition at line 233 of file mitkInternalTrackingTool.cpp.

mitk::InternalTrackingTool::mitkClassMacro ( InternalTrackingTool  ,
TrackingTool   
)
static Pointer mitk::InternalTrackingTool::New ( )
staticprotected
void mitk::InternalTrackingTool::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overridevirtual

Reimplemented from mitk::TrackingTool.

Definition at line 51 of file mitkInternalTrackingTool.cpp.

void mitk::InternalTrackingTool::SetDataValid ( bool  _arg)
virtual

sets if the tracking data (position & Orientation) is valid

Reimplemented in mitk::OptitrackTrackingTool.

Definition at line 246 of file mitkInternalTrackingTool.cpp.

Referenced by mitk::MicroBirdTrackingDevice::TrackTools().

void mitk::InternalTrackingTool::SetErrorMessage ( const char *  _arg)
virtual

sets the error message

Definition at line 258 of file mitkInternalTrackingTool.cpp.

void mitk::InternalTrackingTool::SetOrientation ( mitk::Quaternion  orientation)
virtual

sets the orientation as a quaternion

Definition at line 171 of file mitkInternalTrackingTool.cpp.

Referenced by mitk::MicroBirdTrackingDevice::TrackTools().

void mitk::InternalTrackingTool::SetPosition ( mitk::Point3D  position)
virtual

sets the position

Definition at line 116 of file mitkInternalTrackingTool.cpp.

Referenced by mitk::MicroBirdTrackingDevice::TrackTools().

void mitk::InternalTrackingTool::SetToolName ( const std::string  _arg)
virtual

Sets the name of the tool.

Definition at line 85 of file mitkInternalTrackingTool.cpp.

Referenced by QmitkNDIConfigurationWidget::UpdateTrackerFromToolTable().

void mitk::InternalTrackingTool::SetToolName ( const char *  _arg)
virtual

Sets the name of the tool.

Definition at line 65 of file mitkInternalTrackingTool.cpp.

void mitk::InternalTrackingTool::SetToolTip ( mitk::Point3D  toolTipPosition,
mitk::Quaternion  orientation = Quaternion(0,0,0,1),
mitk::ScalarType  eps = 0.0 
)
overridevirtual

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.

Implements mitk::TrackingTool.

Definition at line 144 of file mitkInternalTrackingTool.cpp.

References mitk::Equal().

void mitk::InternalTrackingTool::SetTrackingError ( float  error)
virtual

sets the tracking error

Reimplemented in mitk::OptitrackTrackingTool.

Definition at line 182 of file mitkInternalTrackingTool.cpp.

Referenced by mitk::MicroBirdTrackingDevice::TrackTools().

Member Data Documentation

bool mitk::InternalTrackingTool::m_DataValid
protected

if true, data in m_Position and m_Orientation is valid, e.g. true tracking data

Definition at line 74 of file mitkInternalTrackingTool.h.

bool mitk::InternalTrackingTool::m_Enabled
protected

if true, tool is enabled and should receive tracking updates from the tracking device

Definition at line 73 of file mitkInternalTrackingTool.h.

Quaternion mitk::InternalTrackingTool::m_Orientation
protected

holds the orientation of the tool

Definition at line 71 of file mitkInternalTrackingTool.h.

Referenced by InternalTrackingTool().

Point3D mitk::InternalTrackingTool::m_Position
protected

holds the position of the tool

Definition at line 70 of file mitkInternalTrackingTool.h.

Referenced by InternalTrackingTool().

Point3D mitk::InternalTrackingTool::m_ToolTip
protected

Definition at line 75 of file mitkInternalTrackingTool.h.

Referenced by InternalTrackingTool().

Quaternion mitk::InternalTrackingTool::m_ToolTipRotation
protected

Definition at line 76 of file mitkInternalTrackingTool.h.

Referenced by InternalTrackingTool().

bool mitk::InternalTrackingTool::m_ToolTipSet
protected

Definition at line 77 of file mitkInternalTrackingTool.h.

float mitk::InternalTrackingTool::m_TrackingError
protected

holds the tracking error of the tool

Definition at line 72 of file mitkInternalTrackingTool.h.


The documentation for this class was generated from the following files: