CustusX  22.04-rc5
An IGT application
cxPlaybackTool.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 
12 #ifndef CXPLAYBACKTOOL_H_
13 #define CXPLAYBACKTOOL_H_
14 
15 #include "cxToolImpl.h"
16 
17 #include "cxResourceExport.h"
18 
19 namespace cx
20 {
21 
22 typedef boost::shared_ptr<class PlaybackTool> PlaybackToolPtr;
23 typedef boost::shared_ptr<class PlaybackTime> PlaybackTimePtr;
24 
25 
33 class cxResource_EXPORT PlaybackTool: public ToolImpl
34 {
35 Q_OBJECT
36 public:
37  explicit PlaybackTool(ToolPtr base, PlaybackTimePtr time);
38  virtual ~PlaybackTool();
39  virtual std::set<Type> getTypes() const;
40  virtual vtkPolyDataPtr getGraphicsPolyData() const;
41  virtual void setTransformSaveFile(const QString& filename) {}
42  virtual Transform3D get_prMt() const;
43  virtual bool getVisible() const;
44  virtual QString getUid() const;
45  virtual QString getName() const;
46  virtual bool isCalibrated() const;
47  virtual double getTimestamp() const;
48 
49  virtual double getTooltipOffset() const;
50  virtual void setTooltipOffset(double val);
51 
52  virtual Transform3D getCalibration_sMt() const;
53  virtual std::map<QString, Vector3D> getReferencePoints() const;
54 
55 
56  virtual TimedTransformMapPtr getPositionHistory() { return mBase->getPositionHistory(); }
57  virtual bool isInitialized() const;
58  virtual ProbePtr getProbe() const { return mBase->getProbe(); }
59  virtual bool hasReferencePointWithId(QString id) { return mBase->hasReferencePointWithId(id); }
60  virtual TimedTransformMap getSessionHistory(double startTime, double stopTime) { return mBase->getSessionHistory(startTime, stopTime); }
61 
62  virtual void set_prMt(const Transform3D& prMt, double timestamp);
63  virtual void setVisible(bool vis);
64 
65  // extensions
66  ToolPtr getBase() { return mBase; }
67 
68 private slots:
69  void timeChangedSlot();
70 private:
71  ToolPtr mBase;
72  PlaybackTimePtr mTime;
73 
74  bool mVisible;
75  double mTimestamp;
76  Transform3D m_rMpr;
77 };
78 
79 } /* namespace cx */
80 #endif /* CXPLAYBACKTOOL_H_ */
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
virtual TimedTransformMap getSessionHistory(double startTime, double stopTime)
Common functionality for Tool subclasses.
Definition: cxToolImpl.h:30
boost::shared_ptr< class PlaybackTool > PlaybackToolPtr
boost::shared_ptr< class PlaybackTime > PlaybackTimePtr
boost::shared_ptr< Probe > ProbePtr
Definition: cxProbe.h:72
virtual void setTransformSaveFile(const QString &filename)
boost::shared_ptr< TimedTransformMap > TimedTransformMapPtr
Definition: cxTool.h:36
virtual bool hasReferencePointWithId(QString id)
A tool used during playback.
vtkSmartPointer< vtkPolyData > vtkPolyDataPtr
virtual ProbePtr getProbe() const
additional information if the tool represents an US Probe. Extends getProbeSector() ...
virtual TimedTransformMapPtr getPositionHistory()
get historical positions
std::map< double, Transform3D > TimedTransformMap
Namespace for all CustusX production code.
boost::shared_ptr< class Tool > ToolPtr