Fraxinus  18.10
An IGT application
cxPlaneMetricRep.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 CXPLANEMETRICREP_H_
14 #define CXPLANEMETRICREP_H_
15 
16 #include "cxResourceVisualizationExport.h"
17 
18 #include "cxDataMetricRep.h"
19 #include "cxGraphicalPrimitives.h"
20 #include "cxPlaneMetric.h"
21 #include "cxViewportListener.h"
22 
23 namespace cx
24 {
25 
26 typedef boost::shared_ptr<class PlaneMetricRep> PlaneMetricRepPtr;
27 
36 class cxResourceVisualization_EXPORT PlaneMetricRep: public DataMetricRep
37 {
38 Q_OBJECT
39 public:
40  static PlaneMetricRepPtr New(const QString& uid = "");
41  virtual ~PlaneMetricRep() {}
42 
43  virtual QString getType() const { return "PlaneMetricRep"; }
44 
45 protected:
46  virtual void addRepActorsToViewRenderer(ViewPtr view);
47  virtual void removeRepActorsFromViewRenderer(ViewPtr view);
48  virtual void clear();
49  virtual void onModifiedStartRender();
50 
51 private:
53 
54  void rescale();
55  PlaneMetricPtr getPlaneMetric();
56  void drawRectangleForPlane(Vector3D p0_r, Vector3D n_r, double size);
57 
58  GraphicalPoint3DPtr mGraphicalPoint;
59  GraphicalArrow3DPtr mNormal;
60  Rect3DPtr mRect;
61  ViewportListenerPtr mViewportListener;
62 };
63 
64 }
65 
66 #endif /* CXPLANEMETRICREP_H_ */
boost::shared_ptr< class GraphicalPoint3D > GraphicalPoint3DPtr
boost::shared_ptr< class ViewportListener > ViewportListenerPtr
Rep for visualizing a PlaneMetric.
Base class for all Data Metric reps.
boost::shared_ptr< class View > ViewPtr
boost::shared_ptr< class PlaneMetric > PlaneMetricPtr
Definition: cxPlaneMetric.h:34
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42
virtual QString getType() const
boost::shared_ptr< class PlaneMetricRep > PlaneMetricRepPtr
boost::shared_ptr< class Rect3D > Rect3DPtr
virtual ~PlaneMetricRep()
constructor
boost::shared_ptr< GraphicalArrow3D > GraphicalArrow3DPtr
Namespace for all CustusX production code.