Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
An object of this class represents the MicronTracker device. You can add tools to this device, then open the connection and start tracking. The tracking device will then continuously update the tool coordinates. More...
#include <mitkClaronTrackingDevice.h>
Public Member Functions | |
mitkClassMacro (ClaronTrackingDevice, TrackingDevice) | |
Pointer | Clone () const |
virtual bool | IsDeviceInstalled () override |
virtual bool | StartTracking () override |
Starts the tracking. More... | |
virtual bool | StopTracking () override |
Stops the tracking. More... | |
virtual bool | OpenConnection () override |
Opens the connection to the device. This have to be done before the tracking is started. More... | |
virtual bool | CloseConnection () override |
Closes the connection and clears all resources. More... | |
virtual unsigned int | GetToolCount () const override |
TrackingTool * | GetTool (unsigned int toolNumber) const override |
mitk::TrackingTool * | AddTool (const char *toolName, const char *fileName) |
Create a new Claron tool with toolName and fileName and add it to the list of tools. More... | |
bool | IsMicronTrackerInstalled () |
virtual void | SetCalibrationDir (std::string _arg) |
Sets the directory where the calibration file of the MicronTracker can be found. More... | |
virtual std::string | GetCalibrationDir () |
Gets the current calibration directory. More... | |
Public Member Functions inherited from mitk::TrackingDevice | |
mitkClassMacroItkParent (TrackingDevice, itk::Object) | |
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 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... | |
Static Public Member Functions | |
static Pointer | New () |
Protected Member Functions | |
ClaronTrackingDevice () | |
~ClaronTrackingDevice () | |
bool | InternalAddTool (ClaronTool::Pointer tool) |
Adds a tool to the tracking device. More... | |
void | TrackTools () |
This method tracks tools as long as the variable m_Mode is set to "Tracking". Tracking tools means grabbing frames from the camera an updating the tools. More... | |
std::vector< ClaronTool::Pointer > | DetectTools () |
Automatically detects tools in field of measurement of the tracking device. Tools can only be detected if their calibration file is availiable in the directory for calibration files. More... | |
std::vector< ClaronTool::Pointer > | GetAllTools () |
ClaronInterface * | GetDevice () |
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) |
Protected Attributes | |
std::vector< ClaronTool::Pointer > | m_AllTools |
vector holding all tools More... | |
ClaronInterface::Pointer | m_Device |
represents the interface to the tracking hardware More... | |
itk::MultiThreader::Pointer | m_MultiThreader |
int | m_ThreadID |
std::string | m_CalibrationDir |
The directory where the camera calibration files can be found. More... | |
std::string | m_ToolfilesDir |
The directory where the tool calibration files can be found. More... | |
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 } |
An object of this class represents the MicronTracker device. You can add tools to this device, then open the connection and start tracking. The tracking device will then continuously update the tool coordinates.
Documentation:
Definition at line 42 of file mitkClaronTrackingDevice.h.
|
protected |
Definition at line 30 of file mitkClaronTrackingDevice.cpp.
References mitk::MicronTrackerTypeInformation::GetDeviceDataMicronTrackerH40(), m_CalibrationDir, mitk::TrackingDevice::m_Data, m_Device, m_MultiThreader, m_ThreadID, m_ToolfilesDir, mitk::New(), and mitk::ClaronInterface::New().
|
protected |
Definition at line 66 of file mitkClaronTrackingDevice.cpp.
mitk::TrackingTool * mitk::ClaronTrackingDevice::AddTool | ( | const char * | toolName, |
const char * | fileName | ||
) |
Create a new Claron tool with toolName and fileName and add it to the list of tools.
This method will create a new ClaronTool object, load the tool definition file fileName, set the tool name toolName and then add it to the list of tools. It returns a pointer of type mitk::TrackingTool to the tool that can be used to read tracking data from it. This is the only way to add tools to ClaronTrackingDevice.
Definition at line 71 of file mitkClaronTrackingDevice.cpp.
References mitk::ClaronTool::New().
Pointer mitk::ClaronTrackingDevice::Clone | ( | ) | const |
|
overridevirtual |
Closes the connection and clears all resources.
Implements mitk::TrackingDevice.
Definition at line 198 of file mitkClaronTrackingDevice.cpp.
References Setup().
|
protected |
Automatically detects tools in field of measurement of the tracking device. Tools can only be detected if their calibration file is availiable in the directory for calibration files.
Definition at line 92 of file mitkClaronTrackingDevice.cpp.
References mitk::ClaronTool::New().
|
protected |
Definition at line 220 of file mitkClaronTrackingDevice.cpp.
|
virtual |
Gets the current calibration directory.
|
protected |
Definition at line 214 of file mitkClaronTrackingDevice.cpp.
|
overridevirtual |
toolNumber | The number of the tool which should be given back. |
Implements mitk::TrackingDevice.
Definition at line 160 of file mitkClaronTrackingDevice.cpp.
|
overridevirtual |
Implements mitk::TrackingDevice.
Definition at line 154 of file mitkClaronTrackingDevice.cpp.
|
protected |
Adds a tool to the tracking device.
tool | The tool which will be added. |
Definition at line 85 of file mitkClaronTrackingDevice.cpp.
|
overridevirtual |
Reimplemented from mitk::TrackingDevice.
Definition at line 59 of file mitkClaronTrackingDevice.cpp.
References mitk::ClaronInterface::New().
bool mitk::ClaronTrackingDevice::IsMicronTrackerInstalled | ( | ) |
Definition at line 309 of file mitkClaronTrackingDevice.cpp.
mitk::ClaronTrackingDevice::mitkClassMacro | ( | ClaronTrackingDevice | , |
TrackingDevice | |||
) |
|
static |
|
overridevirtual |
Opens the connection to the device. This have to be done before the tracking is started.
mitk::IGTHardwareException | Throws an exception if there is an error during open connection. |
Implements mitk::TrackingDevice.
Definition at line 169 of file mitkClaronTrackingDevice.cpp.
References mitkThrowException, mitk::ClaronInterface::New(), and Setup().
|
virtual |
Sets the directory where the calibration file of the MicronTracker can be found.
|
overridevirtual |
Starts the tracking.
mitk::IGTHardwareException | Throws an exception if there is an error during start tracking. |
Implements mitk::TrackingDevice.
Definition at line 108 of file mitkClaronTrackingDevice.cpp.
References mitk::IGTTimeStamp::GetInstance(), mitkThrowException, and mitk::IGTTimeStamp::Start().
|
overridevirtual |
Stops the tracking.
Reimplemented from mitk::TrackingDevice.
Definition at line 145 of file mitkClaronTrackingDevice.cpp.
|
staticprotected |
Definition at line 315 of file mitkClaronTrackingDevice.cpp.
References TrackTools().
|
protected |
This method tracks tools as long as the variable m_Mode is set to "Tracking". Tracking tools means grabbing frames from the camera an updating the tools.
mitk::IGTHardwareException | Throws an exception if there is an error during tracking of tools. |
Definition at line 226 of file mitkClaronTrackingDevice.cpp.
References mitk::IGTTimeStamp::GetInstance(), and mitkThrowException.
Referenced by ThreadStartTracking().
|
protected |
vector holding all tools
Definition at line 158 of file mitkClaronTrackingDevice.h.
|
protected |
The directory where the camera calibration files can be found.
Definition at line 164 of file mitkClaronTrackingDevice.h.
Referenced by ClaronTrackingDevice().
|
protected |
represents the interface to the tracking hardware
Definition at line 159 of file mitkClaronTrackingDevice.h.
Referenced by ClaronTrackingDevice().
|
protected |
Definition at line 160 of file mitkClaronTrackingDevice.h.
Referenced by ClaronTrackingDevice().
|
protected |
Definition at line 161 of file mitkClaronTrackingDevice.h.
Referenced by ClaronTrackingDevice().
|
protected |
The directory where the tool calibration files can be found.
Definition at line 166 of file mitkClaronTrackingDevice.h.
Referenced by ClaronTrackingDevice().