Medical Imaging Interaction Toolkit
2023.12.00
Medical Imaging Interaction Toolkit
|
An object of this class represents the a Tool tracked by Optitrack System. You can define the tool by the a definition file like in the example in ****. Remember that it will be necessary to to have a license for using the Optitrack System. See https://www.naturalpoint.com/ for details. More...
#include <mitkOptitrackTrackingTool.h>
Public Member Functions | |
mitkClassMacro (mitk::OptitrackTrackingTool, mitk::TrackingTool) | |
bool | SetToolByFileName (std::string nameFile) |
Define the tool by a calibration File. The file must to have the next structure. Makers locations must to have "%fe %fe %fe\n" format and in (mm). See http://www.cplusplus.com/reference/cstdio/fscanf/ ToolName #NumberOfMarkers X Y Z - for the first marker X Y Z - for the second marker ... X Y Z - for the last marker, the number #NumberOfMarkers X Y Z - for the PIVOT point. More... | |
int | get_IDnext () |
Ask API the next number of defined tool. More... | |
bool | DeleteTrackable () |
Delete the tool from the list of tools inside API Optitrack. More... | |
void | SetPosition (mitk::Point3D position, ScalarType eps=0.0) |
void | SetOrientation (mitk::Quaternion orientation, ScalarType eps=0.0) |
void | GetPosition (mitk::Point3D &position) const override |
Get the position of the tool. More... | |
void | GetOrientation (mitk::Quaternion &orientation) const override |
Get the orientation of the tool using quaternion nomenclature. More... | |
bool | Enable () override |
Set the tool enabled for tracking. More... | |
bool | Disable () override |
Set the tool disabled for tracking. More... | |
bool | IsEnabled () const override |
Check if the tool is enabled (true) or not. More... | |
bool | IsDataValid () const override |
Check if the data of the tool is valid. More... | |
float | GetTrackingError () const override |
Get the expectated error in the tracked tool. More... | |
void | SetTrackingError (float FLEerror) override |
Set the FLE (Fiducial Localization Error) for the tool. More... | |
void | SetDataValid (bool _arg) override |
Set the valid flag for tracking data to true. More... | |
void | updateTool () |
Update location and orientation of the tool. More... | |
OptitrackTrackingTool () | |
Constructor of the class. More... | |
~OptitrackTrackingTool () override | |
Destructor of the class. More... | |
Public Member Functions inherited from mitk::TrackingTool | |
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 | SetPosition (Point3D position) |
sets the position More... | |
virtual void | SetOrientation (Quaternion orientation) |
sets the orientation as a quaternion 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... | |
Static Public Member Functions | |
static Pointer | New () |
Static Public Member Functions inherited from mitk::TrackingTool | |
static Pointer | New () |
Public Attributes | |
std::string | m_fileConfiguration |
File of the configuration for the tool. More... | |
int | m_ID |
ID number from Optitrack API. More... | |
float * | m_calibrationPoints |
List of Markers locations in calibration position and orientation. More... | |
float * | m_pivotPoint |
location of the pivot point during calibration More... | |
int | m_numMarkers |
Number of Markers that blong to the tool. More... | |
float | m_FLE |
Expected value of the fiducial localization error (rms) More... | |
Additional Inherited Members | |
Protected Member Functions inherited from mitk::TrackingTool | |
TrackingTool () | |
~TrackingTool () override | |
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... | |
std::mutex | 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 |
An object of this class represents the a Tool tracked by Optitrack System. You can define the tool by the a definition file like in the example in ****. Remember that it will be necessary to to have a license for using the Optitrack System. See https://www.naturalpoint.com/ for details.
Documentation:
Definition at line 50 of file mitkOptitrackTrackingTool.h.
mitk::OptitrackTrackingTool::OptitrackTrackingTool | ( | ) |
Constructor of the class.
|
override |
Destructor of the class.
bool mitk::OptitrackTrackingTool::DeleteTrackable | ( | ) |
Delete the tool from the list of tools inside API Optitrack.
mitk::IGTException | Throws an exception if |
|
overridevirtual |
Set the tool disabled for tracking.
mitk::IGTException | Throws an exception if |
Reimplemented from mitk::TrackingTool.
|
overridevirtual |
Set the tool enabled for tracking.
mitk::IGTException | Throws an exception if |
Reimplemented from mitk::TrackingTool.
int mitk::OptitrackTrackingTool::get_IDnext | ( | ) |
Ask API the next number of defined tool.
mitk::IGTException | Throws an exception if get_IDnext failed |
|
overridevirtual |
Get the orientation of the tool using quaternion nomenclature.
mitk::IGTException | Throws an exception if |
Reimplemented from mitk::TrackingTool.
|
overridevirtual |
Get the position of the tool.
mitk::IGTException | Throws an exception if |
Reimplemented from mitk::TrackingTool.
|
overridevirtual |
Get the expectated error in the tracked tool.
mitk::IGTException | Throws an exception if |
Reimplemented from mitk::TrackingTool.
|
overridevirtual |
Check if the data of the tool is valid.
mitk::IGTException | Throws an exception if |
Reimplemented from mitk::TrackingTool.
|
overridevirtual |
Check if the tool is enabled (true) or not.
mitk::IGTException | Throws an exception if |
Reimplemented from mitk::TrackingTool.
mitk::OptitrackTrackingTool::mitkClassMacro | ( | mitk::OptitrackTrackingTool | , |
mitk::TrackingTool | |||
) |
|
static |
|
overridevirtual |
Set the valid flag for tracking data to true.
mitk::IGTException | Throws an exception if |
Reimplemented from mitk::TrackingTool.
void mitk::OptitrackTrackingTool::SetOrientation | ( | mitk::Quaternion | orientation, |
ScalarType | eps = 0.0 |
||
) |
void mitk::OptitrackTrackingTool::SetPosition | ( | mitk::Point3D | position, |
ScalarType | eps = 0.0 |
||
) |
bool mitk::OptitrackTrackingTool::SetToolByFileName | ( | std::string | nameFile | ) |
Define the tool by a calibration File. The file must to have the next structure. Makers locations must to have "%fe %fe %fe\n" format and in (mm). See http://www.cplusplus.com/reference/cstdio/fscanf/ ToolName #NumberOfMarkers X Y Z - for the first marker X Y Z - for the second marker ... X Y Z - for the last marker, the number #NumberOfMarkers X Y Z - for the PIVOT point.
mitk::IGTException | Throws an exception if there exist any problem during the configuration file reading. |
|
overridevirtual |
Set the FLE (Fiducial Localization Error) for the tool.
mitk::IGTException | Throws an exception if |
Reimplemented from mitk::TrackingTool.
void mitk::OptitrackTrackingTool::updateTool | ( | ) |
Update location and orientation of the tool.
mitk::IGTException | Throws an exception if |
float* mitk::OptitrackTrackingTool::m_calibrationPoints |
List of Markers locations in calibration position and orientation.
Definition at line 190 of file mitkOptitrackTrackingTool.h.
std::string mitk::OptitrackTrackingTool::m_fileConfiguration |
File of the configuration for the tool.
Definition at line 180 of file mitkOptitrackTrackingTool.h.
float mitk::OptitrackTrackingTool::m_FLE |
Expected value of the fiducial localization error (rms)
Definition at line 205 of file mitkOptitrackTrackingTool.h.
int mitk::OptitrackTrackingTool::m_ID |
ID number from Optitrack API.
Definition at line 185 of file mitkOptitrackTrackingTool.h.
int mitk::OptitrackTrackingTool::m_numMarkers |
Number of Markers that blong to the tool.
Definition at line 200 of file mitkOptitrackTrackingTool.h.
float* mitk::OptitrackTrackingTool::m_pivotPoint |
location of the pivot point during calibration
Definition at line 195 of file mitkOptitrackTrackingTool.h.