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

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

#include <mitkNDIPassiveTool.h>

Inheritance diagram for mitk::NDIPassiveTool:
Collaboration diagram for mitk::NDIPassiveTool:

Public Types

enum  TrackingPriority { Static, Dynamic, ButtonBox }
 tracking priority for NDI tracking devices More...
 

Public Member Functions

 mitkClassMacro (NDIPassiveTool, InternalTrackingTool)
 
virtual bool LoadSROMFile (const char *filename)
 load a srom tool description file More...
 
virtual const unsigned char * GetSROMData () const
 get loaded srom file as unsigned char array More...
 
virtual unsigned int GetSROMDataLength () const
 get length of SROMData char array More...
 
virtual void SetPortHandle (const char *_arg)
 
virtual const char * GetPortHandle () const
 get port handle under which the tool is registered in the tracking device More...
 
virtual void SetTrackingPriority (TrackingPriority _arg)
 set port handle under which the tool is registered in the tracking device More...
 
virtual TrackingPriority GetTrackingPriority () const
 set tracking priority that the ndi tracking device should use More...
 
virtual void SetSerialNumber (const char *_arg)
 get tracking priority that the ndi tracking device should use More...
 
virtual const char * GetSerialNumber () const
 set serial number of the tool More...
 
virtual const char * GetFile () const
 get serial number of the tool More...
 
- Public Member Functions inherited from mitk::InternalTrackingTool
 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
 
 NDIPassiveTool ()
 
virtual ~NDIPassiveTool ()
 
- Protected Member Functions inherited from mitk::InternalTrackingTool
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 ()
 get file from which this tool was loaded More...
 
- Static Protected Member Functions inherited from mitk::InternalTrackingTool
static Pointer New ()
 

Protected Attributes

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

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 35 of file mitkNDIPassiveTool.h.

Member Enumeration Documentation

tracking priority for NDI tracking devices

Enumerator
Static 
Dynamic 
ButtonBox 

Definition at line 42 of file mitkNDIPassiveTool.h.

Constructor & Destructor Documentation

mitk::NDIPassiveTool::NDIPassiveTool ( )
protected

Definition at line 22 of file mitkNDIPassiveTool.cpp.

mitk::NDIPassiveTool::~NDIPassiveTool ( )
protectedvirtual

Definition at line 32 of file mitkNDIPassiveTool.cpp.

Member Function Documentation

Pointer mitk::NDIPassiveTool::Clone ( ) const
protected
virtual const char* mitk::NDIPassiveTool::GetFile ( ) const
virtual

get serial number of the tool

virtual const char* mitk::NDIPassiveTool::GetPortHandle ( ) const
virtual

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

Referenced by mitk::NDIProtocol::POS3D(), mitk::NDITrackingDevice::RemoveTool(), and mitk::NDITrackingDevice::UpdateTool().

virtual const char* mitk::NDIPassiveTool::GetSerialNumber ( ) const
virtual

set serial number of the tool

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

get loaded srom file as unsigned char array

Definition at line 75 of file mitkNDIPassiveTool.cpp.

Referenced by mitk::NDITrackingDevice::InitializeWiredTools(), and mitk::NDITrackingDevice::UpdateTool().

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

get length of SROMData char array

Definition at line 81 of file mitkNDIPassiveTool.cpp.

Referenced by mitk::NDITrackingDevice::InitializeWiredTools(), and mitk::NDITrackingDevice::UpdateTool().

virtual TrackingPriority mitk::NDIPassiveTool::GetTrackingPriority ( ) const
virtual

set tracking priority that the ndi tracking device should use

Referenced by mitk::NDITrackingDevice::InitializeWiredTools(), and mitk::NDITrackingDevice::UpdateTool().

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

load a srom tool description file

Definition at line 42 of file mitkNDIPassiveTool.cpp.

References filename, and Json::in().

Referenced by QmitkNDIConfigurationWidget::UpdateTrackerFromToolTable().

mitk::NDIPassiveTool::mitkClassMacro ( NDIPassiveTool  ,
InternalTrackingTool   
)
static Pointer mitk::NDIPassiveTool::New ( )
staticprotected

get file from which this tool was loaded

Referenced by mitk::NDITrackingDevice::AddTool(), and mitk::NDITrackingDevice::DiscoverWiredTools().

virtual void mitk::NDIPassiveTool::SetPortHandle ( const char *  _arg)
virtual
virtual void mitk::NDIPassiveTool::SetSerialNumber ( const char *  _arg)
virtual

get tracking priority that the ndi tracking device should use

virtual void mitk::NDIPassiveTool::SetTrackingPriority ( TrackingPriority  _arg)
virtual

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

Member Data Documentation

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

the original file from which this tool was loaded

Definition at line 75 of file mitkNDIPassiveTool.h.

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

port handle for this tool

Definition at line 73 of file mitkNDIPassiveTool.h.

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

serial number for this tool

Definition at line 74 of file mitkNDIPassiveTool.h.

unsigned char* mitk::NDIPassiveTool::m_SROMData
protected

content of the srom tool description file

Definition at line 70 of file mitkNDIPassiveTool.h.

unsigned int mitk::NDIPassiveTool::m_SROMDataLength
protected

length of the srom tool description file

Definition at line 71 of file mitkNDIPassiveTool.h.

TrackingPriority mitk::NDIPassiveTool::m_TrackingPriority
protected

priority for this tool

Definition at line 72 of file mitkNDIPassiveTool.h.


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