Fraxinus  16.5.0-fx-rc9
An IGT application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cx::Tool Class Referenceabstract

Interface to a tool, i.e. a pointer, US probe or similar. More...

#include <cxTool.h>

Inheritance diagram for cx::Tool:
cx::ToolImpl cx::ToolNull cx::ToolProxy cx::DummyTool cx::ManualTool cx::OpenIGTLinkTool cx::PlaybackTool cx::ToolUsingIGSTK cx::ManualToolAdapter

Public Types

enum  State { tsNONE =0, tsCONFIGURED, tsINITIALIZED, tsTRACKING }
 
enum  Type {
  TOOL_NONE, TOOL_REFERENCE, TOOL_MANUAL, TOOL_POINTER,
  TOOL_US_PROBE, TOOL_MICROSCOPE
}
 

Signals

void toolTransformAndTimestamp (Transform3D matrix, double timestamp)
 
void toolVisible (bool visible)
 
void tooltipOffset (double offset)
 
void toolProbeSector ()
 
void tps (int)
 

Public Member Functions

 Tool (const QString &uid="", const QString &name="")
 
virtual ~Tool ()
 
virtual ToolPositionMetadata getMetadata () const =0
 
virtual const std::map< double,
ToolPositionMetadata > & 
getMetadataHistory ()=0
 
virtual std::set< TypegetTypes () const =0
 
virtual bool hasType (Type type) const
 
virtual vtkPolyDataPtr getGraphicsPolyData () const =0
 get geometric 3D description More...
 
virtual TimedTransformMapPtr getPositionHistory ()=0
 get historical positions More...
 
virtual bool getVisible () const =0
 
virtual bool isInitialized () const
 
virtual QString getUid () const =0
 
virtual QString getName () const =0
 
virtual bool isCalibrated () const =0
 a tool may not be calibrated, then no tracking i allowed More...
 
virtual Transform3D getCalibration_sMt () const =0
 get the calibration transform from tool space to sensor space (where the spheres or similar live) More...
 
virtual void setCalibration_sMt (Transform3D calibration)
 requests to use the calibration and replaces the tools calibration file More...
 
virtual ProbePtr getProbe () const
 additional information if the tool represents an US Probe. Extends getProbeSector() More...
 
virtual double getTimestamp () const =0
 latest valid timestamp for the position matrix. 0 means indeterminate (for f.ex. manual tools) More...
 
virtual void printSelf (std::ostream &os, Indent indent)
 dump internal debug data More...
 
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 std::map< int, Vector3DgetReferencePoints () const
 Get the optional reference points from this tool. More...
 
virtual bool hasReferencePointWithId (int id)
 
virtual TimedTransformMap getSessionHistory (double startTime, double stopTime)=0
 
virtual Transform3D get_prMt () const =0
 
virtual void resetTrackingPositionFilter (TrackingPositionFilterPtr filter)=0
 
virtual void set_prMt (const Transform3D &prMt, double timestamp=-1)=0
 if available for this type, set pos, ts<0 means use current time More...
 
virtual void setVisible (bool vis)=0
 if available for this type, set visibility More...
 
virtual bool isNull ()=0
 

Static Public Member Functions

static vtkPolyDataPtr createDefaultPolyDataCone ()
 
static ToolPtr getNullObject ()
 

Protected Attributes

QString mUid
 
QString mName
 

Detailed Description

Interface to a tool, i.e. a pointer, US probe or similar.

The tool position is defined in its own space (as given by the tool's transform) as follows:

  • the origin is the tool tip
    • the z axis points in the acting direction (us probe ray dir or pointing dir).
  • the y axis points to the left side of the tool.
  • This means that in the case of an optical tracking frame, the tracking spheres points in the negative x axis

Definition at line 82 of file cxTool.h.

Member Enumeration Documentation

Enumerates the state of the tool

Enumerator
tsNONE 

not available

tsCONFIGURED 

configured with basic info

tsINITIALIZED 

connected to hardware, if any, ready to use

tsTRACKING 

emitting tracking data

Definition at line 93 of file cxTool.h.

Enumerates the general type of tool.

Enumerator
TOOL_NONE 
TOOL_REFERENCE 

Reference tool.

TOOL_MANUAL 

Representation of a mouse/keyboard-controlled virtual tool.

TOOL_POINTER 

Navigation pointer. Pointing functionality such as tool offset.

TOOL_US_PROBE 

Ultrasond probe. The tool has a Probe subinterface with a sector and a video stream.

TOOL_MICROSCOPE 

A tool following the focus point of a microscope.

Definition at line 102 of file cxTool.h.

Constructor & Destructor Documentation

cx::Tool::Tool ( const QString &  uid = "",
const QString &  name = "" 
)

Definition at line 58 of file cxTool.cpp.

virtual cx::Tool::~Tool ( )
inlinevirtual

Definition at line 89 of file cxTool.h.

Member Function Documentation

vtkPolyDataPtr cx::Tool::createDefaultPolyDataCone ( )
static

Definition at line 41 of file cxTool.cpp.

virtual Transform3D cx::Tool::get_prMt ( ) const
pure virtual
virtual Transform3D cx::Tool::getCalibration_sMt ( ) const
pure virtual

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

Implemented in cx::DummyTool, cx::ToolUsingIGSTK, cx::OpenIGTLinkTool, cx::ManualTool, cx::PlaybackTool, cx::ToolProxy, cx::ManualToolAdapter, and cx::ToolNull.

virtual vtkPolyDataPtr cx::Tool::getGraphicsPolyData ( ) const
pure virtual
virtual ToolPositionMetadata cx::Tool::getMetadata ( ) const
pure virtual

Implemented in cx::ToolImpl, cx::ToolProxy, and cx::ToolNull.

virtual const std::map<double, ToolPositionMetadata>& cx::Tool::getMetadataHistory ( )
pure virtual

Implemented in cx::ToolImpl, cx::ToolProxy, and cx::ToolNull.

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

Implemented in cx::DummyTool, cx::ToolUsingIGSTK, cx::OpenIGTLinkTool, cx::ManualTool, cx::PlaybackTool, cx::ToolProxy, and cx::ToolNull.

ToolPtr cx::Tool::getNullObject ( )
static

Definition at line 65 of file cxTool.cpp.

virtual TimedTransformMapPtr cx::Tool::getPositionHistory ( )
pure virtual

get historical positions

Implemented in cx::PlaybackTool, cx::ToolProxy, cx::ToolImpl, and cx::ToolNull.

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

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

Reimplemented in cx::DummyTool, cx::ToolUsingIGSTK, cx::OpenIGTLinkTool, cx::PlaybackTool, cx::ToolProxy, cx::ManualToolAdapter, and cx::ToolNull.

Definition at line 136 of file cxTool.h.

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

Get the optional reference points from this tool.

Reimplemented in cx::DummyTool, cx::ToolUsingIGSTK, cx::ToolProxy, cx::ManualTool, cx::PlaybackTool, cx::ToolNull, and cx::ManualToolAdapter.

Definition at line 142 of file cxTool.h.

virtual TimedTransformMap cx::Tool::getSessionHistory ( double  startTime,
double  stopTime 
)
pure virtual
virtual double cx::Tool::getTimestamp ( ) const
pure virtual

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

Implemented in cx::DummyTool, cx::ToolUsingIGSTK, cx::OpenIGTLinkTool, cx::ToolProxy, cx::ManualTool, cx::PlaybackTool, and cx::ToolNull.

virtual double cx::Tool::getTooltipOffset ( ) const
inlinevirtual

get a virtual offset extending from the tool tip.

Reimplemented in cx::ToolUsingIGSTK, cx::OpenIGTLinkTool, cx::ToolProxy, cx::ManualToolAdapter, cx::PlaybackTool, cx::ToolNull, and cx::ToolImpl.

Definition at line 140 of file cxTool.h.

virtual std::set<Type> cx::Tool::getTypes ( ) const
pure virtual
virtual QString cx::Tool::getUid ( ) const
pure virtual
Returns
an unique id for this instance

Implemented in cx::DummyTool, cx::ToolUsingIGSTK, cx::OpenIGTLinkTool, cx::ManualTool, cx::PlaybackTool, cx::ToolProxy, and cx::ToolNull.

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

Implemented in cx::DummyTool, cx::ToolUsingIGSTK, cx::OpenIGTLinkTool, cx::ManualTool, cx::PlaybackTool, cx::ToolProxy, and cx::ToolNull.

virtual bool cx::Tool::hasReferencePointWithId ( int  id)
inlinevirtual

Reimplemented in cx::ToolUsingIGSTK, cx::PlaybackTool, cx::ToolProxy, and cx::ToolNull.

Definition at line 143 of file cxTool.h.

virtual bool cx::Tool::hasType ( Type  type) const
inlinevirtual
Returns
true is the tool has properties of the input type.

Definition at line 119 of file cxTool.h.

virtual bool cx::Tool::isCalibrated ( ) const
pure virtual

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

Implemented in cx::DummyTool, cx::ToolUsingIGSTK, cx::OpenIGTLinkTool, cx::ManualTool, cx::ToolProxy, cx::PlaybackTool, cx::ManualToolAdapter, and cx::ToolNull.

virtual bool cx::Tool::isInitialized ( ) const
inlinevirtual

Reimplemented in cx::ToolUsingIGSTK, cx::OpenIGTLinkTool, cx::PlaybackTool, cx::ToolProxy, and cx::ToolNull.

Definition at line 127 of file cxTool.h.

virtual bool cx::Tool::isNull ( )
pure virtual

Implemented in cx::ToolProxy, cx::ToolNull, and cx::ToolImpl.

virtual void cx::Tool::printSelf ( std::ostream &  os,
Indent  indent 
)
inlinevirtual

dump internal debug data

Reimplemented in cx::ToolProxy, and cx::ToolNull.

Definition at line 138 of file cxTool.h.

virtual void cx::Tool::resetTrackingPositionFilter ( TrackingPositionFilterPtr  filter)
pure virtual

Implemented in cx::ToolProxy, cx::ToolNull, and cx::ToolImpl.

virtual void cx::Tool::set_prMt ( const Transform3D prMt,
double  timestamp = -1 
)
pure virtual

if available for this type, set pos, ts<0 means use current time

Implemented in cx::ToolUsingIGSTK, cx::ToolProxy, cx::PlaybackTool, cx::ToolNull, cx::ToolImpl, and cx::ManualTool.

virtual void cx::Tool::setCalibration_sMt ( Transform3D  calibration)
inlinevirtual

requests to use the calibration and replaces the tools calibration file

Reimplemented in cx::ToolUsingIGSTK, cx::OpenIGTLinkTool, cx::ToolProxy, and cx::ToolNull.

Definition at line 134 of file cxTool.h.

virtual void cx::Tool::setTooltipOffset ( double  val)
inlinevirtual

set a virtual offset extending from the tool tip.

Reimplemented in cx::ToolUsingIGSTK, cx::OpenIGTLinkTool, cx::ToolProxy, cx::ManualToolAdapter, cx::PlaybackTool, cx::ToolNull, and cx::ToolImpl.

Definition at line 141 of file cxTool.h.

virtual void cx::Tool::setVisible ( bool  vis)
pure virtual

if available for this type, set visibility

Implemented in cx::DummyTool, cx::ToolUsingIGSTK, cx::OpenIGTLinkTool, cx::ToolProxy, cx::PlaybackTool, cx::ToolNull, and cx::ManualTool.

void cx::Tool::toolProbeSector ( )
signal
void cx::Tool::tooltipOffset ( double  offset)
signal
void cx::Tool::toolTransformAndTimestamp ( Transform3D  matrix,
double  timestamp 
)
signal
void cx::Tool::toolVisible ( bool  visible)
signal
void cx::Tool::tps ( int  )
signal

Member Data Documentation

QString cx::Tool::mName
protected

Definition at line 169 of file cxTool.h.

QString cx::Tool::mUid
protected

Definition at line 168 of file cxTool.h.


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