NorMIT-nav  2023.01.05-dev+develop.0da12
An IGT application
cxOrientationAnnotation3DRep.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 CXORIENTATIONANNOTATION3DREP_H_
12 #define CXORIENTATIONANNOTATION3DREP_H_
13 
14 #include "cxResourceVisualizationExport.h"
15 
16 #include "cxRepImpl.h"
17 #include "cxDefinitions.h"
18 #include "vtkForwardDeclarations.h"
19 #include "cxForwardDeclarations.h"
20 #include "cxVector3D.h"
21 
22 typedef vtkSmartPointer<class vtkOrientationMarkerWidget> vtkOrientationMarkerWidgetPtr;
23 typedef vtkSmartPointer<class vtkAnnotatedCubeActor> vtkAnnotatedCubeActorPtr;
24 typedef vtkSmartPointer<class vtkProp> vtkPropPtr;
25 
26 namespace cx
27 {
28 
29 typedef boost::shared_ptr<class OrientationAnnotation3DRep> OrientationAnnotation3DRepPtr;
30 
35 class cxResourceVisualization_EXPORT OrientationAnnotation3DRep: public RepImpl
36 {
37 Q_OBJECT
38 public:
39  static OrientationAnnotation3DRepPtr New(const QString& uid="");
40  virtual ~OrientationAnnotation3DRep();
41  virtual QString getType() const { return "OrientationAnnotation3DRep"; }
42 
43  bool getVisible() const;
44  void setVisible(bool on);
45  void setMarkerFilename(const QString filename);
46  void setSize(double size);
47 
48 private slots:
49 protected:
51  virtual void addRepActorsToViewRenderer(ViewPtr view);
52  virtual void removeRepActorsFromViewRenderer(ViewPtr view);
53 
54 private:
56  double mSize;
57  Vector3D mColor;
58  std::pair<QString, vtkPropPtr> mMarkerCache;
59 
60  void rebuild(vtkRenderWindowInteractorPtr interactor);
61  vtkAxesActorPtr createAxes();
62  vtkAnnotatedCubeActorPtr createCube();
63  vtkPropPtr readMarkerFromFile(const QString filename);
64 };
65 
66 }
67 
68 #endif /* CXORIENTATIONANNOTATION3DREP_H_ */
vtkPropPtr
vtkSmartPointer< class vtkProp > vtkPropPtr
Definition: cxOrientationAnnotation3DRep.h:24
vtkOrientationMarkerWidgetPtr
vtkSmartPointer< class vtkOrientationMarkerWidget > vtkOrientationMarkerWidgetPtr
Definition: cxOrientationAnnotation3DRep.h:22
cxRepImpl.h
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cxForwardDeclarations.h
cx::OrientationAnnotation3DRepPtr
boost::shared_ptr< class OrientationAnnotation3DRep > OrientationAnnotation3DRepPtr
Definition: cxForwardDeclarations.h:81
cxDefinitions.h
vtkAxesActorPtr
vtkSmartPointer< class vtkAxesActor > vtkAxesActorPtr
Definition: vtkForwardDeclarations.h:34
vtkAnnotatedCubeActorPtr
vtkSmartPointer< class vtkAnnotatedCubeActor > vtkAnnotatedCubeActorPtr
Definition: cxViewWrapper3D.h:32
cxVector3D.h
cx::OrientationAnnotation3DRep
Class for display of an orientation annotation cube in 3D.
Definition: cxOrientationAnnotation3DRep.h:35
vtkAnnotatedCubeActorPtr
vtkSmartPointer< class vtkAnnotatedCubeActor > vtkAnnotatedCubeActorPtr
Definition: cxOrientationAnnotation3DRep.h:23
vtkOrientationMarkerWidgetPtr
vtkSmartPointer< class vtkOrientationMarkerWidget > vtkOrientationMarkerWidgetPtr
Definition: cxViewWrapper3D.h:34
cx::OrientationAnnotation3DRep::getType
virtual QString getType() const
Definition: cxOrientationAnnotation3DRep.h:41
vtkForwardDeclarations.h
cx::ViewPtr
boost::shared_ptr< class View > ViewPtr
Definition: cxForwardDeclarations.h:110
cx::RepImpl
Default implementation of Rep.
Definition: cxRepImpl.h:42
vtkRenderWindowInteractorPtr
vtkSmartPointer< class vtkRenderWindowInteractor > vtkRenderWindowInteractorPtr
Definition: vtkForwardDeclarations.h:123
cx::Vector3D
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42