Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

mitk::TrackingTool Class Reference

Interface for all Tracking Tools. More...

#include <mitkTrackingTool.h>

Inheritance diagram for mitk::TrackingTool:
Inheritance graph
[legend]

List of all members.

Public Types

typedef TrackingTool Self
typedef itk::Object Superclass
typedef itk::SmartPointer< SelfPointer
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

Detailed Description

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.


Member Typedef Documentation

typedef itk::SmartPointer<const Self> mitk::TrackingTool::ConstPointer
typedef itk::SmartPointer<Self> mitk::TrackingTool::Pointer
typedef itk::Object mitk::TrackingTool::Superclass

Constructor & Destructor Documentation

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.

{
  m_MyMutex->Unlock();
  m_MyMutex = NULL;
}

Member Function Documentation

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]
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().


Member Data Documentation

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.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines