NorMIT-nav  2023.01.05-dev+develop.0da12
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_ */
cx::PointMetricRep2DPtr
boost::shared_ptr< class PointMetricRep2D > PointMetricRep2DPtr
Definition: cxForwardDeclarations.h:86
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cxGraphicalPrimitives.h
cx::PointMetricRep2D::getType
virtual QString getType() const
Definition: cxPointMetricRep2D.h:44
cx::SliceProxyPtr
boost::shared_ptr< class SliceProxy > SliceProxyPtr
Definition: cxForwardDeclarations.h:96
cx::ViewportListenerPtr
boost::shared_ptr< class ViewportListener > ViewportListenerPtr
Definition: cxForwardDeclarations.h:172
cx::PointMetricRep2D
Definition: cxPointMetricRep2D.h:37
cxViewportListener.h
cx::PointMetricRep2D::~PointMetricRep2D
virtual ~PointMetricRep2D()
constructor
Definition: cxPointMetricRep2D.h:42
cx::GraphicalDiskPtr
boost::shared_ptr< GraphicalDisk > GraphicalDiskPtr
Definition: cxGraphicalDisk.h:79
cx::ViewPtr
boost::shared_ptr< class View > ViewPtr
Definition: cxForwardDeclarations.h:110
cxPointMetric.h
cx::DataMetricRep
Base class for all Data Metric reps.
Definition: cxDataMetricRep.h:39
cxDataMetricRep.h