NorMIT-nav  22.09
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_ */
cx::PlaneMetricRepPtr
boost::shared_ptr< class PlaneMetricRep > PlaneMetricRepPtr
Definition: cxPlaneMetricRep.h:26
cx::GraphicalPoint3DPtr
boost::shared_ptr< class GraphicalPoint3D > GraphicalPoint3DPtr
Definition: cxForwardDeclarations.h:74
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::PlaneMetricRep
Rep for visualizing a PlaneMetric.
Definition: cxPlaneMetricRep.h:36
cxGraphicalPrimitives.h
cx::ViewportListenerPtr
boost::shared_ptr< class ViewportListener > ViewportListenerPtr
Definition: cxForwardDeclarations.h:170
cx::Rect3DPtr
boost::shared_ptr< class Rect3D > Rect3DPtr
Definition: cxForwardDeclarations.h:87
cxPlaneMetric.h
cxViewportListener.h
cx::GraphicalArrow3DPtr
boost::shared_ptr< GraphicalArrow3D > GraphicalArrow3DPtr
Definition: cxGraphicalPrimitives.h:201
cx::ViewPtr
boost::shared_ptr< class View > ViewPtr
Definition: cxForwardDeclarations.h:110
cx::PlaneMetricPtr
boost::shared_ptr< class PlaneMetric > PlaneMetricPtr
Definition: cxPlaneMetric.h:34
cx::PlaneMetricRep::~PlaneMetricRep
virtual ~PlaneMetricRep()
constructor
Definition: cxPlaneMetricRep.h:41
cx::DataMetricRep
Base class for all Data Metric reps.
Definition: cxDataMetricRep.h:39
cxDataMetricRep.h
cx::Vector3D
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42
cx::PlaneMetricRep::getType
virtual QString getType() const
Definition: cxPlaneMetricRep.h:43