CustusX  22.04-rc5
An IGT application
cxDistanceMetricRep2D.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 CXDISTANCEMETRICREP2D_H_
14 #define CXDISTANCEMETRICREP2D_H_
15 
16 #include "cxResourceVisualizationExport.h"
17 
18 #include "cxDataMetricRep.h"
19 #include "cxDistanceMetric.h"
20 #include "cxViewportListener.h"
21 
22 namespace cx
23 {
24 
25 typedef boost::shared_ptr<class DistanceMetricRep2D> DistanceMetricRep2DPtr;
26 
35 class cxResourceVisualization_EXPORT DistanceMetricRep2D: public DataMetricRep
36 {
37  Q_OBJECT
38 public:
39  static DistanceMetricRep2DPtr New(const QString& uid="");
40  virtual ~DistanceMetricRep2D() {}
41 
42  virtual QString getType() const { return "DistanceMetricRep2D"; }
43  void setSliceProxy(SliceProxyPtr slicer);
44  void setDynamicSize(bool on);
45 
46 protected:
47  virtual void addRepActorsToViewRenderer(ViewPtr view);
48  virtual void removeRepActorsFromViewRenderer(ViewPtr view);
49 
50  virtual void clear();
51  virtual void onModifiedStartRender();
52 
53 private:
54  DistanceMetricRep2D(const QString& uid, const QString& name = "");
56 
57  ViewportListenerPtr mViewportListener;
58  SliceProxyPtr mSliceProxy;
59 
60  LineSegmentPtr mLine;
61 };
62 
63 
64 
65 }
66 
67 #endif /* CXDISTANCEMETRICREP2D_H_ */
boost::shared_ptr< class DistanceMetricRep2D > DistanceMetricRep2DPtr
boost::shared_ptr< class ViewportListener > ViewportListenerPtr
boost::shared_ptr< class SliceProxy > SliceProxyPtr
Base class for all Data Metric reps.
boost::shared_ptr< class View > ViewPtr
boost::shared_ptr< class LineSegment > LineSegmentPtr
virtual ~DistanceMetricRep2D()
constructor
virtual QString getType() const
Namespace for all CustusX production code.