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