39 #include <QApplication> 50 mBase(trackingService->getTrackingSystems().back()),
51 mTrackingService(trackingService),
52 mProjectionCenterline(projectionCenterline),
57 mTool = mTrackingService->getActiveTool();
58 this->onStateChanged();
67 std::vector<TrackingSystemServicePtr> trackingSystems = mTrackingService->getTrackingSystems();
68 for (
int i=0; i<trackingSystems.size(); i++)
69 if (trackingSystems[i]->
getUid() == trackingSystemName)
71 mBase = trackingSystems[i];
82 void TrackingSystemBronchoscopyService::onStateChanged()
84 std::vector<ToolPtr> tools = mBase->getTools();
86 for (
unsigned i=0; i<tools.size(); ++i)
88 if (tools[i] == mTool)
91 mTools.push_back(current);
94 mTools.push_back(tools[i]);
101 return mBase->getReference();
112 return mBase->getState();
117 mBase->setState(val);
122 mBase->setLoggingFolder(loggingFolder);
127 return mBase->getConfiguration();
virtual QString getUid() const
virtual Tool::State getState() const
boost::shared_ptr< class TrackingService > TrackingServicePtr
virtual void setLoggingFolder(QString loggingFolder)
ToolPtr getReference()
reference tool used by entire tracking service - NOTE: system fails if several TrackingSystemServices...
virtual void setState(const Tool::State val)
asynchronously request a state. Wait for signal stateChanged()
void stateChanged()
Reset time synchronization. Used for resetting time synchronization of incoming timestamps in OpenIGT...
boost::shared_ptr< class TrackerConfiguration > TrackerConfigurationPtr
TrackingSystemBronchoscopyService(TrackingServicePtr trackingService, BronchoscopePositionProjectionPtr projectionCenterline, ToolPtr tool=NULL)
virtual ~TrackingSystemBronchoscopyService()
virtual std::vector< ToolPtr > getTools()
virtual TrackerConfigurationPtr getConfiguration()
bool setTrackingSystem(QString trackingSystemName)
void setTool(ToolPtr tool)
boost::shared_ptr< class BronchoscopePositionProjection > BronchoscopePositionProjectionPtr
boost::shared_ptr< class BronchoscopyTool > BronchoscopyToolPtr
Namespace for all CustusX production code.
boost::shared_ptr< class Tool > ToolPtr