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>
Public Types | |
typedef ClaronTool | Self |
typedef InternalTrackingTool | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer < const Self > | ConstPointer |
Public Member Functions | |
virtual const char * | GetClassName () const |
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 () |
Protected Member Functions | |
ClaronTool () | |
virtual | ~ClaronTool () |
Static Protected Member Functions | |
static Pointer | New () |
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. | |
Friends | |
class | ClaronTrackingDevice |
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 34 of file mitkClaronTool.h.
typedef itk::SmartPointer<const Self> mitk::ClaronTool::ConstPointer |
Reimplemented from mitk::InternalTrackingTool.
Reimplemented in ClaronToolTestClass.
Definition at line 38 of file mitkClaronTool.h.
typedef itk::SmartPointer<Self> mitk::ClaronTool::Pointer |
Reimplemented from mitk::InternalTrackingTool.
Reimplemented in ClaronToolTestClass.
Definition at line 38 of file mitkClaronTool.h.
typedef ClaronTool mitk::ClaronTool::Self |
Reimplemented from mitk::InternalTrackingTool.
Reimplemented in ClaronToolTestClass.
Definition at line 38 of file mitkClaronTool.h.
Reimplemented from mitk::InternalTrackingTool.
Reimplemented in ClaronToolTestClass.
Definition at line 38 of file mitkClaronTool.h.
mitk::ClaronTool::ClaronTool | ( | ) | [protected] |
Definition at line 23 of file mitkClaronTool.cpp.
:InternalTrackingTool() { }
mitk::ClaronTool::~ClaronTool | ( | void | ) | [protected, virtual] |
Definition at line 27 of file mitkClaronTool.cpp.
{ }
std::string mitk::ClaronTool::GetCalibrationName | ( | ) |
Definition at line 31 of file mitkClaronTool.cpp.
{ return &m_CalibrationName[0]; }
virtual const char* mitk::ClaronTool::GetClassName | ( | ) | const [virtual] |
Reimplemented from mitk::InternalTrackingTool.
Reimplemented in ClaronToolTestClass.
std::string mitk::ClaronTool::GetFile | ( | ) |
Definition at line 92 of file mitkClaronTool.cpp.
{ return m_Filename; }
mitk::claronToolHandle mitk::ClaronTool::GetToolHandle | ( | ) |
Definition at line 102 of file mitkClaronTool.cpp.
{ return this->m_ToolHandle; }
bool mitk::ClaronTool::LoadFile | ( | const char * | filename ) |
Loads a tool calibration file. Without this file the tool can not be tracked!
Definition at line 41 of file mitkClaronTool.cpp.
{ if (filename==NULL) { return false; } else { return this->LoadFile(std::string(filename)); } }
bool mitk::ClaronTool::LoadFile | ( | std::string | filename ) |
Loads a tool calibration file. Without this file the tool can not be tracked!
Definition at line 53 of file mitkClaronTool.cpp.
{ //This method is not really "loading" a file. It is saving the filename and //parsing the calibration name out of the filename. The calibration name is //later used by the tracking device to really load the file. if (filename.empty()) { return false; } else { m_Filename = filename; int end = m_Filename.length(); int start = end; //check whether the path is given in Windows format while( (start!=0) && (filename[start-1]!='\\') ) start--; //if not (start==0) perhaps it is given in Linux format if (start==0) { start = end; while( (start!=0) && (filename[start-1]!='/') ) { start--; } } //if there are no \ and no / in the string something must be wrong... if (start==0) return false; this->m_CalibrationName = m_Filename.substr(start,end); return true; } }
static Pointer mitk::ClaronTool::New | ( | ) | [static, protected] |
Reimplemented from mitk::InternalTrackingTool.
Reimplemented in ClaronToolTestClass.
Referenced by mitk::ClaronTrackingDevice::AddTool(), and mitk::ClaronTrackingDevice::DetectTools().
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 36 of file mitkClaronTool.cpp.
{ this->m_CalibrationName=name; }
void mitk::ClaronTool::SetToolHandle | ( | mitk::claronToolHandle | handle ) |
Sets the handle of the tool.
handle | The new handle of the tool. |
Definition at line 97 of file mitkClaronTool.cpp.
{ this->m_ToolHandle = handle; }
friend class ClaronTrackingDevice [friend] |
Definition at line 37 of file mitkClaronTool.h.
std::string mitk::ClaronTool::m_CalibrationName [protected] |
Variable which holds the Tool's calibration name.
Definition at line 81 of file mitkClaronTool.h.
std::string mitk::ClaronTool::m_Filename [protected] |
Variable to check filename's format and to get back complete filename.
Definition at line 83 of file mitkClaronTool.h.
claronToolHandle mitk::ClaronTool::m_ToolHandle [protected] |
Tool handle variable from tracking device.
Definition at line 79 of file mitkClaronTool.h.