17#include <usModuleContext.h>
18#include <usGetModuleContext.h>
27 m_StopTracking(false),
58 return mitk::NavigationToolStorage::New();
64 std::lock_guard<std::mutex> lock(m_StateMutex);
71 itkDebugMacro(
"setting m_State to " << state);
73 std::lock_guard<std::mutex> lock(m_StateMutex);
84 MITK_WARN <<
"Rotation mode switching is not implemented for this device. Leaving it at mitk::TrackingDevice::RotationStandard";
93 us::ModuleContext* context = us::GetModuleContext();
98 MITK_ERROR <<
"No tracking device service found!";
117 if (this->GetState() == Tracking)
119 m_StopTrackingMutex.lock();
120 m_StopTracking =
true;
121 m_StopTrackingMutex.unlock();
123 m_TrackingFinishedMutex.lock();
127 this->SetState(Ready);
128 m_TrackingFinishedMutex.unlock();
136 unsigned int toolCount = this->GetToolCount();
137 for (
unsigned int i = 0; i < toolCount; ++i)
138 if (name == this->GetTool(i)->GetToolName())
139 return this->GetTool(i);
145 return this->GetData().Line;
static IGTTimeStamp * GetInstance()
returns a pointer to the current instance of mitkTimeStamp
void Stop(itk::Object::Pointer device)
stops the time-acqusition
This class is a collection for information of all Tracking Device Types (derived from abstract Tracki...
TrackingDeviceData GetFirstCompatibleDeviceDataForLine(TrackingDeviceType type)
Interface for all Tracking Devices.
TrackingDeviceData GetData() const
return device data
std::string GetTrackingDeviceName()
Convenient Method to get the Name of the Tracking Device. This is identical with GetData()....
void SetState(TrackingDeviceState state)
change object state
virtual mitk::TrackingTool * GetToolByName(std::string name) const
Returns the tool with the given tool name.
virtual mitk::NavigationToolStorage::Pointer AutoDetectTools()
TrackingDeviceState GetState() const
return current object state (Setup, Ready or Tracking)
TrackingDeviceType GetType() const
Deprecated! Use the more specific getData or GetTrackingDeviceName instead. return device type identi...
void SetType(TrackingDeviceType type)
Deprecated! Use the more specific setDeviceData instead. set device type.
virtual bool IsDeviceInstalled()
virtual bool StopTracking()
stop retrieving tracking data from the device. stop retrieving tracking data from the device....
virtual bool AutoDetectToolsAvailable()
virtual void SetRotationMode(RotationMode r)
virtual bool AddSingleToolIsAvailable()
~TrackingDevice() override
void SetData(TrackingDeviceData data)
set device type
std::string TrackingDeviceType