CustusX  15.8
An IGT application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 vtkPolyDataPtr getGraphicsPolyData () const
 get geometric 3D description More...
 
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 i allowed More...
 
virtual ProbePtr getProbe () const
 additional information if the tool represents an US Probe. Extends getProbeSector() More...
 
void setProbeSector (ProbeDefinition probeData)
 
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 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 ()
 
- 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...
 
virtual bool hasReferencePointWithId (int id)
 

Static Public Member Functions

static vtkPolyDataPtr createPolyData (double h1, double h2, double r1, double r2)
 
- Static Public Member Functions inherited from cx::Tool
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...
 
- Protected Attributes inherited from cx::ToolImpl
TimedTransformMapPtr mPositionHistory
 
Transform3D m_prMt
 the transform from the tool to the patient reference More...
 
TrackingPositionFilterPtr mTrackingPositionFilter
 
- 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 170 of file cxDummyTool.h.

Constructor & Destructor Documentation

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

Definition at line 89 of file cxDummyTool.cpp.

cx::DummyTool::~DummyTool ( )

Definition at line 107 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 226 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 349 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 394 of file cxDummyTool.cpp.

vtkPolyDataPtr cx::DummyTool::getGraphicsPolyData ( ) const
virtual

get geometric 3D description

Implements cx::Tool.

Definition at line 142 of file cxDummyTool.cpp.

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

Definition at line 184 of file cxDummyTool.h.

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

Implements cx::Tool.

Definition at line 159 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 186 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::Tool.

Definition at line 219 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 203 of file cxDummyTool.h.

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

Definition at line 122 of file cxDummyTool.cpp.

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

Implements cx::Tool.

Definition at line 112 of file cxDummyTool.cpp.

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

Implements cx::Tool.

Definition at line 155 of file cxDummyTool.cpp.

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

Implements cx::Tool.

Definition at line 151 of file cxDummyTool.cpp.

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

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

Implements cx::Tool.

Definition at line 176 of file cxDummyTool.cpp.

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

Definition at line 388 of file cxDummyTool.cpp.

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

Definition at line 190 of file cxDummyTool.h.

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

Definition at line 197 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 131 of file cxDummyTool.cpp.

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

Definition at line 117 of file cxDummyTool.cpp.

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

Definition at line 146 of file cxDummyTool.cpp.

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

Definition at line 136 of file cxDummyTool.cpp.

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

if available for this type, set visibility

Implements cx::Tool.

Definition at line 210 of file cxDummyTool.cpp.

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

Definition at line 163 of file cxDummyTool.cpp.

void cx::DummyTool::stopTracking ( )

Definition at line 200 of file cxDummyTool.cpp.


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