NorMIT-nav  22.09
An IGT application
cxToolImpl.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 #ifndef CXTOOLIMPL_H
12 #define CXTOOLIMPL_H
13 
14 #include "cxResourceExport.h"
15 
16 #include "cxTool.h"
17 #include "cxToolFileParser.h"
18 
19 namespace cx
20 {
21 typedef boost::shared_ptr<class TrackingPositionFilter> TrackingPositionFilterPtr;
22 
30 class cxResource_EXPORT ToolImpl : public Tool
31 {
32  Q_OBJECT
33 public:
34  explicit ToolImpl(const QString& uid="", const QString& name ="");
35  virtual ~ToolImpl();
36 
37  virtual TimedTransformMapPtr getPositionHistory();
38  virtual TimedTransformMap getSessionHistory(double startTime, double stopTime);
39  virtual Transform3D get_prMt() const;
40  virtual ToolPtr getBaseTool();
41 
42  virtual ToolPositionMetadata getMetadata() const;
43  virtual const std::map<double, ToolPositionMetadata>& getMetadataHistory();
44 
45  virtual double getTooltipOffset() const;
46  virtual void setTooltipOffset(double val);
47 
48  virtual void resetTrackingPositionFilter(TrackingPositionFilterPtr filter);
49  virtual bool isNull() { return false; }
50 
51  virtual void addXml(QDomNode& dataNode) {Q_UNUSED(dataNode)}
52  virtual void parseXml(QDomNode& dataNode) {Q_UNUSED(dataNode)}
53 
54  virtual vtkPolyDataPtr getGraphicsPolyData() const;
55  virtual bool hasReferencePointWithId(QString id);
56 protected:
57  virtual void set_prMt(const Transform3D& prMt, double timestamp);
58  void createToolGraphic();
59 
63  std::map<double, ToolPositionMetadata> mMetadata;
65 
66  virtual std::set<Type> getTypes() const;
67  virtual std::map<QString, Vector3D> getReferencePoints() const;
69 private:
70  double mTooltipOffset;
71 };
72 typedef boost::shared_ptr<ToolImpl> cxToolPtr;
73 
74 } // namespace cx
75 
76 #endif // CXTOOLIMPL_H
cx::Tool
Interface to a tool, i.e. a pointer, US probe or similar.
Definition: cxTool.h:61
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::ToolImpl::getToolFileToolStructure
virtual ToolFileParser::ToolInternalStructurePtr getToolFileToolStructure() const
Definition: cxToolImpl.h:68
cx::ToolImpl::mPositionHistory
TimedTransformMapPtr mPositionHistory
Definition: cxToolImpl.h:60
cx::ToolImpl::parseXml
virtual void parseXml(QDomNode &dataNode)
Definition: cxToolImpl.h:52
cx::TrackingPositionFilterPtr
boost::shared_ptr< class TrackingPositionFilter > TrackingPositionFilterPtr
Definition: cxTool.h:37
cxToolFileParser.h
cx::Transform3D
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
Definition: cxLandmarkPatientRegistrationWidget.h:33
cx::TimedTransformMap
std::map< double, Transform3D > TimedTransformMap
Definition: cxRecordSession.h:36
cxTool.h
cx::TimedTransformMapPtr
boost::shared_ptr< TimedTransformMap > TimedTransformMapPtr
Definition: cxTool.h:36
cx::ToolImpl::mPolyData
vtkPolyDataPtr mPolyData
the polydata used to represent the tool graphically
Definition: cxToolImpl.h:64
cx::vtkPolyDataPtr
vtkSmartPointer< vtkPolyData > vtkPolyDataPtr
Definition: cxCenterlineRegistration.h:42
cx::ToolImpl::mMetadata
std::map< double, ToolPositionMetadata > mMetadata
Definition: cxToolImpl.h:63
cx::ToolImpl::m_prMt
Transform3D m_prMt
the transform from the tool to the patient reference
Definition: cxToolImpl.h:61
cx::cxToolPtr
boost::shared_ptr< ToolImpl > cxToolPtr
Definition: cxToolImpl.h:72
cx::ToolPositionMetadata
Definition: cxTool.h:43
cx::ToolPtr
boost::shared_ptr< class Tool > ToolPtr
Definition: cxVideoConnectionWidget.h:43
cx::ToolImpl
Common functionality for Tool subclasses.
Definition: cxToolImpl.h:30
cx::ToolImpl::mTrackingPositionFilter
TrackingPositionFilterPtr mTrackingPositionFilter
Definition: cxToolImpl.h:62
cx::ToolFileParser::ToolInternalStructurePtr
boost::shared_ptr< ToolInternalStructure > ToolInternalStructurePtr
Definition: cxToolFileParser.h:99
cx::ToolImpl::addXml
virtual void addXml(QDomNode &dataNode)
Definition: cxToolImpl.h:51
cx::ToolImpl::isNull
virtual bool isNull()
Definition: cxToolImpl.h:49