NorMIT-nav  22.09
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 
74  PLANE_TYPE mPlane;
76 
79  QString mEastAnnotation;
80  QString mWestAnnotation;
81 };
82 
83 
84 }
85 
86 #endif /*CXORIENTATIONANNOTATIONREP_H_*/
87 
cx::OrientationAnnotationRep::mPlane
PLANE_TYPE mPlane
Definition: cxOrientationAnnotationRep.h:74
cx::OrientationAnnotationRep::getType
virtual QString getType() const
Definition: cxOrientationAnnotationRep.h:58
cxRepImpl.h
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cxForwardDeclarations.h
cxDefinitions.h
cx::OrientationAnnotationRepPtr
boost::shared_ptr< class OrientationAnnotationRep > OrientationAnnotationRepPtr
Definition: cxForwardDeclarations.h:82
cx::OrientationAnnotationPtr
vtkSmartPointer< class OrientationAnnotation > OrientationAnnotationPtr
Definition: cxOrientationAnnotation2DRep.h:29
cx::OrientationAnnotationRep::mWestAnnotation
QString mWestAnnotation
Definition: cxOrientationAnnotationRep.h:80
cx::OrientationAnnotationRep::mOrientation
OrientationAnnotationPtr mOrientation
Definition: cxOrientationAnnotationRep.h:73
cx::OrientationAnnotation
Definition: cxOrientationAnnotationRep.h:27
cx::OrientationAnnotationRep::mEastAnnotation
QString mEastAnnotation
Definition: cxOrientationAnnotationRep.h:79
cx::PatientModelServicePtr
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
Definition: cxLogicManager.h:25
cx::OrientationAnnotationRep
Display direction annotations in a 2D view.
Definition: cxOrientationAnnotationRep.h:52
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::OrientationAnnotationRep::mDataManager
PatientModelServicePtr mDataManager
Definition: cxOrientationAnnotationRep.h:75
cx::OrientationAnnotationRep::mSouthAnnotation
QString mSouthAnnotation
Definition: cxOrientationAnnotationRep.h:78
cx::OrientationAnnotationRep::mNorthAnnotation
QString mNorthAnnotation
Definition: cxOrientationAnnotationRep.h:77