Fraxinus  22.04
An IGT application
cxManualTool.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 
13 #ifndef CXMANUALTOOL_H_
14 #define CXMANUALTOOL_H_
15 
16 #include "cxResourceExport.h"
17 
18 #include <QMutex>
19 #include "cxToolImpl.h"
20 #include "vtkForwardDeclarations.h"
21 
22 namespace cx
23 {
24 
36 class cxResource_EXPORT ManualTool : public ToolImpl
37 {
38  Q_OBJECT
39 public:
40 
41  explicit ManualTool(const QString& uid, const QString& name ="");
42  virtual ~ManualTool();
43  virtual std::set<Type> getTypes() const;
44  virtual vtkPolyDataPtr getGraphicsPolyData() const;
45  virtual void setTransformSaveFile(const QString& filename){}
46  virtual bool getVisible() const;
47  virtual QString getUid() const;
48  virtual QString getName() const;
49  virtual int getIndex() const;
50  virtual bool isCalibrated() const;
51  virtual double getTimestamp() const;
52  virtual void set_prMt(const Transform3D& prMt, double timestamp=-1);
53 
54  virtual Transform3D getCalibration_sMt() const;
55  virtual std::map<QString, Vector3D> getReferencePoints() const { return std::map<QString, Vector3D>(); }
56  virtual void setVisible(bool vis);
57 
58 private slots:
59  void read3DCrossHairSlot(double toolTipOffset) const;
60 private:
61  // constant data
62  ProbeDefinition mSector;
63  vtkSTLReaderPtr mSTLReader;
64  mutable vtkCursor3DPtr mCrossHair;
65 
66  bool mVisible;
67  double mTimestamp;
68  void update3DCrossHair(double toolTipOffset) const;
69 };
70 
71 typedef boost::shared_ptr<ManualTool> ManualToolPtr;
72 
73 }// end namespace
74 
75 #endif /*SSCMANULATOOL_H_*/
virtual void setTransformSaveFile(const QString &filename)
Definition: cxManualTool.h:45
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
Common functionality for Tool subclasses.
Definition: cxToolImpl.h:30
virtual std::map< QString, Vector3D > getReferencePoints() const
Get the optional reference points from this tool.
Definition: cxManualTool.h:55
boost::shared_ptr< class ManualTool > ManualToolPtr
A manual tool that is unconnected to any hardware.
Definition: cxManualTool.h:36
vtkSmartPointer< class vtkCursor3D > vtkCursor3DPtr
vtkSmartPointer< class vtkSTLReader > vtkSTLReaderPtr
vtkSmartPointer< vtkPolyData > vtkPolyDataPtr
Definition of characteristics for an Ultrasound Probe Sector.
Namespace for all CustusX production code.