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];
72 this->onStateChanged();
83 void TrackingSystemBronchoscopyService::onStateChanged()
85 std::vector<ToolPtr> tools = mBase->getTools();
87 for (
unsigned i=0; i<tools.size(); ++i)
89 if (tools[i] == mTool)
92 mTools.push_back(current);
95 mTools.push_back(tools[i]);
102 return mBase->getReference();
113 return mBase->getState();
118 mBase->setState(val);
123 mBase->setLoggingFolder(loggingFolder);
128 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