Fraxinus  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
boost::shared_ptr< class SpaceProvider > SpaceProviderPtr
virtual QString getType() const
MetricReferenceArgumentListPtr getArguments()
boost::shared_ptr< class SphereMetric > SphereMetricPtr
virtual QIcon getIcon()
Data class that represents a donut.
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
boost::shared_ptr< class MetricReferenceArgumentList > MetricReferenceArgumentListPtr
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.
virtual bool showValueInGraphics() const
static QString getTypeName()
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42
Base class for all Data Metrics.
Definition: cxDataMetric.h:43
Namespace for all CustusX production code.