Fraxinus  22.04-rc5
An IGT application
cxToolMetricRep.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 CXTOOLMETRICREP_H
12 #define CXTOOLMETRICREP_H
13 
14 #include "cxResourceVisualizationExport.h"
15 
16 #include "cxDataMetricRep.h"
17 #include "cxGraphicalPrimitives.h"
18 #include "cxToolMetric.h"
19 #include "cxViewportListener.h"
20 
21 namespace cx
22 {
23 typedef boost::shared_ptr<class GraphicalAxes3D> GraphicalAxes3DPtr;
24 }
25 
26 namespace cx
27 {
28 
29 typedef boost::shared_ptr<class ToolMetricRep> ToolMetricRepPtr;
30 
40 class cxResourceVisualization_EXPORT ToolMetricRep: public DataMetricRep
41 {
42 Q_OBJECT
43 public:
44  static ToolMetricRepPtr New(const QString& uid = "");
45  virtual ~ToolMetricRep() {}
46  virtual QString getType() const { return "ToolMetricRep"; }
47 
48 protected:
49  virtual void clear();
50  void addRepActorsToViewRenderer(ViewPtr view);
51  void removeRepActorsFromViewRenderer(ViewPtr view);
52  virtual void onModifiedStartRender();
53 
54 private:
55  ToolMetricRep(const QString& uid, const QString& name = "");
56  ToolMetricRep();
57  ToolMetricPtr getToolMetric();
58  void rescale();
59 
60  GraphicalAxes3DPtr mAxes;
61 
62  GraphicalPoint3DPtr mToolTip;
63  GraphicalLine3DPtr mToolOffset;
64  ViewportListenerPtr mViewportListener;
65 
66 };
67 
68 } // namespace cx
69 
70 #endif // CXTOOLMETRICREP_H
virtual QString getType() const
boost::shared_ptr< class GraphicalPoint3D > GraphicalPoint3DPtr
boost::shared_ptr< class ToolMetric > ToolMetricPtr
Definition: cxToolMetric.h:24
boost::shared_ptr< class ViewportListener > ViewportListenerPtr
virtual ~ToolMetricRep()
constructor
boost::shared_ptr< class ToolMetricRep > ToolMetricRepPtr
Base class for all Data Metric reps.
boost::shared_ptr< class View > ViewPtr
boost::shared_ptr< class GraphicalAxes3D > GraphicalAxes3DPtr
boost::shared_ptr< class GraphicalLine3D > GraphicalLine3DPtr
Namespace for all CustusX production code.