Fraxinus  2023.01.05-dev+develop.0da12
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
vtkSmartPointer< class vtkAxesActor > vtkAxesActorPtr
boost::shared_ptr< class ViewportListener > ViewportListenerPtr
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
Visualization for one 3D coordinate axis triplet.
vtkRendererPtr mRenderer
vtkAxesActorPtr mActor
vtkSmartPointer< class vtkRenderer > vtkRendererPtr
boost::shared_ptr< class GraphicalAxes3D > GraphicalAxes3DPtr
std::vector< vtkCaptionActor2DPtr > mCaption
std::vector< Vector3D > mCaptionPos
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42
RealScalar length() const
const double m_vtkAxisLength
ViewportListenerPtr mViewportListener
Namespace for all CustusX production code.