|
NorMIT-nav
2023.01.05-dev+develop.0da12
An IGT application
|
Go to the documentation of this file.
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);
197 virtual std::map<QString, Vector3D>
getReferencePoints()
const {
return std::map<QString, Vector3D>();};
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;
Definition of characteristics for an Ultrasound Probe Sector.
Representation of a floating-point bounding box in 3D. The data are stored as {xmin,...
virtual bool isValid() const
virtual void setActiveStream(QString uid)
virtual QString getConfigurationPath() const
virtual VideoSourcePtr getRTSource(QString uid="active") const
Return a VideoSource for the given uid. Use 'active' to get the default stream.
Namespace for all CustusX production code.
double getMilliSecondsSinceEpoch()
virtual QStringList getAvailableVideoSources()
Return a list of all available video source. The default is one with uid=='active'.
boost::shared_ptr< class VideoSource > VideoSourcePtr
virtual void setRTSource(VideoSourcePtr source)
boost::shared_ptr< class ProbeSector > ProbeSectorPtr
virtual void parseXml(QDomNode &dataNode)
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
virtual void setProbeDefinition(ProbeDefinition probeDefinition)
virtual void applyNewConfigurationWithId(QString uid)
virtual QStringList getConfigIdList() const
virtual void setTemporalCalibration(double val)
virtual void removeRTSource(VideoSourcePtr source)
virtual void addXml(QDomNode &dataNode)
virtual ProbeDefinition getProbeDefinition(QString uid="active") const
Return a ProbeDefinition for the given uid. Use 'active' to get the default.
vtkSmartPointer< vtkPolyData > vtkPolyDataPtr
virtual void removeCurrentConfig()
remove the current config from disk
Utility functions for drawing an US Probe sector.
virtual QString getConfigId() const
virtual QString getConfigName(QString uid)
virtual void setSoundSpeedCompensationFactor(double val)
virtual QString getActiveStream() const
virtual ProbeSectorPtr getSector(QString uid="active")
virtual void saveCurrentConfig(QString uid, QString name)
save current config to disk under ids (uid,name).
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
boost::shared_ptr< class DummyTool > DummyToolPtr
boost::shared_ptr< Probe > ProbePtr