21 #include <itkMutexLockHolder.h>
35 m_StopTracking(false),
67 itkDebugMacro(
"setting m_State to " << state);
80 MITK_WARN <<
"Rotation mode switching is not implemented for this device. Leaving it at mitk::TrackingDevice::RotationStandard";
94 MITK_ERROR <<
"No tracking device service found!";
113 if (this->GetState() == Tracking)
115 m_StopTrackingMutex->Lock();
116 m_StopTracking =
true;
117 m_StopTrackingMutex->Unlock();
119 m_TrackingFinishedMutex->Lock();
123 this->SetState(Ready);
124 m_TrackingFinishedMutex->Unlock();
132 unsigned int toolCount = this->GetToolCount();
133 for (
unsigned int i = 0; i < toolCount; ++i)
134 if (name == this->GetTool(i)->GetToolName())
135 return this->GetTool(i);
itk::FastMutexLock::Pointer m_TrackingFinishedMutex
mutex to manage control flow of StopTracking()
itk::MutexLockHolder< itk::FastMutexLock > MutexLockHolder
DataCollection - Class to facilitate loading/accessing structured data.
This class is a collection for information of all Tracking Device Types (derived from abstract Tracki...
TrackingDeviceState GetState() const
return current object state (Setup, Ready or Tracking)
virtual ~TrackingDevice()
virtual void SetRotationMode(RotationMode r)
TrackingDeviceData GetData() const
return device data
itk::FastMutexLock::Pointer m_StateMutex
mutex to control access to m_State
TrackingDeviceData GetFirstCompatibleDeviceDataForLine(TrackingDeviceType type)
virtual bool StopTracking()
stop retrieving tracking data from the device. stop retrieving tracking data from the device...
Interface for all Tracking Devices.
static IGTTimeStamp * GetInstance()
returns a pointer to the current instance of mitkTimeStamp
virtual bool IsDeviceInstalled()
virtual mitk::TrackingTool * GetToolByName(std::string name) const
Returns the tool with the given tool name.
std::string TrackingDeviceType
itk::FastMutexLock::Pointer m_StopTrackingMutex
mutex to control access to m_StopTracking
void Stop(itk::Object::Pointer device)
stops the time-acqusition
void SetData(TrackingDeviceData data)
set device type
void SetState(TrackingDeviceState state)
change object state
static ModuleContext * GetModuleContext()
Returns the module context of the calling module.
TrackingDeviceType GetType() const
Deprecated! Use the more specific getDeviceData instead. return device type identifier.
void SetType(TrackingDeviceType type)
Deprecated! Use the more specific setDeviceData instead. set device type.
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.