NorMIT-nav  2023.01.05-dev+develop.0da12
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
cx::GraphicalPoint3DPtr
boost::shared_ptr< class GraphicalPoint3D > GraphicalPoint3DPtr
Definition: cxForwardDeclarations.h:74
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::ToolMetricRep
Definition: cxToolMetricRep.h:40
cx::ToolMetricPtr
boost::shared_ptr< class ToolMetric > ToolMetricPtr
Definition: cxToolMetric.h:24
cxGraphicalPrimitives.h
cxToolMetric.h
cx::ViewportListenerPtr
boost::shared_ptr< class ViewportListener > ViewportListenerPtr
Definition: cxForwardDeclarations.h:172
cx::ToolMetricRepPtr
boost::shared_ptr< class ToolMetricRep > ToolMetricRepPtr
Definition: cxToolMetricRep.h:29
cx::ToolMetricRep::getType
virtual QString getType() const
Definition: cxToolMetricRep.h:46
cxViewportListener.h
cx::ToolMetricRep::~ToolMetricRep
virtual ~ToolMetricRep()
constructor
Definition: cxToolMetricRep.h:45
cx::ViewPtr
boost::shared_ptr< class View > ViewPtr
Definition: cxForwardDeclarations.h:110
cx::GraphicalAxes3DPtr
boost::shared_ptr< class GraphicalAxes3D > GraphicalAxes3DPtr
Definition: cxGraphicalAxes3D.h:24
cx::DataMetricRep
Base class for all Data Metric reps.
Definition: cxDataMetricRep.h:39
cx::GraphicalLine3DPtr
boost::shared_ptr< class GraphicalLine3D > GraphicalLine3DPtr
Definition: cxForwardDeclarations.h:73
cxDataMetricRep.h