NorMIT-nav  2023.01.05-dev+develop.0da12
An IGT application
cxOrientationAnnotation2DRep.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 CXORIENTATIONANNOTATION2DREP_H_
13 #define CXORIENTATIONANNOTATION2DREP_H_
14 
15 #include "cxResourceVisualizationExport.h"
16 
17 #include "cxRepImpl.h"
18 #include "cxDefinitions.h"
19 #include "vtkForwardDeclarations.h"
20 #include "cxForwardDeclarations.h"
21 #include "cxVector3D.h"
22 #include "cxTransform3D.h"
23 #include <vector>
24 
25 namespace cx
26 {
27 
28 typedef boost::shared_ptr<class OrientationAnnotationSmartRep> OrientationAnnotationSmartRepPtr;
29 typedef vtkSmartPointer<class OrientationAnnotation> OrientationAnnotationPtr;
30 
42 class cxResourceVisualization_EXPORT OrientationAnnotationSmartRep: public RepImpl
43 {
44 Q_OBJECT
45 public:
46  static OrientationAnnotationSmartRepPtr New(const QString& uid="");
48  virtual QString getType() const { return "vm::OrientationAnnotationSmartRep"; }
49 
50  void setSliceProxy(SliceProxyPtr slicer);
54  void ThresholdAngle(double angle);
55  double ThresholdAngle() const;
56 
57  void setVisible(bool visible);
58 private slots:
59  void transformChangedSlot();
60 protected:
62  virtual void addRepActorsToViewRenderer(ViewPtr view);
63  virtual void removeRepActorsFromViewRenderer(ViewPtr view);
64 
65  QString determineAnnotation(Vector3D planeDir_s, Transform3D rMs);
66  void createAnnotation();
67 
68  double mAngle;
71  std::map<QString, Vector3D> mDCMDirections_r;
72  std::vector<Vector3D> mPlaneDirections_s;
73 };
74 
75 }
76 
77 #endif /*CXORIENTATIONANNOTATION2DREP_H_*/
78 
cx::OrientationAnnotationSmartRep::mAngle
double mAngle
Definition: cxOrientationAnnotation2DRep.h:68
cx::OrientationAnnotationSmartRepPtr
boost::shared_ptr< class OrientationAnnotationSmartRep > OrientationAnnotationSmartRepPtr
Definition: cxViewWrapper2D.h:37
cxRepImpl.h
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cxForwardDeclarations.h
cxDefinitions.h
cx::OrientationAnnotationPtr
vtkSmartPointer< class OrientationAnnotation > OrientationAnnotationPtr
Definition: cxOrientationAnnotation2DRep.h:29
cx::SliceProxyPtr
boost::shared_ptr< class SliceProxy > SliceProxyPtr
Definition: cxForwardDeclarations.h:96
cxVector3D.h
cx::OrientationAnnotationSmartRep
A class that annotated 2D views with otientation information.
Definition: cxOrientationAnnotation2DRep.h:42
cx::Transform3D
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
Definition: cxLandmarkPatientRegistrationWidget.h:33
cx::OrientationAnnotationSmartRep::mDCMDirections_r
std::map< QString, Vector3D > mDCMDirections_r
directions of DICOM labels APSILR
Definition: cxOrientationAnnotation2DRep.h:71
vtkForwardDeclarations.h
cx::OrientationAnnotationSmartRep::mOrientation
OrientationAnnotationPtr mOrientation
Definition: cxOrientationAnnotation2DRep.h:70
cx::ViewPtr
boost::shared_ptr< class View > ViewPtr
Definition: cxForwardDeclarations.h:110
cx::RepImpl
Default implementation of Rep.
Definition: cxRepImpl.h:42
cx::OrientationAnnotationSmartRep::mSlicer
SliceProxyPtr mSlicer
Definition: cxOrientationAnnotation2DRep.h:69
cxTransform3D.h
cx::Vector3D
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42
cx::OrientationAnnotationSmartRep::mPlaneDirections_s
std::vector< Vector3D > mPlaneDirections_s
the four directions in the slice plane
Definition: cxOrientationAnnotation2DRep.h:72
cx::OrientationAnnotationSmartRep::getType
virtual QString getType() const
Definition: cxOrientationAnnotation2DRep.h:48