|
NorMIT-nav
22.09
An IGT application
|
Go to the documentation of this file.
2 #include "boost/bind.hpp"
12 return boost::shared_ptr<ToolProxy>(
new ToolProxy(base, pluginContext));
15 ToolProxy::ToolProxy(
ToolPtr base, ctkPluginContext *pluginContext)
18 mPluginContext = pluginContext;
19 this->initServiceListener();
22 void ToolProxy::initServiceListener()
24 mServiceListener.reset(
new ServiceTrackerListener<TrackingService>(
26 boost::bind(&ToolProxy::onServiceAdded,
this, _1),
27 boost::function<
void (TrackingService*)>(),
28 boost::bind(&ToolProxy::onServiceRemoved,
this, _1)
30 mServiceListener->open();
33 void ToolProxy::onServiceAdded(TrackingService* service)
35 mTrackingService.reset(service, null_deleter());
39 this->checkToolValidity();
42 void ToolProxy::onServiceRemoved(TrackingService *service)
49 void ToolProxy::onStateChanged()
51 this->checkToolValidity();
54 void ToolProxy::checkToolValidity()
56 if (mTool != mTrackingService->getTool(mTool->getUid()))
58 std::cout <<
"disabling tool reference for " << mTool->getUid() <<
", [currently disabled]" << std::endl;
67 return mTool->getTypes();
72 return mTool->getGraphicsPolyData();
77 return mTool->getPositionHistory();
82 return mTool->getMetadata();
87 return mTool->getMetadataHistory();
92 return mTool->getVisible();
97 return mTool->isInitialized();
102 return mTool->getUid();
108 return mTool->getName();
113 return mTool->isCalibrated();
117 return mTool->getCalibration_sMt();
122 mTool->setCalibration_sMt(calibration);
127 return mTool->getProbe();
132 return mTool->getTimestamp();
137 mTool->printSelf(os, indent);
142 return mTool->getTooltipOffset();
147 mTool->setTooltipOffset(val);
152 return mTool->getReferencePoints();
157 return mTool->hasReferencePointWithId(
id);
162 return mTool->getSessionHistory(startTime, stopTime);
167 return mTool->get_prMt();
172 mTool->resetTrackingPositionFilter(filter);
177 mTool->set_prMt(prMt, timestamp);
182 mTool->setVisible(vis);
187 return mTool->getBaseTool();
193 return mTool->isNull();
Namespace for all CustusX production code.
static TrackingServicePtr getNullObject()
boost::shared_ptr< class TrackingPositionFilter > TrackingPositionFilterPtr
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
std::map< double, Transform3D > TimedTransformMap
boost::shared_ptr< TimedTransformMap > TimedTransformMapPtr
vtkSmartPointer< vtkPolyData > vtkPolyDataPtr
boost::shared_ptr< class Tool > ToolPtr
Formatting class for debug printing of the ssc library.
boost::shared_ptr< Probe > ProbePtr