CustusX  2023.01.05-dev+develop.0da12
An IGT application
cxDataMetricRep.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 CXDATAMETRICREP_H_
14 #define CXDATAMETRICREP_H_
15 
16 #include "cxResourceVisualizationExport.h"
17 
18 #include "cxRepImpl.h"
19 #include "cxVector3D.h"
20 #include "vtkForwardDeclarations.h"
21 
22 namespace cx
23 {
24 typedef boost::shared_ptr<class CaptionText3D> CaptionText3DPtr;
25 typedef boost::shared_ptr<class DataMetric> DataMetricPtr;
26 
39 class cxResourceVisualization_EXPORT DataMetricRep: public RepImpl
40 {
41 Q_OBJECT
42 public:
43  virtual ~DataMetricRep() {}
44 
45  void setGraphicsSize(double size);
46  void setLabelSize(double size);
47  void setShowLabel(bool on);
48  void setShowAnnotation(bool on);
49 
50  void setDataMetric(DataMetricPtr value);
51  DataMetricPtr getDataMetric();
52 
53 protected:
54  DataMetricRep();
55 
56  void addRepActorsToViewRenderer(ViewPtr view);
57  void removeRepActorsFromViewRenderer(ViewPtr view);
58  void drawText();
59  virtual void clear(); // reset all internals
60  virtual QString getText();
61 
62  double mGraphicsSize;
63  bool mShowLabel;
64  double mLabelSize;
67 
68  DataMetricPtr mMetric;
69 
70 private:
71  CaptionText3DPtr mText;
72 };
73 typedef boost::shared_ptr<class DataMetricRep> DataMetricRepPtr;
74 
75 }
76 
77 #endif /* CXDATAMETRICREP_H_ */
Vector3D getColorAsVector3D(QColor color)
boost::shared_ptr< DataMetric > DataMetricPtr
Definition: cxDataMetric.h:73
Base class for all Data Metric reps.
boost::shared_ptr< class DataMetricRep > DataMetricRepPtr
boost::shared_ptr< class View > ViewPtr
virtual ~DataMetricRep()
Default implementation of Rep.
Definition: cxRepImpl.h:42
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42
DataMetricPtr mMetric
boost::shared_ptr< CaptionText3D > CaptionText3DPtr
Namespace for all CustusX production code.