NorMIT-nav  2023.01.05-dev+develop.0da12
An IGT application
cxShapedMetric.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 #ifndef CXSHAPEDMETRIC_H
12 #define CXSHAPEDMETRIC_H
13 
14 #include "cxResourceExport.h"
15 #include "cxPrecompiledHeader.h"
16 
17 #include "cxDataMetric.h"
18 #include "cxPointMetric.h"
20 
21 namespace cx
22 {
29 typedef boost::shared_ptr<class DonutMetric> DonutMetricPtr;
30 
40 class cxResource_EXPORT DonutMetric: public DataMetric
41 {
42 Q_OBJECT
43 public:
44  virtual ~DonutMetric();
45  static DonutMetricPtr create(QString uid, QString name, PatientModelServicePtr dataManager, SpaceProviderPtr spaceProvider);
46 
47  virtual bool isValid() const;
48  virtual QIcon getIcon() {return QIcon(":/icons/metric_torus.png");}
49 
50  void setRadius(double val);
51  double getRadius() const;
52  void setThickness(double val);
53  double getThickness() const;
54  void setHeight(double val);
55  double getHeight() const;
56  bool getFlat() const;
57  void setFlat(bool val);
58 
59  Vector3D getPosition();
60  Vector3D getDirection();
61 
63  virtual void addXml(QDomNode& dataNode);
64  virtual void parseXml(QDomNode& dataNode);
65  virtual DoubleBoundingBox3D boundingBox() const;
66  virtual Vector3D getRefCoord() const;
67  virtual QString getType() const
68  {
69  return getTypeName();
70  }
71  static QString getTypeName()
72  {
73  return "DonutMetric";
74  }
75  virtual QString getValueAsString() const { return ""; }
76  virtual bool showValueInGraphics() const { return false; }
77 
78 private:
79  DonutMetric(const QString& uid, const QString& name, PatientModelServicePtr dataManager, SpaceProviderPtr spaceProvider);
81  double mRadius;
82  double mThickness;
83  double mHeight;
84  bool mFlat;
85 };
86 
90 } // namespace cx
91 
92 #endif // CXSHAPEDMETRIC_H
cx::DonutMetric::showValueInGraphics
virtual bool showValueInGraphics() const
Definition: cxShapedMetric.h:76
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::DonutMetric::getTypeName
static QString getTypeName()
Definition: cxShapedMetric.h:71
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cxPrecompiledHeader.h
cxDataMetric.h
cx::DonutMetricPtr
boost::shared_ptr< class DonutMetric > DonutMetricPtr
Definition: cxShapedMetric.h:29
cxMetricReferenceArgumentList.h
cx::PatientModelServicePtr
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
Definition: cxLogicManager.h:25
cx::DonutMetric::getArguments
MetricReferenceArgumentListPtr getArguments()
Definition: cxShapedMetric.h:62
cx::DonutMetric
Data class that represents a donut.
Definition: cxShapedMetric.h:40
cx::DataMetric
Base class for all Data Metrics.
Definition: cxDataMetric.h:43
cxPointMetric.h
cx::DonutMetric::getType
virtual QString getType() const
Definition: cxShapedMetric.h:67
cx::DonutMetric::getIcon
virtual QIcon getIcon()
Definition: cxShapedMetric.h:48
cx::DonutMetric::getValueAsString
virtual QString getValueAsString() const
Definition: cxShapedMetric.h:75
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