12 #ifndef CXDUMMYTOOL_H_ 13 #define CXDUMMYTOOL_H_ 15 #include "cxResourceExport.h" 50 return mProbeDefinition;
55 retval->setData(this->getProbeDefinition());
66 virtual void addXml(QDomNode& dataNode) {}
81 mProbeDefinition = probeDefinition;
86 mVideoSource = source;
91 if (source!=mVideoSource)
109 DummyToolThread(
int interval, QObject* parent=NULL) : QThread(parent), mInterval(interval)
111 this->setObjectName(
"org.custusx.resource.core.tracking.dummytool");
116 QTimer* timer =
new QTimer;
117 timer->start(mInterval);
118 connect(timer, SIGNAL(timeout()),
this, SIGNAL(ping()));
127 std::cout <<
"Thread Pong " << QDateTime::currentDateTime().toString(
"mm:ss:zzz").toStdString() << std::endl;
136 static ProbeDefinition createProbeDefinitionLinear(
double depth=40,
double width=50, Eigen::Array2i frameSize=Eigen::Array2i(80,40));
153 explicit DummyTool(
const QString& uid=
"dummytool");
155 virtual std::set<Type> getTypes()
const;
156 virtual void setType(Type);
158 virtual void setTransformSaveFile(
const QString& filename);
159 virtual bool getVisible()
const;
160 virtual QString getUid()
const;
161 virtual QString getName()
const;
163 virtual bool isCalibrated()
const;
170 mProbeDefinition = probeDefinition;
172 mProbe->setProbeDefinition(mProbeDefinition);
173 emit toolProbeSector();
178 mProbeDefinition = probe->getProbeDefinition();
179 emit toolProbeSector();
183 void startTracking(
int interval=33);
186 void setToolPositionMovement(
const std::vector<Transform3D>& positions);
188 std::vector<Transform3D> createToolPositionMovementTranslationOnly(
const DoubleBoundingBox3D& bb)
const;
189 std::vector<Transform3D> getToolPositionMovement();
191 void setVisible(
bool val);
199 static vtkPolyDataPtr createPolyData(
double h1,
double h2,
double r1,
double r2);
202 virtual void sendTransform();
206 void createPolyData();
212 QString mTransformSaveFileName;
214 std::vector<Transform3D> mTransforms;
216 static int mTransformCount;
218 std::set<Type> mTypes;
virtual void setProbeDefinition(ProbeDefinition probeDefinition)
virtual bool isValid() const
virtual QStringList getAvailableVideoSources()
Return a list of all available video source. The default is one with uid=='active'.
virtual void saveCurrentConfig(QString uid, QString name)
save current config to disk under ids (uid,name).
virtual void removeRTSource(VideoSourcePtr source)
virtual void addXml(QDomNode &dataNode)
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
double getMilliSecondsSinceEpoch()
virtual ProbeDefinition getProbeDefinition(QString uid="active") const
Return a ProbeDefinition for the given uid. Use 'active' to get the default.
virtual QString getConfigName(QString uid)
virtual void setActiveStream(QString uid)
virtual QStringList getConfigIdList() const
virtual QString getActiveStream() const
virtual ProbeSectorPtr getSector(QString uid="active")
boost::shared_ptr< Probe > ProbePtr
boost::shared_ptr< class DummyTool > DummyToolPtr
virtual VideoSourcePtr getRTSource(QString uid="active") const
Return a VideoSource for the given uid. Use 'active' to get the default stream.
boost::shared_ptr< class VideoSource > VideoSourcePtr
virtual QString getConfigId() const
Representation of a floating-point bounding box in 3D. The data are stored as {xmin,xmax,ymin,ymax,zmin,zmax}, in order to simplify communication with vtk.
virtual void parseXml(QDomNode &dataNode)
vtkSmartPointer< vtkPolyData > vtkPolyDataPtr
boost::shared_ptr< class ProbeSector > ProbeSectorPtr
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition of characteristics for an Ultrasound Probe Sector.
virtual QString getConfigurationPath() const
Utility functions for drawing an US Probe sector.
virtual void removeCurrentConfig()
remove the current config from disk
virtual void setSoundSpeedCompensationFactor(double val)
virtual void setRTSource(VideoSourcePtr source)
virtual void applyNewConfigurationWithId(QString uid)
Namespace for all CustusX production code.
virtual void setTemporalCalibration(double val)