NorMIT-nav  22.09
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 
69 
70 private:
71  CaptionText3DPtr mText;
72 };
73 typedef boost::shared_ptr<class DataMetricRep> DataMetricRepPtr;
74 
75 }
76 
77 #endif /* CXDATAMETRICREP_H_ */
cx::DataMetricRep::mShowAnnotation
bool mShowAnnotation
Definition: cxDataMetricRep.h:65
cxRepImpl.h
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::DataMetricPtr
boost::shared_ptr< DataMetric > DataMetricPtr
Definition: cxDataMetric.h:73
cx::CaptionText3DPtr
boost::shared_ptr< CaptionText3D > CaptionText3DPtr
Definition: cxGraphicalPrimitives.h:287
cxVector3D.h
cx::DataMetricRepPtr
boost::shared_ptr< class DataMetricRep > DataMetricRepPtr
Definition: cxViewWrapper3D.h:39
cx::DataMetricRep::mLabelSize
double mLabelSize
Definition: cxDataMetricRep.h:64
cx::DataMetricRep::~DataMetricRep
virtual ~DataMetricRep()
Definition: cxDataMetricRep.h:43
cx::getColorAsVector3D
Vector3D getColorAsVector3D(QColor color)
Definition: cxVtkHelperClasses.cpp:40
vtkForwardDeclarations.h
cx::ViewPtr
boost::shared_ptr< class View > ViewPtr
Definition: cxForwardDeclarations.h:110
cx::RepImpl
Default implementation of Rep.
Definition: cxRepImpl.h:42
cx::DataMetricRep
Base class for all Data Metric reps.
Definition: cxDataMetricRep.h:39
cx::DataMetricRep::mGraphicsSize
double mGraphicsSize
Definition: cxDataMetricRep.h:62
cx::DataMetricRep::mMetric
DataMetricPtr mMetric
Definition: cxDataMetricRep.h:68
cx::Vector3D
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42
cx::DataMetricRep::mShowLabel
bool mShowLabel
Definition: cxDataMetricRep.h:63