NorMIT-nav  2023.01.05-dev+develop.0da12
An IGT application
cxSphereMetric.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 CXSPHEREMETRIC_H
12 #define CXSPHEREMETRIC_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 SphereMetric> SphereMetricPtr;
30 
37 class cxResource_EXPORT SphereMetric: public DataMetric
38 {
39 Q_OBJECT
40 public:
41  virtual ~SphereMetric();
42  static SphereMetricPtr create(QString uid, QString name, PatientModelServicePtr dataManager, SpaceProviderPtr spaceProvider);
43 
45  virtual bool isValid() const;
46 
47  void setRadius(double val);
48  double getRadius() const;
49 
50  virtual void addXml(QDomNode& dataNode);
51  virtual void parseXml(QDomNode& dataNode);
52  virtual DoubleBoundingBox3D boundingBox() const;
53  virtual Vector3D getRefCoord() const;
54  virtual QString getType() const
55  {
56  return getTypeName();
57  }
58  static QString getTypeName()
59  {
60  return "SphereMetric";
61  }
62  virtual QIcon getIcon() {return QIcon(":/icons/metric_sphere.png");}
63  virtual QString getValueAsString() const;
64  virtual bool showValueInGraphics() const { return false; }
65 
66 private:
67  SphereMetric(const QString& uid, const QString& name, PatientModelServicePtr dataManager, SpaceProviderPtr spaceProvider);
69  double mRadius;
70 };
71 
75 } // namespace cx
76 
77 
78 #endif // CXSPHEREMETRIC_H
cx::SphereMetric::getArguments
MetricReferenceArgumentListPtr getArguments()
Definition: cxSphereMetric.h:44
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::SphereMetric::getIcon
virtual QIcon getIcon()
Definition: cxSphereMetric.h:62
cx::SphereMetric::getTypeName
static QString getTypeName()
Definition: cxSphereMetric.h:58
cx::SphereMetricPtr
boost::shared_ptr< class SphereMetric > SphereMetricPtr
Definition: cxDataRepContainer.h:22
cxMetricReferenceArgumentList.h
cx::PatientModelServicePtr
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
Definition: cxLogicManager.h:25
cx::SphereMetric::getType
virtual QString getType() const
Definition: cxSphereMetric.h:54
cx::DataMetric
Base class for all Data Metrics.
Definition: cxDataMetric.h:43
cxPointMetric.h
cx::SphereMetric::showValueInGraphics
virtual bool showValueInGraphics() const
Definition: cxSphereMetric.h:64
cx::SphereMetric
Data class that represents a donut.
Definition: cxSphereMetric.h:37
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