33 #ifndef CXDUMMYTOOL_H_ 34 #define CXDUMMYTOOL_H_ 36 #include "cxResourceExport.h" 71 return mProbeDefinition;
76 retval->setData(this->getProbeDefinition());
87 virtual void addXml(QDomNode& dataNode) {}
102 mProbeDefinition = probeDefinition;
103 emit sectorChanged();
107 mVideoSource = source;
108 emit sectorChanged();
112 if (source!=mVideoSource)
114 mVideoSource.reset();
115 emit sectorChanged();
130 DummyToolThread(
int interval, QObject* parent=NULL) : QThread(parent), mInterval(interval)
132 this->setObjectName(
"org.custusx.resource.core.tracking.dummytool");
137 QTimer* timer =
new QTimer;
138 timer->start(mInterval);
139 connect(timer, SIGNAL(timeout()),
this, SIGNAL(ping()));
148 std::cout <<
"Thread Pong " << QDateTime::currentDateTime().toString(
"mm:ss:zzz").toStdString() << std::endl;
157 static ProbeDefinition createProbeDefinitionLinear(
double depth=40,
double width=50, Eigen::Array2i frameSize=Eigen::Array2i(80,40));
174 explicit DummyTool(
const QString& uid=
"dummytool");
176 virtual std::set<Type> getTypes()
const;
177 virtual void setType(Type);
180 virtual void setTransformSaveFile(
const QString& filename);
181 virtual bool getVisible()
const;
182 virtual QString getUid()
const;
183 virtual QString getName()
const;
185 virtual bool isCalibrated()
const;
192 mProbeDefinition = probeDefinition;
194 mProbe->setProbeDefinition(mProbeDefinition);
195 emit toolProbeSector();
200 mProbeDefinition = probe->getProbeDefinition();
201 emit toolProbeSector();
205 void startTracking(
int interval=33);
208 void setToolPositionMovement(
const std::vector<Transform3D>& positions);
210 std::vector<Transform3D> createToolPositionMovementTranslationOnly(
const DoubleBoundingBox3D& bb)
const;
211 std::vector<Transform3D> getToolPositionMovement();
213 void setVisible(
bool val);
221 static vtkPolyDataPtr createPolyData(
double h1,
double h2,
double r1,
double r2);
224 virtual void sendTransform();
228 void createPolyData();
235 QString mTransformSaveFileName;
237 std::vector<Transform3D> mTransforms;
239 static int mTransformCount;
241 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)