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

superclass for specific MIRCOBIRD tracking Devices More...

#include <mitkMicroBirdTrackingDevice.h>

Inheritance diagram for mitk::MicroBirdTrackingDevice:
Collaboration diagram for mitk::MicroBirdTrackingDevice:

Public Member Functions

 mitkClassMacro (MicroBirdTrackingDevice, TrackingDevice)
 
Pointer Clone () const
 
virtual void SetType (TrackingDeviceType _arg)
 Set the type of the microBird Tracking Device because it can not yet handle this itself. More...
 
virtual bool OpenConnection ()
 Builds up the connection (loads tools, initializes and enables them) More...
 
virtual bool CloseConnection ()
 Closes the connection. More...
 
virtual bool StartTracking ()
 Start the tracking. More...
 
virtual bool StopTracking ()
 here we use the superclass method. More...
 
virtual TrackingToolGetTool (unsigned int toolNumber)
 returns a tracking tool that contains positional information about one of the sensors More...
 
virtual unsigned int GetToolCount () const
 returns a the number of attached sensors More...
 
virtual const char * GetErrorMessage () const
 returns description of most recent error. More...
 
- Public Member Functions inherited from mitk::TrackingDevice
 mitkClassMacroItkParent (TrackingDevice, itk::Object)
 
virtual TrackingToolGetTool (unsigned int toolNumber) const =0
 Return tool with index toolNumber. More...
 
virtual mitk::TrackingToolGetToolByName (std::string name) const
 Returns the tool with the given tool name. More...
 
virtual void SetRotationMode (RotationMode r)
 
virtual RotationMode GetRotationMode () const
 
TrackingDeviceState GetState () const
 return current object state (Setup, Ready or Tracking) More...
 
TrackingDeviceType GetType () const
 Deprecated! Use the more specific getDeviceData instead. return device type identifier. More...
 
void SetType (TrackingDeviceType type)
 Deprecated! Use the more specific setDeviceData instead. set device type. More...
 
TrackingDeviceData GetData () const
 return device data More...
 
void SetData (TrackingDeviceData data)
 set device type More...
 
virtual bool IsDeviceInstalled ()
 

Static Public Member Functions

static Pointer New ()
 

Protected Types

typedef InternalTrackingTool ToolType
 
typedef std::vector< ToolType::Pointer > ToolContainerType
 

Protected Member Functions

void HandleError (int errorCode)
 
bool CompareError (int errorCode, int errorConstant)
 
 MicroBirdTrackingDevice ()
 
virtual ~MicroBirdTrackingDevice ()
 
ToolTypeGetMicroBirdTool (unsigned int toolNumber)
 returns a tracking tool that contains positional information about one of the sensors More...
 
virtual void InvalidateAll ()
 invalidates all tools (on stoptracking, closeconnection) More...
 
bool SwitchTransmitter (bool switchOn)
 Switches the transmitter on resp. off. More...
 
virtual void TrackTools ()
 tracks the position and orientation of all tools until StopTracking() is called. More...
 
virtual void SetErrorMessage (const char *_arg)
 
- Protected Member Functions inherited from mitk::TrackingDevice
void SetState (TrackingDeviceState state)
 change object state More...
 
 TrackingDevice ()
 
virtual ~TrackingDevice ()
 

Static Protected Member Functions

static ITK_THREAD_RETURN_TYPE ThreadStartTracking (void *data)
 Helper function, because the itk::MultiThreader can only start a new thread with a static member function. More...
 

Protected Attributes

itk::FastMutexLock::Pointer m_ToolsMutex
 
ToolContainerType m_Tools
 
std::string m_ErrorMessage
 
itk::MultiThreader::Pointer m_MultiThreader
 
int m_ThreadID
 
DOUBLE_POSITION_QUATERNION_TIME_Q_RECORD record
 
DOUBLE_POSITION_QUATERNION_TIME_Q_RECORD * pRecord
 One tracking data record (quaternion orientation format) More...
 
SYSTEM_CONFIGURATION m_SystemConfig
 The system configuration - used to specify its use. More...
 
SENSOR_CONFIGURATION * m_SensorConfig
 The sensor configuration - used to get and set the sensor properties. More...
 
TRANSMITTER_CONFIGURATION * m_TransmitterConfig
 The transmitter configuration - used to get and set the transmitter properties. More...
 
BOOL m_metric
 Specifies whether metric measurement is used. More...
 
double m_measurementRate
 Specifies the measurement rate - default set to maximum. More...
 
double m_pl
 Specifies the power line frequency (Europe 50Hz, USA 60Hz) More...
 
bool m_agcModeBoth
 AGC (automatic gain control) mode flag. More...
 
AGC_MODE_TYPE m_agc
 
- Protected Attributes inherited from mitk::TrackingDevice
TrackingDeviceData m_Data
 current device Data More...
 
bool m_StopTracking
 signal stop to tracking thread More...
 
itk::FastMutexLock::Pointer m_StopTrackingMutex
 mutex to control access to m_StopTracking More...
 
itk::FastMutexLock::Pointer m_TrackingFinishedMutex
 mutex to manage control flow of StopTracking() More...
 
itk::FastMutexLock::Pointer m_StateMutex
 mutex to control access to m_State More...
 
RotationMode m_RotationMode
 defines the rotation mode Standard or Transposed, Standard is default More...
 

Additional Inherited Members

- Public Types inherited from mitk::TrackingDevice
enum  RotationMode { RotationStandard, RotationTransposed }
 
enum  TrackingDeviceState { Setup, Ready, Tracking }
 

Detailed Description

superclass for specific MIRCOBIRD tracking Devices

Documentation This class connects to a Ascension Microbird tracking device. You can not add tools manually. All connected tools are discovered during OpenConnection() and added automatically. Retrieve them with GetTool(unsigned int toolNumber) and GetToolCount() after a call to OpenConnection().

Definition at line 44 of file mitkMicroBirdTrackingDevice.h.

Member Typedef Documentation

typedef std::vector<ToolType::Pointer> mitk::MicroBirdTrackingDevice::ToolContainerType
protected

Definition at line 98 of file mitkMicroBirdTrackingDevice.h.

Constructor & Destructor Documentation

mitk::MicroBirdTrackingDevice::MicroBirdTrackingDevice ( )
protected
mitk::MicroBirdTrackingDevice::~MicroBirdTrackingDevice ( )
protectedvirtual

Definition at line 54 of file mitkMicroBirdTrackingDevice.cpp.

Member Function Documentation

Pointer mitk::MicroBirdTrackingDevice::Clone ( ) const
bool mitk::MicroBirdTrackingDevice::CloseConnection ( )
virtual

Closes the connection.

Documentation

Implements mitk::TrackingDevice.

Definition at line 256 of file mitkMicroBirdTrackingDevice.cpp.

References Setup().

bool mitk::MicroBirdTrackingDevice::CompareError ( int  errorCode,
int  errorConstant 
)
protected

Definition at line 451 of file mitkMicroBirdTrackingDevice.cpp.

virtual const char* mitk::MicroBirdTrackingDevice::GetErrorMessage ( ) const
virtual

returns description of most recent error.

Documentation

mitk::MicroBirdTrackingDevice::ToolType * mitk::MicroBirdTrackingDevice::GetMicroBirdTool ( unsigned int  toolNumber)
protected

returns a tracking tool that contains positional information about one of the sensors

Documentation

Definition at line 431 of file mitkMicroBirdTrackingDevice.cpp.

mitk::TrackingTool * mitk::MicroBirdTrackingDevice::GetTool ( unsigned int  toolNumber)
virtual

returns a tracking tool that contains positional information about one of the sensors

Documentation

Definition at line 425 of file mitkMicroBirdTrackingDevice.cpp.

unsigned int mitk::MicroBirdTrackingDevice::GetToolCount ( ) const
virtual

returns a the number of attached sensors

Documentation

Implements mitk::TrackingDevice.

Definition at line 444 of file mitkMicroBirdTrackingDevice.cpp.

void mitk::MicroBirdTrackingDevice::HandleError ( int  errorCode)
protected

Definition at line 457 of file mitkMicroBirdTrackingDevice.cpp.

void mitk::MicroBirdTrackingDevice::InvalidateAll ( )
protectedvirtual

invalidates all tools (on stoptracking, closeconnection)

Definition at line 474 of file mitkMicroBirdTrackingDevice.cpp.

mitk::MicroBirdTrackingDevice::mitkClassMacro ( MicroBirdTrackingDevice  ,
TrackingDevice   
)
static Pointer mitk::MicroBirdTrackingDevice::New ( )
static
bool mitk::MicroBirdTrackingDevice::OpenConnection ( )
virtual

Builds up the connection (loads tools, initializes and enables them)

Documentation

Implements mitk::TrackingDevice.

Definition at line 75 of file mitkMicroBirdTrackingDevice.cpp.

References mitk::New(), and Setup().

virtual void mitk::MicroBirdTrackingDevice::SetErrorMessage ( const char *  _arg)
protectedvirtual
virtual void mitk::MicroBirdTrackingDevice::SetType ( TrackingDeviceType  _arg)
virtual

Set the type of the microBird Tracking Device because it can not yet handle this itself.

Documentation

bool mitk::MicroBirdTrackingDevice::StartTracking ( )
virtual

Start the tracking.

Documentation A new thread is created, which reads the position and orientation information of each tool and stores them inside the tools.

Implements mitk::TrackingDevice.

Definition at line 312 of file mitkMicroBirdTrackingDevice.cpp.

bool mitk::MicroBirdTrackingDevice::StopTracking ( )
virtual

here we use the superclass method.

Documentation

Reimplemented from mitk::TrackingDevice.

Definition at line 302 of file mitkMicroBirdTrackingDevice.cpp.

References mitk::TrackingDevice::StopTracking().

bool mitk::MicroBirdTrackingDevice::SwitchTransmitter ( bool  switchOn)
protected

Switches the transmitter on resp. off.

Definition at line 215 of file mitkMicroBirdTrackingDevice.cpp.

ITK_THREAD_RETURN_TYPE mitk::MicroBirdTrackingDevice::ThreadStartTracking ( void *  data)
staticprotected

Helper function, because the itk::MultiThreader can only start a new thread with a static member function.

Definition at line 287 of file mitkMicroBirdTrackingDevice.cpp.

References TrackTools().

void mitk::MicroBirdTrackingDevice::TrackTools ( )
protectedvirtual

tracks the position and orientation of all tools until StopTracking() is called.

Documentation This function should only be executed by a new thread (through StartTracking() and ThreadStartTracking())

Get tool (current sensor)

Definition at line 334 of file mitkMicroBirdTrackingDevice.cpp.

References mitk::InternalTrackingTool::SetDataValid(), mitk::InternalTrackingTool::SetOrientation(), mitk::InternalTrackingTool::SetPosition(), and mitk::InternalTrackingTool::SetTrackingError().

Referenced by ThreadStartTracking().

Member Data Documentation

AGC_MODE_TYPE mitk::MicroBirdTrackingDevice::m_agc
protected

Definition at line 138 of file mitkMicroBirdTrackingDevice.h.

bool mitk::MicroBirdTrackingDevice::m_agcModeBoth
protected

AGC (automatic gain control) mode flag.

Definition at line 137 of file mitkMicroBirdTrackingDevice.h.

std::string mitk::MicroBirdTrackingDevice::m_ErrorMessage
protected

Definition at line 124 of file mitkMicroBirdTrackingDevice.h.

double mitk::MicroBirdTrackingDevice::m_measurementRate
protected

Specifies the measurement rate - default set to maximum.

Definition at line 135 of file mitkMicroBirdTrackingDevice.h.

BOOL mitk::MicroBirdTrackingDevice::m_metric
protected

Specifies whether metric measurement is used.

Definition at line 134 of file mitkMicroBirdTrackingDevice.h.

itk::MultiThreader::Pointer mitk::MicroBirdTrackingDevice::m_MultiThreader
protected

Definition at line 126 of file mitkMicroBirdTrackingDevice.h.

Referenced by MicroBirdTrackingDevice().

double mitk::MicroBirdTrackingDevice::m_pl
protected

Specifies the power line frequency (Europe 50Hz, USA 60Hz)

Definition at line 136 of file mitkMicroBirdTrackingDevice.h.

SENSOR_CONFIGURATION* mitk::MicroBirdTrackingDevice::m_SensorConfig
protected

The sensor configuration - used to get and set the sensor properties.

Definition at line 132 of file mitkMicroBirdTrackingDevice.h.

SYSTEM_CONFIGURATION mitk::MicroBirdTrackingDevice::m_SystemConfig
protected

The system configuration - used to specify its use.

Definition at line 131 of file mitkMicroBirdTrackingDevice.h.

int mitk::MicroBirdTrackingDevice::m_ThreadID
protected

Definition at line 127 of file mitkMicroBirdTrackingDevice.h.

ToolContainerType mitk::MicroBirdTrackingDevice::m_Tools
protected

Definition at line 122 of file mitkMicroBirdTrackingDevice.h.

Referenced by MicroBirdTrackingDevice().

itk::FastMutexLock::Pointer mitk::MicroBirdTrackingDevice::m_ToolsMutex
protected

Definition at line 119 of file mitkMicroBirdTrackingDevice.h.

Referenced by MicroBirdTrackingDevice().

TRANSMITTER_CONFIGURATION* mitk::MicroBirdTrackingDevice::m_TransmitterConfig
protected

The transmitter configuration - used to get and set the transmitter properties.

Definition at line 133 of file mitkMicroBirdTrackingDevice.h.

DOUBLE_POSITION_QUATERNION_TIME_Q_RECORD * mitk::MicroBirdTrackingDevice::pRecord
protected

One tracking data record (quaternion orientation format)

Definition at line 130 of file mitkMicroBirdTrackingDevice.h.

Referenced by MicroBirdTrackingDevice().

DOUBLE_POSITION_QUATERNION_TIME_Q_RECORD mitk::MicroBirdTrackingDevice::record
protected

Definition at line 130 of file mitkMicroBirdTrackingDevice.h.

Referenced by MicroBirdTrackingDevice().


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