NorMIT-nav  2023.01.05-dev+develop.0da12
An IGT application
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::BronchoscopyTool 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 is 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 double getTimestamp () const =0
 latest valid timestamp for the position matrix. 0 means indeterminate (for f.ex. manual tools) More...
 
virtual bool hasReferencePointWithId (QString 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 ToolPtr getBaseTool ()=0
 
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 61 of file cxTool.h.

Member Enumeration Documentation

◆ State

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 72 of file cxTool.h.

◆ Type

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 81 of file cxTool.h.

Constructor & Destructor Documentation

◆ Tool()

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

Definition at line 37 of file cxTool.cpp.

◆ ~Tool()

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

Definition at line 68 of file cxTool.h.

Member Function Documentation

◆ createDefaultPolyDataCone()

vtkPolyDataPtr cx::Tool::createDefaultPolyDataCone ( )
static

Definition at line 20 of file cxTool.cpp.

◆ get_prMt()

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

◆ getBaseTool()

virtual ToolPtr cx::Tool::getBaseTool ( )
pure virtual

◆ getCalibration_sMt()

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::BronchoscopyTool, cx::OpenIGTLinkTool, cx::ManualTool, cx::PlaybackTool, cx::ToolProxy, cx::ManualToolAdapter, and cx::ToolNull.

◆ getGraphicsPolyData()

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

◆ getMetadata()

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

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

◆ getMetadataHistory()

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

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

◆ getName()

virtual QString cx::Tool::getName ( ) const
pure virtual

◆ getNullObject()

ToolPtr cx::Tool::getNullObject ( )
static

Definition at line 44 of file cxTool.cpp.

◆ getPositionHistory()

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

get historical positions

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

◆ getSessionHistory()

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

◆ getTimestamp()

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::BronchoscopyTool, cx::OpenIGTLinkTool, cx::ToolProxy, cx::ManualTool, cx::PlaybackTool, and cx::ToolNull.

◆ getTypes()

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

◆ getUid()

virtual QString cx::Tool::getUid ( ) const
pure virtual

◆ getVisible()

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

◆ hasReferencePointWithId()

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

Reimplemented in cx::BronchoscopyTool, cx::PlaybackTool, cx::ToolProxy, and cx::ToolImpl.

Definition at line 122 of file cxTool.h.

◆ hasType()

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

Definition at line 98 of file cxTool.h.

◆ isCalibrated()

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

◆ isInitialized()

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

◆ isNull()

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

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

◆ resetTrackingPositionFilter()

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

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

◆ set_prMt()

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::ManualTool, cx::ToolUsingIGSTK, cx::BronchoscopyTool, cx::ToolProxy, cx::PlaybackTool, cx::ToolNull, and cx::ToolImpl.

◆ setVisible()

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

◆ toolProbeSector

void cx::Tool::toolProbeSector ( )
signal

◆ tooltipOffset

void cx::Tool::tooltipOffset ( double  offset)
signal

◆ toolTransformAndTimestamp

void cx::Tool::toolTransformAndTimestamp ( Transform3D  matrix,
double  timestamp 
)
signal

◆ toolVisible

void cx::Tool::toolVisible ( bool  visible)
signal

◆ tps

void cx::Tool::tps ( int  )
signal

Member Data Documentation

◆ mName

QString cx::Tool::mName
protected

Definition at line 150 of file cxTool.h.

◆ mUid

QString cx::Tool::mUid
protected

Definition at line 149 of file cxTool.h.


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