14 #include <boost/bind.hpp> 15 #include <ctkPluginContext.h> 28 mPluginContext(pluginContext),
31 this->initServiceListener();
34 void TrackingServiceProxy::initServiceListener()
38 boost::bind(&TrackingServiceProxy::onServiceAdded,
this, _1),
40 boost::bind(&TrackingServiceProxy::onServiceRemoved,
this, _1)
42 mServiceListener->open();
68 return mTrackingService->isNull();
73 return mTrackingService->getState();
78 mTrackingService->setState(val);
83 return mTrackingService->getTool(uid);
88 return mTrackingService->getActiveTool();
93 mTrackingService->setActiveTool(uid);
98 mTrackingService->clearActiveTool();
103 return mTrackingService->getFirstProbe();
108 return mTrackingService->getReferenceTool();
113 return mTrackingService->getManualTool();
118 return mTrackingService->getTools();
123 return mTrackingService->isPlaybackMode();
128 mTrackingService->setPlaybackMode(controller);
133 return mTrackingService->getSessionHistory(startTime, stopTime);
138 mTrackingService->runDummyTool(tool);
143 return mTrackingService->getConfigurations();
153 return mTrackingService->getConfiguration();
158 mTrackingService->setCurrentTrackingSystemImplementation(trackingSystemImplementation);
163 return mTrackingService->getCurrentTrackingSystemImplementation();
168 mTrackingService->installTrackingSystem(system);
173 mTrackingService->unInstallTrackingSystem(system);
178 return mTrackingService->getTrackingSystems();
183 return mTrackingService->resetTimeSynchronization();
virtual void installTrackingSystem(TrackingSystemServicePtr system)
virtual ToolPtr getActiveTool()
get the tool that has higest priority when tracking
virtual TrackerConfigurationPtr getConfiguration()
std::map< ToolPtr, TimedTransformMap > SessionToolHistoryMap
boost::shared_ptr< class TrackingService > TrackingServicePtr
virtual void setActiveTool(const QString &uid)
set a tool to be the active tool
virtual bool isPlaybackMode() const
virtual void setCurrentTrackingSystemImplementation(QString trackingSystemImplementation)
virtual void setState(const Tool::State val)
static TrackingServicePtr getNullObject()
static TrackingServicePtr create(ctkPluginContext *pluginContext)
virtual ToolPtr getReferenceTool() const
tool used as patient reference
boost::shared_ptr< class PlaybackTime > PlaybackTimePtr
virtual std::vector< TrackerConfigurationPtr > getConfigurations()
virtual QString getCurrentTrackingSystemImplementation()
virtual void unInstallTrackingSystem(TrackingSystemServicePtr system)
boost::shared_ptr< class DummyTool > DummyToolPtr
boost::shared_ptr< class TrackerConfiguration > TrackerConfigurationPtr
void activeToolChanged(const QString &uId)
TrackingServiceProxy(ctkPluginContext *pluginContext)
virtual void clearActiveTool()
Deselect active tool.
virtual SessionToolHistoryMap getSessionHistory(double startTime, double stopTime)
virtual ToolPtr getFirstProbe()
get the active probe or any if none active
Service providing tools and tracking systems.
Helper class for listening to services being added, modified and removed.
std::map< QString, ToolPtr > ToolMap
virtual ToolPtr getTool(const QString &uid)
get a tool
virtual ToolPtr getManualTool()
a mouse-controllable virtual tool that is available even when not tracking.
virtual void runDummyTool(DummyToolPtr tool)
virtual ToolMap getTools()
get configured and initialized tools
virtual void resetTimeSynchronization()
Reset time synchronization. Used for resetting time synchronization of incoming timestamps in OpenIGT...
virtual void setPlaybackMode(PlaybackTimePtr controller)
virtual std::vector< TrackingSystemServicePtr > getTrackingSystems()
virtual Tool::State getState() const
Namespace for all CustusX production code.
boost::shared_ptr< class Tool > ToolPtr
boost::shared_ptr< class TrackingSystemService > TrackingSystemServicePtr