39 #include <QApplication> 50 mTrackingService(trackingService),
51 mProjectionCenterline(projectionCenterline),
54 mBase = this->getIGSTKTrackingSystemService();
58 mTool = mTrackingService->getActiveTool();
59 this->onStateChanged();
68 std::vector<TrackingSystemServicePtr> trackingSystems = mTrackingService->getTrackingSystems();
69 for (
int i=0; i<trackingSystems.size(); i++)
70 if (trackingSystems[i]->
getUid() == trackingSystemName)
72 mBase = trackingSystems[i];
73 this->onStateChanged();
81 std::vector<TrackingSystemServicePtr> trackingSystems = mTrackingService->getTrackingSystems();
82 for (
unsigned i = 0; i < trackingSystems.size(); ++i)
84 if(trackingSystems[i]->
getUid() ==
"org.custusx.core.tracking.system.igstk")
85 return trackingSystems[i];
95 void TrackingSystemBronchoscopyService::onStateChanged()
97 std::vector<ToolPtr> tools = mBase->getTools();
99 for (
unsigned i=0; i<tools.size(); ++i)
101 if (tools[i] == mTool)
104 mTools.push_back(current);
107 mTools.push_back(tools[i]);
114 return mBase->getReference();
125 return mBase->getState();
130 mBase->setState(val);
135 mBase->setLoggingFolder(loggingFolder);
140 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
boost::shared_ptr< class TrackingSystemService > TrackingSystemServicePtr