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()
26 boost::bind(&ToolProxy::onServiceAdded,
this, _1),
28 boost::bind(&ToolProxy::onServiceRemoved,
this, _1)
30 mServiceListener->open();
39 this->checkToolValidity();
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);
188 return mTool->isNull();
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
static TrackingServicePtr getNullObject()
boost::shared_ptr< Probe > ProbePtr
boost::shared_ptr< TimedTransformMap > TimedTransformMapPtr
Formatting class for debug printing of the ssc library.
Service providing tools and tracking systems.
vtkSmartPointer< vtkPolyData > vtkPolyDataPtr
Helper class for listening to services being added, modified and removed.
boost::shared_ptr< class TrackingPositionFilter > TrackingPositionFilterPtr
std::map< double, Transform3D > TimedTransformMap
Namespace for all CustusX production code.
boost::shared_ptr< class Tool > ToolPtr