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

Implementation of a passive NDI optical tool. More...

#include <mitkNDIPassiveTool.h>

Inheritance diagram for mitk::NDIPassiveTool:
mitk::TrackingTool NDIPassiveToolTestClass

Public Types

enum  TrackingPriority { Static = 'S' , Dynamic = 'D' , ButtonBox = 'B' }
 tracking priority for NDI tracking devices More...
 

Public Member Functions

 mitkClassMacro (NDIPassiveTool, TrackingTool)
 
virtual bool LoadSROMFile (const char *filename)
 load a srom tool description file
 
virtual const unsigned char * GetSROMData () const
 get loaded srom file as unsigned char array
 
virtual unsigned int GetSROMDataLength () const
 get length of SROMData char array
 
 itkSetStringMacro (PortHandle)
 get port handle under which the tool is registered in the tracking device
 
 itkGetStringMacro (PortHandle)
 set port handle under which the tool is registered in the tracking device
 
 itkSetMacro (TrackingPriority, TrackingPriority)
 set tracking priority that the ndi tracking device should use
 
 itkGetConstMacro (TrackingPriority, TrackingPriority)
 get tracking priority that the ndi tracking device should use
 
 itkSetStringMacro (SerialNumber)
 set serial number of the tool
 
 itkGetStringMacro (SerialNumber)
 get serial number of the tool
 
 itkGetStringMacro (File)
 get file from which this tool was loaded
 
- 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) NDIPassiveTool()
 
 ~NDIPassiveTool () 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

unsigned char * m_SROMData
 content of the srom tool description file
 
unsigned int m_SROMDataLength
 length of the srom tool description file
 
TrackingPriority m_TrackingPriority
 priority for this tool
 
std::string m_PortHandle
 port handle for this tool
 
std::string m_SerialNumber
 serial number for this tool
 
std::string m_File
 the original file from which this tool was loaded
 
- 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 NDITrackingDevice
 

Detailed Description

Implementation of a passive NDI optical tool.

Documentation

implements the TrackingTool interface and has the ability to load an srom file that contains the marker configuration for that tool

Definition at line 31 of file mitkNDIPassiveTool.h.

Member Enumeration Documentation

◆ TrackingPriority

tracking priority for NDI tracking devices

Enumerator
Static 
Dynamic 
ButtonBox 

Definition at line 38 of file mitkNDIPassiveTool.h.

Constructor & Destructor Documentation

◆ ~NDIPassiveTool()

mitk::NDIPassiveTool::~NDIPassiveTool ( )
overrideprotected

Definition at line 28 of file mitkNDIPassiveTool.cpp.

Member Function Documentation

◆ GetSROMData()

const unsigned char * mitk::NDIPassiveTool::GetSROMData ( ) const
virtual

get loaded srom file as unsigned char array

Definition at line 71 of file mitkNDIPassiveTool.cpp.

◆ GetSROMDataLength()

unsigned int mitk::NDIPassiveTool::GetSROMDataLength ( ) const
virtual

get length of SROMData char array

Definition at line 77 of file mitkNDIPassiveTool.cpp.

◆ itkCloneMacro()

mitk::NDIPassiveTool::itkCloneMacro ( Self )
protected

◆ itkFactorylessNewMacro()

mitk::NDIPassiveTool::itkFactorylessNewMacro ( Self )
protected

◆ itkGetConstMacro()

mitk::NDIPassiveTool::itkGetConstMacro ( TrackingPriority ,
TrackingPriority  )

get tracking priority that the ndi tracking device should use

◆ itkGetStringMacro() [1/3]

mitk::NDIPassiveTool::itkGetStringMacro ( File )

get file from which this tool was loaded

◆ itkGetStringMacro() [2/3]

mitk::NDIPassiveTool::itkGetStringMacro ( PortHandle )

set port handle under which the tool is registered in the tracking device

◆ itkGetStringMacro() [3/3]

mitk::NDIPassiveTool::itkGetStringMacro ( SerialNumber )

get serial number of the tool

◆ itkSetMacro()

mitk::NDIPassiveTool::itkSetMacro ( TrackingPriority ,
TrackingPriority  )

set tracking priority that the ndi tracking device should use

◆ itkSetStringMacro() [1/2]

mitk::NDIPassiveTool::itkSetStringMacro ( PortHandle )

get port handle under which the tool is registered in the tracking device

◆ itkSetStringMacro() [2/2]

mitk::NDIPassiveTool::itkSetStringMacro ( SerialNumber )

set serial number of the tool

◆ LoadSROMFile()

bool mitk::NDIPassiveTool::LoadSROMFile ( const char * filename)
virtual

load a srom tool description file

Definition at line 38 of file mitkNDIPassiveTool.cpp.

◆ mitkClassMacro()

mitk::NDIPassiveTool::mitkClassMacro ( NDIPassiveTool ,
TrackingTool  )

Friends And Related Symbol Documentation

◆ NDITrackingDevice

friend class NDITrackingDevice
friend

Definition at line 34 of file mitkNDIPassiveTool.h.

Member Data Documentation

◆ m_File

std::string mitk::NDIPassiveTool::m_File
protected

the original file from which this tool was loaded

Definition at line 71 of file mitkNDIPassiveTool.h.

◆ m_PortHandle

std::string mitk::NDIPassiveTool::m_PortHandle
protected

port handle for this tool

Definition at line 69 of file mitkNDIPassiveTool.h.

◆ m_SerialNumber

std::string mitk::NDIPassiveTool::m_SerialNumber
protected

serial number for this tool

Definition at line 70 of file mitkNDIPassiveTool.h.

◆ m_SROMData

unsigned char* mitk::NDIPassiveTool::m_SROMData
protected

content of the srom tool description file

Definition at line 66 of file mitkNDIPassiveTool.h.

◆ m_SROMDataLength

unsigned int mitk::NDIPassiveTool::m_SROMDataLength
protected

length of the srom tool description file

Definition at line 67 of file mitkNDIPassiveTool.h.

◆ m_TrackingPriority

TrackingPriority mitk::NDIPassiveTool::m_TrackingPriority
protected

priority for this tool

Definition at line 68 of file mitkNDIPassiveTool.h.


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