Interface for all Tracking Tools. More...
#include <mitkTrackingTool.h>
Public Types | |
typedef TrackingTool | Self |
typedef itk::Object | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer < const Self > | ConstPointer |
Public Member Functions | |
virtual const char * | GetClassName () const |
virtual void | GetPosition (mitk::Point3D &position) const =0 |
returns the current position of the tool as an array of three floats (in the tracking device coordinate system) | |
virtual void | GetOrientation (mitk::Quaternion &orientation) const =0 |
returns the current orientation of the tool as a quaternion in a mitk::Point4D (in the tracking device coordinate system) | |
virtual bool | Enable ()=0 |
enables the tool, so that it will be tracked | |
virtual bool | Disable ()=0 |
disables the tool, so that it will not be tracked anymore | |
virtual bool | IsEnabled () const =0 |
returns whether the tool is enabled or disabled | |
virtual bool | IsDataValid () const =0 |
returns true if the current position data is valid (no error during tracking, tracking error below threshold, ...) | |
virtual float | GetTrackingError () const =0 |
returns one value that corresponds to the overall tracking error. | |
virtual const char * | GetToolName () const |
every tool has a name that can be used to identify it. | |
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) | |
Protected Member Functions | |
TrackingTool () | |
virtual | ~TrackingTool () |
Protected Attributes | |
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 | |
itk::FastMutexLock::Pointer | m_MyMutex |
mutex to control concurrent access to the tool |
Interface for all Tracking Tools.
Documentation Abstract class that defines the methods that are common for all tracking tools.
Definition at line 36 of file mitkTrackingTool.h.
typedef itk::SmartPointer<const Self> mitk::TrackingTool::ConstPointer |
Reimplemented in mitk::ClaronTool, mitk::InternalTrackingTool, mitk::MicroBirdTool, mitk::NDIPassiveTool, mitk::VirtualTrackingTool, ClaronToolTestClass, InternalTrackingToolTestClass, NDIPassiveToolTestClass, and TrackingToolTestClass.
Definition at line 39 of file mitkTrackingTool.h.
typedef itk::SmartPointer<Self> mitk::TrackingTool::Pointer |
Reimplemented in mitk::ClaronTool, mitk::InternalTrackingTool, mitk::MicroBirdTool, mitk::NDIPassiveTool, mitk::VirtualTrackingTool, ClaronToolTestClass, InternalTrackingToolTestClass, NDIPassiveToolTestClass, and TrackingToolTestClass.
Definition at line 39 of file mitkTrackingTool.h.
typedef TrackingTool mitk::TrackingTool::Self |
Reimplemented in mitk::ClaronTool, mitk::InternalTrackingTool, mitk::MicroBirdTool, mitk::NDIPassiveTool, mitk::VirtualTrackingTool, ClaronToolTestClass, InternalTrackingToolTestClass, NDIPassiveToolTestClass, and TrackingToolTestClass.
Definition at line 39 of file mitkTrackingTool.h.
typedef itk::Object mitk::TrackingTool::Superclass |
Reimplemented in mitk::ClaronTool, mitk::InternalTrackingTool, mitk::MicroBirdTool, mitk::NDIPassiveTool, mitk::VirtualTrackingTool, ClaronToolTestClass, InternalTrackingToolTestClass, NDIPassiveToolTestClass, and TrackingToolTestClass.
Definition at line 39 of file mitkTrackingTool.h.
mitk::TrackingTool::TrackingTool | ( | ) | [protected] |
Definition at line 24 of file mitkTrackingTool.cpp.
References m_MyMutex.
: itk::Object(), m_ToolName(""), m_ErrorMessage("") { m_MyMutex = itk::FastMutexLock::New(); }
mitk::TrackingTool::~TrackingTool | ( | ) | [protected, virtual] |
Definition at line 31 of file mitkTrackingTool.cpp.
virtual bool mitk::TrackingTool::Disable | ( | ) | [pure virtual] |
disables the tool, so that it will not be tracked anymore
Implemented in mitk::InternalTrackingTool, and TrackingToolTestClass.
virtual bool mitk::TrackingTool::Enable | ( | ) | [pure virtual] |
enables the tool, so that it will be tracked
Implemented in mitk::InternalTrackingTool, and TrackingToolTestClass.
virtual const char* mitk::TrackingTool::GetClassName | ( | ) | const [virtual] |
const char * mitk::TrackingTool::GetErrorMessage | ( | ) | const [virtual] |
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)
Definition at line 45 of file mitkTrackingTool.cpp.
Referenced by QmitkIGTExampleView::OnTestTracking().
{ MutexLockHolder lock(*m_MyMutex); // lock and unlock the mutex return this->m_ErrorMessage.c_str(); }
virtual void mitk::TrackingTool::GetOrientation | ( | mitk::Quaternion & | orientation ) | const [pure virtual] |
returns the current orientation of the tool as a quaternion in a mitk::Point4D (in the tracking device coordinate system)
Implemented in mitk::InternalTrackingTool, and TrackingToolTestClass.
Referenced by mitk::TrackingDeviceSource::GenerateData(), and QmitkIGTExampleView::OnTestTracking().
virtual void mitk::TrackingTool::GetPosition | ( | mitk::Point3D & | position ) | const [pure virtual] |
returns the current position of the tool as an array of three floats (in the tracking device coordinate system)
Implemented in mitk::InternalTrackingTool, and TrackingToolTestClass.
Referenced by mitk::TrackingDeviceSource::GenerateData(), and QmitkIGTExampleView::OnTestTracking().
const char * mitk::TrackingTool::GetToolName | ( | ) | const [virtual] |
every tool has a name that can be used to identify it.
Definition at line 38 of file mitkTrackingTool.cpp.
Referenced by QmitkNDIConfigurationWidget::GetToolNamesList(), mitk::NDITrackingDevice::InitializeWiredTools(), QmitkIGTExampleView::OnTestTracking(), mitkClaronTrackingDeviceTestClass::TestAllMethodsOnSystemsWithoutMicronTracker(), and QmitkNDIConfigurationWidget::UpdateToolTable().
{ MutexLockHolder lock(*m_MyMutex); // lock and unlock the mutex return this->m_ToolName.c_str(); }
virtual float mitk::TrackingTool::GetTrackingError | ( | ) | const [pure virtual] |
returns one value that corresponds to the overall tracking error.
Implemented in mitk::InternalTrackingTool, and TrackingToolTestClass.
Referenced by mitk::TrackingDeviceSource::GenerateData(), and QmitkIGTExampleView::OnTestTracking().
virtual bool mitk::TrackingTool::IsDataValid | ( | ) | const [pure virtual] |
returns true if the current position data is valid (no error during tracking, tracking error below threshold, ...)
Implemented in mitk::InternalTrackingTool, and TrackingToolTestClass.
Referenced by mitk::TrackingDeviceSource::GenerateData(), and QmitkIGTExampleView::OnTestTracking().
virtual bool mitk::TrackingTool::IsEnabled | ( | ) | const [pure virtual] |
returns whether the tool is enabled or disabled
Implemented in mitk::InternalTrackingTool, and TrackingToolTestClass.
Referenced by mitk::TrackingDeviceSource::GenerateData(), and QmitkNDIConfigurationWidget::UpdateToolTable().
std::string mitk::TrackingTool::m_ErrorMessage [protected] |
if a tool is invalid, this member should contain a human readable explanation of why it is invalid
Definition at line 54 of file mitkTrackingTool.h.
itk::FastMutexLock::Pointer mitk::TrackingTool::m_MyMutex [protected] |
mutex to control concurrent access to the tool
Definition at line 55 of file mitkTrackingTool.h.
Referenced by TrackingTool().
std::string mitk::TrackingTool::m_ToolName [protected] |
every tool has a name that can be used to identify it.
Definition at line 53 of file mitkTrackingTool.h.