CustusX  22.04-rc5
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;
70  OrientationAnnotationPtr mOrientation;
71  std::map<QString, Vector3D> mDCMDirections_r;
72  std::vector<Vector3D> mPlaneDirections_s;
73 };
74 
75 }
76 
77 #endif /*CXORIENTATIONANNOTATION2DREP_H_*/
78 
vtkSmartPointer< class OrientationAnnotation > OrientationAnnotationPtr
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
boost::shared_ptr< class SliceProxy > SliceProxyPtr
std::vector< Vector3D > mPlaneDirections_s
the four directions in the slice plane
boost::shared_ptr< class View > ViewPtr
boost::shared_ptr< class OrientationAnnotationSmartRep > OrientationAnnotationSmartRepPtr
std::map< QString, Vector3D > mDCMDirections_r
directions of DICOM labels APSILR
A class that annotated 2D views with otientation information.The slice proxy is used to find the orie...
Default implementation of Rep.
Definition: cxRepImpl.h:42
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42
Namespace for all CustusX production code.