35 #include <boost/bind.hpp> 36 #include <ctkPluginContext.h> 49 mPluginContext(pluginContext),
52 this->initServiceListener();
55 void TrackingServiceProxy::initServiceListener()
59 boost::bind(&TrackingServiceProxy::onServiceAdded,
this, _1),
61 boost::bind(&TrackingServiceProxy::onServiceRemoved,
this, _1)
63 mServiceListener->open();
89 return mTrackingService->isNull();
94 return mTrackingService->getState();
99 mTrackingService->setState(val);
104 return mTrackingService->getTool(uid);
109 return mTrackingService->getActiveTool();
114 mTrackingService->setActiveTool(uid);
119 return mTrackingService->getFirstProbe();
124 return mTrackingService->getReferenceTool();
129 return mTrackingService->getManualTool();
134 return mTrackingService->getTools();
139 return mTrackingService->isPlaybackMode();
144 mTrackingService->setPlaybackMode(controller);
149 return mTrackingService->getSessionHistory(startTime, stopTime);
154 mTrackingService->runDummyTool(tool);
159 return mTrackingService->getConfiguration();
165 mTrackingService->installTrackingSystem(system);
170 mTrackingService->unInstallTrackingSystem(system);
175 return mTrackingService->getTrackingSystems();
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 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 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 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 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