MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitk::ClaronTool Class Reference

An object of this class represents a MicronTracker 2 tool. A tool has to be added to a tracking device which will then continuously update the tool coordinates. More...

#include <mitkClaronTool.h>

Inheritance diagram for mitk::ClaronTool:
mitk::TrackingTool ClaronToolTestClass

Public Member Functions

 mitkClassMacro (ClaronTool, TrackingTool)
 
bool LoadFile (const char *filename)
 Loads a tool calibration file. Without this file the tool can not be tracked!
 
bool LoadFile (std::string filename)
 Loads a tool calibration file. Without this file the tool can not be tracked!
 
std::string GetFile ()
 
void SetToolHandle (claronToolHandle handle)
 Sets the handle of the tool.
 
std::string GetCalibrationName ()
 
void SetCalibrationName (std::string name)
 Sets the calibration name of the tool. Be careful, only use this method if you know what you are doing. If you want to change the tool name use the method setToolName instead!
 
claronToolHandle GetToolHandle ()
 
- Public Member Functions inherited from mitk::TrackingTool
 mitkClassMacroItkParent (TrackingTool, itk::Object)
 
 itkFactorylessNewMacro (Self)
 
 itkCloneMacro (Self)
 
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.
 
virtual void SetToolName (const std::string _arg)
 Sets the name of the tool.
 
virtual void SetToolName (const char *_arg)
 Sets the name of the tool.
 
Point3D GetToolTipPosition () const
 returns the tool tip in tool coordinates, which where set by SetToolTip
 
Quaternion GetToolAxisOrientation () const
 returns the transformation of the tool axis with respect to the MITK-IGT main tool axis (0,0,-1)
 
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.
 
virtual bool IsToolTipSet () const
 returns true if a tool tip is set, false if not
 
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)
 
virtual void SetPosition (Point3D position)
 sets the position
 
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)
 
virtual void SetOrientation (Quaternion orientation)
 sets the orientation as a quaternion
 
virtual bool Enable ()
 enables the tool, so that it will be tracked
 
virtual bool Disable ()
 disables the tool, so that it will not be tracked anymore
 
virtual bool IsEnabled () const
 returns whether the tool is enabled or disabled
 
virtual void SetDataValid (bool isDataValid)
 sets if the tracking data (position & orientation) is valid
 
virtual bool IsDataValid () const
 returns true if the current position data is valid (no error during tracking, tracking error below threshold, ...)
 
virtual float GetTrackingError () const
 returns one value that corresponds to the overall tracking error.
 
virtual void SetTrackingError (float error)
 sets the tracking error
 
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)
 
virtual void SetErrorMessage (const char *_arg)
 sets the error message
 
 itkSetMacro (IGTTimeStamp, double) itkGetConstMacro(IGTTimeStamp
 

Protected Member Functions

 itkFactorylessNewMacro (Self)
 
 itkCloneMacro (Self) ClaronTool()
 
 ~ClaronTool () override
 
- 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.
 
 ~TrackingTool () override
 

Protected Attributes

claronToolHandle m_ToolHandle
 Tool handle variable from tracking device.
 
std::string m_CalibrationName
 Variable which holds the Tool's calibration name.
 
std::string m_Filename
 Variable to check filename's format and to get back complete filename.
 
- Protected Attributes inherited from mitk::TrackingTool
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
 
double m_IGTTimeStamp
 contains the time at which the tracking data was recorded
 
std::mutex m_MyMutex
 mutex to control concurrent access to the tool
 
Point3D m_Position
 holds the position of the tool in global tracking coordinates
 
Quaternion m_Orientation
 holds the orientation of the tool´in global tracking coordinates
 
float m_TrackingError
 holds the tracking error of the tool
 
bool m_Enabled
 if true, tool is enabled and should receive tracking updates from the tracking device
 
bool m_DataValid
 if true, data in m_Position and m_Orientation is valid, e.g. true tracking data
 
Point3D m_ToolTipPosition
 holds the position of the tool tip in the coordinate system of the tracking sensor
 
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
 
bool m_ToolTipSet
 

Friends

class ClaronTrackingDevice
 

Detailed Description

An object of this class represents a MicronTracker 2 tool. A tool has to be added to a tracking device which will then continuously update the tool coordinates.

Documentation:

Definition at line 28 of file mitkClaronTool.h.

Constructor & Destructor Documentation

◆ ~ClaronTool()

mitk::ClaronTool::~ClaronTool ( void )
overrideprotected

Definition at line 22 of file mitkClaronTool.cpp.

Member Function Documentation

◆ GetCalibrationName()

std::string mitk::ClaronTool::GetCalibrationName ( )
Returns
Returns the calibration name which is used to identify the tool.

Definition at line 26 of file mitkClaronTool.cpp.

◆ GetFile()

std::string mitk::ClaronTool::GetFile ( )

Definition at line 87 of file mitkClaronTool.cpp.

◆ GetToolHandle()

mitk::claronToolHandle mitk::ClaronTool::GetToolHandle ( )
Returns
Returns the tool handle of the tool.

Definition at line 97 of file mitkClaronTool.cpp.

◆ itkCloneMacro()

mitk::ClaronTool::itkCloneMacro ( Self )
protected

◆ itkFactorylessNewMacro()

mitk::ClaronTool::itkFactorylessNewMacro ( Self )
protected

◆ LoadFile() [1/2]

bool mitk::ClaronTool::LoadFile ( const char * filename)

Loads a tool calibration file. Without this file the tool can not be tracked!

Definition at line 36 of file mitkClaronTool.cpp.

◆ LoadFile() [2/2]

bool mitk::ClaronTool::LoadFile ( std::string filename)

Loads a tool calibration file. Without this file the tool can not be tracked!

Definition at line 48 of file mitkClaronTool.cpp.

◆ mitkClassMacro()

mitk::ClaronTool::mitkClassMacro ( ClaronTool ,
TrackingTool  )

◆ SetCalibrationName()

void mitk::ClaronTool::SetCalibrationName ( std::string name)

Sets the calibration name of the tool. Be careful, only use this method if you know what you are doing. If you want to change the tool name use the method setToolName instead!

Definition at line 31 of file mitkClaronTool.cpp.

◆ SetToolHandle()

void mitk::ClaronTool::SetToolHandle ( mitk::claronToolHandle handle)

Sets the handle of the tool.

Parameters
handleThe new handle of the tool.

Definition at line 92 of file mitkClaronTool.cpp.

Friends And Related Symbol Documentation

◆ ClaronTrackingDevice

friend class ClaronTrackingDevice
friend

Definition at line 31 of file mitkClaronTool.h.

Member Data Documentation

◆ m_CalibrationName

std::string mitk::ClaronTool::m_CalibrationName
protected

Variable which holds the Tool's calibration name.

Definition at line 76 of file mitkClaronTool.h.

◆ m_Filename

std::string mitk::ClaronTool::m_Filename
protected

Variable to check filename's format and to get back complete filename.

Definition at line 78 of file mitkClaronTool.h.

◆ m_ToolHandle

claronToolHandle mitk::ClaronTool::m_ToolHandle
protected

Tool handle variable from tracking device.

Definition at line 74 of file mitkClaronTool.h.


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