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 return mTrackingService->getFirstProbe();
103 return mTrackingService->getReferenceTool();
108 return mTrackingService->getManualTool();
113 return mTrackingService->getTools();
118 return mTrackingService->isPlaybackMode();
123 mTrackingService->setPlaybackMode(controller);
128 return mTrackingService->getSessionHistory(startTime, stopTime);
133 mTrackingService->runDummyTool(tool);
138 return mTrackingService->getConfiguration();
144 mTrackingService->installTrackingSystem(system);
149 mTrackingService->unInstallTrackingSystem(system);
154 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