CustusX  20.03-rc1
An IGT application
cx::DummyTool Class Reference

Implementation of a Tool used for testing. More...

#include <cxDummyTool.h>

Inheritance diagram for cx::DummyTool:
cx::ToolImpl cx::Tool

Public Member Functions

 DummyTool (const QString &uid="dummytool")
 
 ~DummyTool ()
 
virtual std::set< TypegetTypes () const
 
virtual void setType (Type)
 
virtual void setTransformSaveFile (const QString &filename)
 
virtual bool getVisible () const
 
virtual QString getUid () const
 
virtual QString getName () const
 
virtual int getIndex () const
 
virtual bool isCalibrated () const
 a tool may not be calibrated, then no tracking is allowed More...
 
virtual ProbePtr getProbe () const
 additional information if the tool represents an US Probe. Extends getProbeSector() More...
 
void setProbeSector (ProbeDefinition probeDefinition)
 
void setProbeSector (ProbePtr probe)
 
virtual double getTimestamp () const
 latest valid timestamp for the position matrix. 0 means indeterminate (for f.ex. manual tools) More...
 
void startTracking (int interval=33)
 
void stopTracking ()
 
void setToolPositionMovement (const std::vector< Transform3D > &positions)
 
void setToolPositionMovementBB (const DoubleBoundingBox3D &bb)
 
std::vector< Transform3DcreateToolPositionMovementTranslationOnly (const DoubleBoundingBox3D &bb) const
 
std::vector< Transform3DgetToolPositionMovement ()
 
void set_prMt (const Transform3D &ptMt)
 
void setVisible (bool val)
 if available for this type, set visibility More...
 
virtual Transform3D getCalibration_sMt () const
 get the calibration transform from tool space to sensor space (where the spheres or similar live) More...
 
virtual std::map< int, Vector3DgetReferencePoints () const
 Get the optional reference points from this tool. More...
 
- Public Member Functions inherited from cx::ToolImpl
 ToolImpl (const QString &uid="", const QString &name="")
 
virtual ~ToolImpl ()
 
virtual TimedTransformMapPtr getPositionHistory ()
 get historical positions More...
 
virtual TimedTransformMap getSessionHistory (double startTime, double stopTime)
 
virtual Transform3D get_prMt () const
 
virtual ToolPositionMetadata getMetadata () const
 
virtual const std::map< double, ToolPositionMetadata > & getMetadataHistory ()
 
virtual double getTooltipOffset () const
 get a virtual offset extending from the tool tip. More...
 
virtual void setTooltipOffset (double val)
 set a virtual offset extending from the tool tip. More...
 
virtual void resetTrackingPositionFilter (TrackingPositionFilterPtr filter)
 
virtual bool isNull ()
 
virtual void addXml (QDomNode &dataNode)
 
virtual void parseXml (QDomNode &dataNode)
 
virtual vtkPolyDataPtr getGraphicsPolyData () const
 get geometric 3D description More...
 
virtual bool hasReferencePointWithId (int id)
 
- Public Member Functions inherited from cx::Tool
 Tool (const QString &uid="", const QString &name="")
 
virtual ~Tool ()
 
virtual bool hasType (Type type) const
 
virtual bool isInitialized () const
 
virtual void setCalibration_sMt (Transform3D calibration)
 requests to use the calibration and replaces the tools calibration file More...
 
virtual void printSelf (std::ostream &os, Indent indent)
 dump internal debug data More...
 

Static Public Member Functions

static vtkPolyDataPtr createPolyData (double h1, double h2, double r1, double r2)
 
- Static Public Member Functions inherited from cx::Tool
static vtkPolyDataPtr createDefaultPolyDataCone ()
 
static ToolPtr getNullObject ()
 

Additional Inherited Members

- Public Types inherited from cx::Tool
enum  State { tsNONE =0, tsCONFIGURED, tsINITIALIZED, tsTRACKING }
 
enum  Type {
  TOOL_NONE, TOOL_REFERENCE, TOOL_MANUAL, TOOL_POINTER,
  TOOL_US_PROBE, TOOL_MICROSCOPE
}
 
- Signals inherited from cx::Tool
void toolTransformAndTimestamp (Transform3D matrix, double timestamp)
 
void toolVisible (bool visible)
 
void tooltipOffset (double offset)
 
void toolProbeSector ()
 
void tps (int)
 
- Protected Member Functions inherited from cx::ToolImpl
virtual void set_prMt (const Transform3D &prMt, double timestamp)
 if available for this type, set pos, ts<0 means use current time More...
 
void createToolGraphic ()
 
virtual ToolFileParser::ToolInternalStructurePtr getToolFileToolStructure () const
 
- Protected Attributes inherited from cx::ToolImpl
TimedTransformMapPtr mPositionHistory
 
Transform3D m_prMt
 the transform from the tool to the patient reference More...
 
TrackingPositionFilterPtr mTrackingPositionFilter
 
std::map< double, ToolPositionMetadatamMetadata
 
vtkPolyDataPtr mPolyData
 the polydata used to represent the tool graphically More...
 
- Protected Attributes inherited from cx::Tool
QString mUid
 
QString mName
 

Detailed Description

Implementation of a Tool used for testing.

Can move in a specified path.

Date
Oct 30, 2008
Author
: Janne Beate Bakeng, SINTEF

Definition at line 149 of file cxDummyTool.h.

Constructor & Destructor Documentation

cx::DummyTool::DummyTool ( const QString &  uid = "dummytool")
explicit

Definition at line 68 of file cxDummyTool.cpp.

cx::DummyTool::~DummyTool ( )

Definition at line 86 of file cxDummyTool.cpp.

Member Function Documentation

vtkPolyDataPtr cx::DummyTool::createPolyData ( double  h1,
double  h2,
double  r1,
double  r2 
)
static

Create a dummy 3D representation with a butt tip Input is the height of the two segments, h1 and h2, and the radius of the two segmens, r1 and r2. Typical values is given in the class constructor (150,10,10,3).

Definition at line 201 of file cxDummyTool.cpp.

std::vector< Transform3D > cx::DummyTool::createToolPositionMovementTranslationOnly ( const DoubleBoundingBox3D bb) const

Create a test trajectory that moves within the given bb.

Definition at line 322 of file cxDummyTool.cpp.

Transform3D cx::DummyTool::getCalibration_sMt ( ) const
virtual

get the calibration transform from tool space to sensor space (where the spheres or similar live)

Implements cx::Tool.

Definition at line 367 of file cxDummyTool.cpp.

virtual int cx::DummyTool::getIndex ( ) const
inlinevirtual

Definition at line 162 of file cxDummyTool.h.

QString cx::DummyTool::getName ( ) const
virtual
Returns
a descriptive name for this instance

Implements cx::Tool.

Definition at line 134 of file cxDummyTool.cpp.

virtual ProbePtr cx::DummyTool::getProbe ( ) const
inlinevirtual

additional information if the tool represents an US Probe. Extends getProbeSector()

Reimplemented from cx::Tool.

Definition at line 164 of file cxDummyTool.h.

virtual std::map<int, Vector3D> cx::DummyTool::getReferencePoints ( ) const
inlinevirtual

Get the optional reference points from this tool.

Reimplemented from cx::ToolImpl.

Definition at line 197 of file cxDummyTool.h.

virtual double cx::DummyTool::getTimestamp ( ) const
inlinevirtual

latest valid timestamp for the position matrix. 0 means indeterminate (for f.ex. manual tools)

Implements cx::Tool.

Definition at line 181 of file cxDummyTool.h.

std::vector< Transform3D > cx::DummyTool::getToolPositionMovement ( )

Definition at line 101 of file cxDummyTool.cpp.

std::set< Tool::Type > cx::DummyTool::getTypes ( ) const
virtual

Reimplemented from cx::ToolImpl.

Definition at line 91 of file cxDummyTool.cpp.

QString cx::DummyTool::getUid ( ) const
virtual
Returns
an unique id for this instance

Implements cx::Tool.

Definition at line 130 of file cxDummyTool.cpp.

bool cx::DummyTool::getVisible ( ) const
virtual
Returns
the visibility status of the tool

Implements cx::Tool.

Definition at line 126 of file cxDummyTool.cpp.

bool cx::DummyTool::isCalibrated ( ) const
virtual

a tool may not be calibrated, then no tracking is allowed

Implements cx::Tool.

Definition at line 151 of file cxDummyTool.cpp.

void cx::DummyTool::set_prMt ( const Transform3D ptMt)

Definition at line 361 of file cxDummyTool.cpp.

void cx::DummyTool::setProbeSector ( ProbeDefinition  probeDefinition)
inline

Definition at line 168 of file cxDummyTool.h.

void cx::DummyTool::setProbeSector ( ProbePtr  probe)
inline

Definition at line 175 of file cxDummyTool.h.

void cx::DummyTool::setToolPositionMovement ( const std::vector< Transform3D > &  positions)

Use this to override the default movement pattern in the tool. The pattern

Definition at line 110 of file cxDummyTool.cpp.

void cx::DummyTool::setToolPositionMovementBB ( const DoubleBoundingBox3D bb)

Definition at line 96 of file cxDummyTool.cpp.

void cx::DummyTool::setTransformSaveFile ( const QString &  filename)
virtual

Definition at line 121 of file cxDummyTool.cpp.

void cx::DummyTool::setType ( Type  )
virtual

Definition at line 115 of file cxDummyTool.cpp.

void cx::DummyTool::setVisible ( bool  vis)
virtual

if available for this type, set visibility

Implements cx::Tool.

Definition at line 185 of file cxDummyTool.cpp.

void cx::DummyTool::startTracking ( int  interval = 33)

Definition at line 138 of file cxDummyTool.cpp.

void cx::DummyTool::stopTracking ( )

Definition at line 175 of file cxDummyTool.cpp.


The documentation for this class was generated from the following files: