CustusX  2023.01.05-dev+develop.0da12
An IGT application
cxPlaneMetric.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 CXPLANEMETRIC_H_
14 #define CXPLANEMETRIC_H_
15 
16 #include "cxResourceExport.h"
17 #include "cxPrecompiledHeader.h"
18 
19 #include "cxDataMetric.h"
21 #include "cxPointMetric.h"
23 
24 namespace cx
25 {
26 typedef Eigen::Hyperplane<double, 3> Plane3D;
27 
34 typedef boost::shared_ptr<class PlaneMetric> PlaneMetricPtr;
35 
48 class cxResource_EXPORT PlaneMetric: public DataMetric
49 {
50 Q_OBJECT
51 public:
52  PlaneMetric(const QString& uid, const QString& name, PatientModelServicePtr dataManager, SpaceProviderPtr spaceProvider);
53  virtual ~PlaneMetric();
54  static PlaneMetricPtr create(QString uid, QString name, PatientModelServicePtr dataManager, SpaceProviderPtr spaceProvider);
55 
56  virtual Vector3D getRefCoord() const;
57  Vector3D getRefNormal() const;
58  virtual QString getType() const
59  {
60  return getTypeName();
61  }
62  static QString getTypeName()
63  {
64  return "planeMetric";
65  }
66  virtual QIcon getIcon() {return QIcon(":/icons/metric_plane.png");}
67 
68  Plane3D getRefPlane() const;
70 
71  virtual void addXml(QDomNode& dataNode);
72  virtual void parseXml(QDomNode& dataNode);
73  virtual DoubleBoundingBox3D boundingBox() const;
74 
75  virtual QString getValueAsString() const { return ""; }
76  virtual bool showValueInGraphics() const { return false; }
77 
78 private:
80 };
81 
85 }
86 
87 #endif /* CXPLANEMETRIC_H_ */
boost::shared_ptr< class SpaceProvider > SpaceProviderPtr
static QString getTypeName()
Definition: cxPlaneMetric.h:62
Data class representing a plane.
Definition: cxPlaneMetric.h:48
boost::shared_ptr< class PlaneMetric > PlaneMetricPtr
Definition: cxPlaneMetric.h:34
virtual QString getType() const
Definition: cxPlaneMetric.h:58
virtual bool showValueInGraphics() const
Definition: cxPlaneMetric.h:76
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
boost::shared_ptr< class MetricReferenceArgumentList > MetricReferenceArgumentListPtr
virtual QIcon getIcon()
Definition: cxPlaneMetric.h:66
Representation of a floating-point bounding box in 3D. The data are stored as {xmin,xmax,ymin,ymax,zmin,zmax}, in order to simplify communication with vtk.
Eigen::Hyperplane< double, 3 > Plane3D
Definition: cxPlaneMetric.h:26
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42
MetricReferenceArgumentListPtr getArguments()
Definition: cxPlaneMetric.h:69
virtual QString getValueAsString() const
Definition: cxPlaneMetric.h:75
Base class for all Data Metrics.
Definition: cxDataMetric.h:43
Namespace for all CustusX production code.