Fraxinus  2023.01.05-dev+develop.0da12
An IGT application
cxImage2DRep3D.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 CXIMAGE2DREP3D_H_
12 #define CXIMAGE2DREP3D_H_
13 
14 #include "cxResourceVisualizationExport.h"
15 
16 #include "cxRepImpl.h"
17 #include "cxForwardDeclarations.h"
18 #include "vtkForwardDeclarations.h"
19 #include "cxTransform3D.h"
20 
21 namespace cx
22 {
23 typedef boost::shared_ptr<class ApplyLUTToImage2DProxy> ApplyLUTToImage2DProxyPtr;
24 }
25 
26 namespace cx
27 {
28 
29 typedef boost::shared_ptr<class Image2DProxy> Image2DProxyPtr;
30 
45 class cxResourceVisualization_EXPORT Image2DProxy : public QObject
46 {
47 Q_OBJECT
48 public:
49  static Image2DProxyPtr New();
50  virtual ~Image2DProxy();
51 // void setViewportData(const Transform3D& vpMs, const DoubleBoundingBox3D& vp); // DEPRECATED: use zoomfactor in View and the object will auto-update
52  void setImage(ImagePtr image);
53 // void setSliceProxy(SliceProxyPtr slicer);
54 // SliceProxyPtr getSliceProxy() { return mSliceProxy; }
55 // void update();
56  void setTargetSpaceToR();
57  vtkImageActorPtr getActor();
58 
59  void setTransformOffset(Transform3D rMrr);
60 protected:
61  Image2DProxy();
62 
63 private slots:
64  void transformChangedSlot();
65  void transferFunctionsChangedSlot();
66  void vtkImageDataChangedSlot();
67 private:
68  ApplyLUTToImage2DProxyPtr mImageWithLUTProxy;
69  ImagePtr mImage;
70  vtkImageActorPtr mActor;
71  Transform3D m_rMrr;
72 };
73 
74 
75 
76 
77 typedef boost::shared_ptr<class Image2DRep3D> Image2DRep3DPtr;
78 
89 class cxResourceVisualization_EXPORT Image2DRep3D: public RepImpl
90 {
91 Q_OBJECT
92 public:
93  static Image2DRep3DPtr New(QString uid="") { return wrap_new(new Image2DRep3D(), uid); }
94  virtual ~Image2DRep3D();
95  virtual QString getType() const { return "cx::Image2DRep3D"; }
96 
97  void setImage(ImagePtr image);
98 
99 protected:
100  Image2DRep3D();
101  virtual void addRepActorsToViewRenderer(ViewPtr view);
102  virtual void removeRepActorsFromViewRenderer(ViewPtr view);
103 
104 private:
105  Image2DProxyPtr mProxy;
106 };
107 //---------------------------------------------------------
108 }//end namespace
109 //---------------------------------------------------------
110 
111 #endif // CXIMAGE2DREP3D_H_
Slice volumes using a SliceProxy.
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
boost::shared_ptr< class Image > ImagePtr
Definition: cxDicomWidget.h:27
vtkSmartPointer< class vtkImageActor > vtkImageActorPtr
boost::shared_ptr< class View > ViewPtr
boost::shared_ptr< class ApplyLUTToImage2DProxy > ApplyLUTToImage2DProxyPtr
Display a 2D Volume in 3D.
Default implementation of Rep.
Definition: cxRepImpl.h:42
boost::shared_ptr< class Image2DRep3D > Image2DRep3DPtr
virtual QString getType() const
boost::shared_ptr< class Image2DProxy > Image2DProxyPtr
static Image2DRep3DPtr New(QString uid="")
Namespace for all CustusX production code.