Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
superclass for specific MIRCOBIRD tracking Devices More...
#include <mitkMicroBirdTrackingDevice.h>
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 TrackingTool * | GetTool (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... | |
![]() | |
mitkClassMacroItkParent (TrackingDevice, itk::Object) | |
virtual TrackingTool * | GetTool (unsigned int toolNumber) const =0 |
Return tool with index toolNumber. More... | |
virtual mitk::TrackingTool * | GetToolByName (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 getData or GetTrackingDeviceName instead. return device type identifier. More... | |
void | SetType (TrackingDeviceType type) |
Deprecated! Use the more specific setDeviceData instead. set device type. More... | |
std::string | GetTrackingDeviceName () |
Convenient Method to get the Name of the Tracking Device. This is identical with GetData().Line and can be used to compare with TrackingDeviceTypeInformation::GetTrackingDeviceName() to check if you have a specific device. More... | |
TrackingDeviceData | GetData () const |
return device data More... | |
void | SetData (TrackingDeviceData data) |
set device type More... | |
virtual bool | IsDeviceInstalled () |
virtual bool | AutoDetectToolsAvailable () |
virtual bool | AddSingleToolIsAvailable () |
virtual mitk::NavigationToolStorage::Pointer | AutoDetectTools () |
Static Public Member Functions | |
static Pointer | New () |
Protected Types | |
typedef TrackingTool | ToolType |
typedef std::vector< ToolType::Pointer > | ToolContainerType |
Protected Member Functions | |
void | HandleError (int errorCode) |
bool | CompareError (int errorCode, int errorConstant) |
MicroBirdTrackingDevice () | |
virtual | ~MicroBirdTrackingDevice () |
ToolType * | GetMicroBirdTool (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) |
![]() | |
void | SetState (TrackingDeviceState state) |
change object state More... | |
TrackingDevice () | |
~TrackingDevice () override | |
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 |
![]() | |
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 | |
![]() | |
enum | RotationMode { RotationStandard, RotationTransposed } |
enum | TrackingDeviceState { Setup, Ready, Tracking } |
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 40 of file mitkMicroBirdTrackingDevice.h.
|
protected |
Definition at line 94 of file mitkMicroBirdTrackingDevice.h.
|
protected |
Definition at line 93 of file mitkMicroBirdTrackingDevice.h.
|
protected |
Definition at line 20 of file mitkMicroBirdTrackingDevice.cpp.
References mitk::TrackingDevice::m_Data, m_MultiThreader, m_Tools, m_ToolsMutex, pRecord, and record.
|
protectedvirtual |
Definition at line 50 of file mitkMicroBirdTrackingDevice.cpp.
References CloseConnection(), m_MultiThreader, m_SensorConfig, m_ThreadID, m_ToolsMutex, m_TransmitterConfig, and StopTracking().
Pointer mitk::MicroBirdTrackingDevice::Clone | ( | ) | const |
|
virtual |
Closes the connection.
Documentation
Implements mitk::TrackingDevice.
Definition at line 252 of file mitkMicroBirdTrackingDevice.cpp.
References CompareError(), HandleError(), m_SensorConfig, m_TransmitterConfig, SetErrorMessage(), mitk::TrackingDevice::SetState(), mitk::TrackingDevice::Setup, and SwitchTransmitter().
Referenced by ~MicroBirdTrackingDevice().
|
protected |
Definition at line 447 of file mitkMicroBirdTrackingDevice.cpp.
Referenced by CloseConnection(), HandleError(), OpenConnection(), SwitchTransmitter(), and TrackTools().
|
virtual |
returns description of most recent error.
Documentation
|
protected |
returns a tracking tool that contains positional information about one of the sensors
Documentation
Definition at line 427 of file mitkMicroBirdTrackingDevice.cpp.
References m_Tools, and m_ToolsMutex.
Referenced by GetTool(), and TrackTools().
|
virtual |
returns a tracking tool that contains positional information about one of the sensors
Documentation
Definition at line 421 of file mitkMicroBirdTrackingDevice.cpp.
References GetMicroBirdTool().
|
virtual |
returns a the number of attached sensors
Documentation
Implements mitk::TrackingDevice.
Definition at line 440 of file mitkMicroBirdTrackingDevice.cpp.
References m_Tools, and m_ToolsMutex.
|
protected |
Definition at line 453 of file mitkMicroBirdTrackingDevice.cpp.
References CompareError(), and SetErrorMessage().
Referenced by CloseConnection(), OpenConnection(), SwitchTransmitter(), and TrackTools().
|
protectedvirtual |
invalidates all tools (on stoptracking, closeconnection)
Definition at line 470 of file mitkMicroBirdTrackingDevice.cpp.
References m_Tools, and m_ToolsMutex.
Referenced by StopTracking().
mitk::MicroBirdTrackingDevice::mitkClassMacro | ( | MicroBirdTrackingDevice | , |
TrackingDevice | |||
) |
|
static |
|
virtual |
Builds up the connection (loads tools, initializes and enables them)
Documentation
Implements mitk::TrackingDevice.
Definition at line 71 of file mitkMicroBirdTrackingDevice.cpp.
References CompareError(), mitk::TrackingDevice::GetState(), HandleError(), m_agc, m_agcModeBoth, m_measurementRate, m_metric, m_pl, m_SensorConfig, m_SystemConfig, m_Tools, m_ToolsMutex, m_TransmitterConfig, mitk::TrackingTool::New(), mitk::TrackingDevice::Ready, SetErrorMessage(), mitk::TrackingDevice::SetState(), mitk::TrackingDevice::Setup, and SwitchTransmitter().
|
protectedvirtual |
Referenced by CloseConnection(), HandleError(), and OpenConnection().
|
virtual |
Set the type of the microBird Tracking Device because it can not yet handle this itself.
Documentation
|
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 308 of file mitkMicroBirdTrackingDevice.cpp.
References mitk::TrackingDevice::GetState(), m_MultiThreader, mitk::TrackingDevice::m_StopTracking, mitk::TrackingDevice::m_StopTrackingMutex, m_ThreadID, mitk::TrackingDevice::m_TrackingFinishedMutex, mitk::TrackingDevice::Ready, mitk::TrackingDevice::SetState(), SwitchTransmitter(), ThreadStartTracking(), and mitk::TrackingDevice::Tracking.
|
virtual |
here we use the superclass method.
Documentation
Reimplemented from mitk::TrackingDevice.
Definition at line 298 of file mitkMicroBirdTrackingDevice.cpp.
References InvalidateAll(), mitk::TrackingDevice::StopTracking(), and SwitchTransmitter().
Referenced by ~MicroBirdTrackingDevice().
|
protected |
Switches the transmitter on resp. off.
Definition at line 211 of file mitkMicroBirdTrackingDevice.cpp.
References CompareError(), HandleError(), m_SystemConfig, and m_TransmitterConfig.
Referenced by CloseConnection(), OpenConnection(), StartTracking(), and StopTracking().
|
staticprotected |
Helper function, because the itk::MultiThreader can only start a new thread with a static member function.
Definition at line 283 of file mitkMicroBirdTrackingDevice.cpp.
References TrackTools().
Referenced by StartTracking().
|
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 330 of file mitkMicroBirdTrackingDevice.cpp.
References CompareError(), GetMicroBirdTool(), mitk::TrackingDevice::GetState(), HandleError(), m_SensorConfig, mitk::TrackingDevice::m_StopTracking, mitk::TrackingDevice::m_StopTrackingMutex, m_SystemConfig, mitk::TrackingDevice::m_TrackingFinishedMutex, pRecord, record, mitk::TrackingTool::SetDataValid(), mitk::TrackingTool::SetOrientation(), mitk::TrackingTool::SetPosition(), mitk::TrackingTool::SetTrackingError(), and mitk::TrackingDevice::Tracking.
Referenced by ThreadStartTracking().
|
protected |
Definition at line 134 of file mitkMicroBirdTrackingDevice.h.
Referenced by OpenConnection().
|
protected |
AGC (automatic gain control) mode flag.
Definition at line 133 of file mitkMicroBirdTrackingDevice.h.
Referenced by OpenConnection().
|
protected |
Definition at line 120 of file mitkMicroBirdTrackingDevice.h.
|
protected |
Specifies the measurement rate - default set to maximum.
Definition at line 131 of file mitkMicroBirdTrackingDevice.h.
Referenced by OpenConnection().
|
protected |
Specifies whether metric measurement is used.
Definition at line 130 of file mitkMicroBirdTrackingDevice.h.
Referenced by OpenConnection().
|
protected |
Definition at line 122 of file mitkMicroBirdTrackingDevice.h.
Referenced by MicroBirdTrackingDevice(), StartTracking(), and ~MicroBirdTrackingDevice().
|
protected |
Specifies the power line frequency (Europe 50Hz, USA 60Hz)
Definition at line 132 of file mitkMicroBirdTrackingDevice.h.
Referenced by OpenConnection().
|
protected |
The sensor configuration - used to get and set the sensor properties.
Definition at line 128 of file mitkMicroBirdTrackingDevice.h.
Referenced by CloseConnection(), OpenConnection(), TrackTools(), and ~MicroBirdTrackingDevice().
|
protected |
The system configuration - used to specify its use.
Definition at line 127 of file mitkMicroBirdTrackingDevice.h.
Referenced by OpenConnection(), SwitchTransmitter(), and TrackTools().
|
protected |
Definition at line 123 of file mitkMicroBirdTrackingDevice.h.
Referenced by StartTracking(), and ~MicroBirdTrackingDevice().
|
protected |
Definition at line 118 of file mitkMicroBirdTrackingDevice.h.
Referenced by GetMicroBirdTool(), GetToolCount(), InvalidateAll(), MicroBirdTrackingDevice(), and OpenConnection().
|
protected |
Definition at line 115 of file mitkMicroBirdTrackingDevice.h.
Referenced by GetMicroBirdTool(), GetToolCount(), InvalidateAll(), MicroBirdTrackingDevice(), OpenConnection(), and ~MicroBirdTrackingDevice().
|
protected |
The transmitter configuration - used to get and set the transmitter properties.
Definition at line 129 of file mitkMicroBirdTrackingDevice.h.
Referenced by CloseConnection(), OpenConnection(), SwitchTransmitter(), and ~MicroBirdTrackingDevice().
|
protected |
One tracking data record (quaternion orientation format)
Definition at line 126 of file mitkMicroBirdTrackingDevice.h.
Referenced by MicroBirdTrackingDevice(), and TrackTools().
|
protected |
Definition at line 126 of file mitkMicroBirdTrackingDevice.h.
Referenced by MicroBirdTrackingDevice(), and TrackTools().