NorMIT-nav  2023.01.05-dev+develop.0da12
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_ */
cx::DistanceMetricRep2D::~DistanceMetricRep2D
virtual ~DistanceMetricRep2D()
constructor
Definition: cxDistanceMetricRep2D.h:40
cx::LineSegmentPtr
boost::shared_ptr< class LineSegment > LineSegmentPtr
Definition: cxForwardDeclarations.h:79
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::DistanceMetricRep2D
Definition: cxDistanceMetricRep2D.h:35
cx::SliceProxyPtr
boost::shared_ptr< class SliceProxy > SliceProxyPtr
Definition: cxForwardDeclarations.h:96
cx::ViewportListenerPtr
boost::shared_ptr< class ViewportListener > ViewportListenerPtr
Definition: cxForwardDeclarations.h:172
cxDistanceMetric.h
cxViewportListener.h
cx::DistanceMetricRep2D::getType
virtual QString getType() const
Definition: cxDistanceMetricRep2D.h:42
cx::DistanceMetricRep2DPtr
boost::shared_ptr< class DistanceMetricRep2D > DistanceMetricRep2DPtr
Definition: cxDistanceMetricRep2D.h:25
cx::ViewPtr
boost::shared_ptr< class View > ViewPtr
Definition: cxForwardDeclarations.h:110
cx::DataMetricRep
Base class for all Data Metric reps.
Definition: cxDataMetricRep.h:39
cxDataMetricRep.h