NorMIT-nav  22.09
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_ */
cx::MetricReferenceArgumentListPtr
boost::shared_ptr< class MetricReferenceArgumentList > MetricReferenceArgumentListPtr
Definition: cxMetricManager.h:26
cx::DoubleBoundingBox3D
Representation of a floating-point bounding box in 3D. The data are stored as {xmin,...
Definition: cxBoundingBox3D.h:63
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cxPrecompiledHeader.h
cxDataMetric.h
cx::PlaneMetric::getType
virtual QString getType() const
Definition: cxPlaneMetric.h:58
cxMetricReferenceArgumentList.h
cx::PatientModelServicePtr
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
Definition: cxLogicManager.h:25
cx::PlaneMetric
Data class representing a plane.
Definition: cxPlaneMetric.h:48
cxCoordinateSystemHelpers.h
cx::DataMetric
Base class for all Data Metrics.
Definition: cxDataMetric.h:43
cx::PlaneMetricPtr
boost::shared_ptr< class PlaneMetric > PlaneMetricPtr
Definition: cxPlaneMetric.h:34
cxPointMetric.h
cx::PlaneMetric::getIcon
virtual QIcon getIcon()
Definition: cxPlaneMetric.h:66
cx::PlaneMetric::getValueAsString
virtual QString getValueAsString() const
Definition: cxPlaneMetric.h:75
cx::PlaneMetric::getArguments
MetricReferenceArgumentListPtr getArguments()
Definition: cxPlaneMetric.h:69
cx::PlaneMetric::getTypeName
static QString getTypeName()
Definition: cxPlaneMetric.h:62
cx::PlaneMetric::showValueInGraphics
virtual bool showValueInGraphics() const
Definition: cxPlaneMetric.h:76
cx::Vector3D
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42
cx::SpaceProviderPtr
boost::shared_ptr< class SpaceProvider > SpaceProviderPtr
Definition: cxLogicManager.h:23
cx::Plane3D
Eigen::Hyperplane< double, 3 > Plane3D
Definition: cxPlaneMetric.h:26