NorMIT-nav  22.09
An IGT application
cxGraphicalAxes3D.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 #ifndef CXGRAPHICALAXES3D_H
13 #define CXGRAPHICALAXES3D_H
14 
15 #include "cxResourceVisualizationExport.h"
16 
17 #include <vector>
18 #include "cxRepImpl.h"
19 #include "cxTransform3D.h"
20 #include "vtkForwardDeclarations.h"
21 
22 namespace cx
23 {
24 typedef boost::shared_ptr<class GraphicalAxes3D> GraphicalAxes3DPtr;
25 typedef boost::shared_ptr<class ViewportListener> ViewportListenerPtr;
26 }
27 
28 namespace cx
29 {
30 
38 class cxResourceVisualization_EXPORT GraphicalAxes3D
39 {
40 public:
42  void setRenderer(vtkRendererPtr renderer = vtkRendererPtr());
43  virtual ~GraphicalAxes3D();
44 
45  void setTransform(Transform3D rMt);
46  void setFontSize(double size);
47  void setAxisLength(double length);
48  void setVisible(bool on);
49 
50  void setShowAxesLabels(bool on);
51  void setCaption(const QString& caption, const Vector3D& color);
52 
53 protected:
54  void addCaption(const QString& label, Vector3D pos, Vector3D color);
55  void rescale();
56  void resetAxesLabels();
58  std::vector<vtkCaptionActor2DPtr> mCaption;
59  std::vector<Vector3D> mCaptionPos;
60  double mSize;
61  double mFontSize;
65  const double m_vtkAxisLength;
66 
68 };
69 
70 } // namespace cx
71 
72 #endif // CXGRAPHICALAXES3D_H
cxRepImpl.h
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::GraphicalAxes3D::mFontSize
double mFontSize
Definition: cxGraphicalAxes3D.h:61
vtkAxesActorPtr
vtkSmartPointer< class vtkAxesActor > vtkAxesActorPtr
Definition: vtkForwardDeclarations.h:34
cx::GraphicalAxes3D::m_vtkAxisLength
const double m_vtkAxisLength
Definition: cxGraphicalAxes3D.h:65
cx::ViewportListenerPtr
boost::shared_ptr< class ViewportListener > ViewportListenerPtr
Definition: cxForwardDeclarations.h:170
length
RealScalar length() const
Definition: cxMatrixBaseEigenAddons.h:35
cx::Transform3D
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
Definition: cxLandmarkPatientRegistrationWidget.h:33
cx::GraphicalAxes3D::mSize
double mSize
Definition: cxGraphicalAxes3D.h:60
vtkForwardDeclarations.h
cx::GraphicalAxes3D::m_rMt
Transform3D m_rMt
Definition: cxGraphicalAxes3D.h:67
cx::GraphicalAxes3D::mCaptionPos
std::vector< Vector3D > mCaptionPos
Definition: cxGraphicalAxes3D.h:59
cx::GraphicalAxes3D
Visualization for one 3D coordinate axis triplet.
Definition: cxGraphicalAxes3D.h:38
cx::GraphicalAxes3D::mActor
vtkAxesActorPtr mActor
Definition: cxGraphicalAxes3D.h:57
cx::GraphicalAxes3D::mShowLabels
bool mShowLabels
Definition: cxGraphicalAxes3D.h:62
cx::GraphicalAxes3DPtr
boost::shared_ptr< class GraphicalAxes3D > GraphicalAxes3DPtr
Definition: cxGraphicalAxes3D.h:24
cx::GraphicalAxes3D::mViewportListener
ViewportListenerPtr mViewportListener
Definition: cxGraphicalAxes3D.h:63
cx::GraphicalAxes3D::mRenderer
vtkRendererPtr mRenderer
Definition: cxGraphicalAxes3D.h:64
cxTransform3D.h
cx::Vector3D
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42
vtkRendererPtr
vtkSmartPointer< class vtkRenderer > vtkRendererPtr
Definition: vtkForwardDeclarations.h:122
cx::GraphicalAxes3D::mCaption
std::vector< vtkCaptionActor2DPtr > mCaption
Definition: cxGraphicalAxes3D.h:58