Fraxinus  2023.01.05-dev+develop.0da12
An IGT application
cxOrientationAnnotationRep.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 CXORIENTATIONANNOTATIONREP_H_
14 #define CXORIENTATIONANNOTATIONREP_H_
15 
16 #include "cxResourceVisualizationExport.h"
17 
18 #include "cxRepImpl.h"
19 #include "cxDefinitions.h"
20 #include "vtkForwardDeclarations.h"
21 #include "cxForwardDeclarations.h"
22 #include <vtkCornerAnnotation.h>
23 
24 namespace cx
25 {
26 
27 class cxResourceVisualization_EXPORT OrientationAnnotation : public vtkCornerAnnotation
28 {
29  vtkTypeMacro(OrientationAnnotation, vtkCornerAnnotation);
30 public:
31  static OrientationAnnotation* New();
34  virtual void SetTextActorsPosition(int vsize[2]);
35  virtual void SetTextActorsJustification();
36 };
37 
38 typedef vtkSmartPointer<class OrientationAnnotation> OrientationAnnotationPtr;
39 
52 class cxResourceVisualization_EXPORT OrientationAnnotationRep : public RepImpl
53 {
54  Q_OBJECT
55 public:
56  static OrientationAnnotationRepPtr New(PatientModelServicePtr dataManager, const QString& uid="");
57  virtual ~OrientationAnnotationRep();
58  virtual QString getType() const { return "vm::OrientationAnnotationRep"; };
59 
60  void setPlaneType( PLANE_TYPE type);
61  void setVisible(bool visible);
62  private slots:
63  void clinicalApplicationChangedSlot();
64 protected:
66  virtual void addRepActorsToViewRenderer(ViewPtr view);
67  virtual void removeRepActorsFromViewRenderer(ViewPtr view);
68 
69  void setPlaneTypeNeurology(PLANE_TYPE type);
70  void setPlaneTypeRadiology(PLANE_TYPE type);
71  void createAnnotation();
72 
73  OrientationAnnotationPtr mOrientation;
74  PLANE_TYPE mPlane;
76 
79  QString mEastAnnotation;
80  QString mWestAnnotation;
81 };
82 
83 
84 }
85 
86 #endif /*CXORIENTATIONANNOTATIONREP_H_*/
87 
vtkSmartPointer< class OrientationAnnotation > OrientationAnnotationPtr
boost::shared_ptr< class View > ViewPtr
Display direction annotations in a 2D view.
boost::shared_ptr< class OrientationAnnotationRep > OrientationAnnotationRepPtr
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
Default implementation of Rep.
Definition: cxRepImpl.h:42
OrientationAnnotationPtr mOrientation
Namespace for all CustusX production code.