NorMIT-nav  22.09
An IGT application
cxSlicedImageProxy.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 CXSLICEDIMAGEPROXY_H_
14 #define CXSLICEDIMAGEPROXY_H_
15 
16 #include "cxResourceExport.h"
17 
18 #include <QObject>
19 #include "cxIndent.h"
20 #include "cxTransform3D.h"
21 #include "vtkForwardDeclarations.h"
22 
23 namespace cx
24 {
25 // forward declarations
26 typedef boost::shared_ptr<class Image> ImagePtr;
27 typedef boost::shared_ptr<class SliceProxy> SliceProxyPtr;
28 typedef boost::shared_ptr<class SliceProxyInterface> SliceProxyInterfacePtr;
29 
30 typedef boost::shared_ptr<class SlicedImageProxy> SlicedImageProxyPtr;
31 typedef boost::shared_ptr<class ApplyLUTToImage2DProxy> ApplyLUTToImage2DProxyPtr;
32 
48 class cxResource_EXPORT ApplyLUTToImage2DProxy : public QObject
49 {
50 Q_OBJECT
51 public:
53  virtual ~ApplyLUTToImage2DProxy();
54  void setInputData(vtkImageDataPtr image, vtkLookupTablePtr lut);
55  void setInput(vtkImageAlgorithmPtr input, vtkLookupTablePtr lut);
56  vtkImageDataPtr getOutput();
57  vtkImageAlgorithmPtr getOutputPort();
58 
59 private:
60  vtkImageDataPtr mDummyImage;
61  vtkImageAlgorithmPtr mRedirecter;
62 };
63 
76 class cxResource_EXPORT SlicedImageProxy : public QObject
77 {
78 Q_OBJECT
79 public:
81  virtual ~SlicedImageProxy();
82  void setSliceProxy(SliceProxyInterfacePtr slicer);
83  void setImage(ImagePtr image);
84  ImagePtr getImage() const;
85  void setOutputFormat(Vector3D origin, Eigen::Array3i dim, Vector3D spacing);
86  void update();
87  vtkImageDataPtr getOutput();
88  vtkImageAlgorithmPtr getOutputPort();
89  vtkImageDataPtr getOutputWithoutLUT();
90  vtkImageAlgorithmPtr getOutputPortWithoutLUT();
91  void printSelf(std::ostream & os, Indent indent);
92 
93 private slots:
94  void transformChangedSlot();
95  void transferFunctionsChangedSlot();
96  void updateRedirecterSlot();
97 
98 private:
99  ApplyLUTToImage2DProxyPtr mImageWithLUTProxy;
100 
101  SliceProxyInterfacePtr mSlicer;
102  ImagePtr mImage;
103 
104  vtkImageReslicePtr mReslicer;
105  vtkMatrix4x4Ptr mMatrixAxes;
106 
107  vtkImageChangeInformationPtr mRedirecter;
108 };
109 
110 //---------------------------------------------------------
111 }//end namespace
112 //---------------------------------------------------------
113 #endif /*CXSLICEDIMAGEPROXY_H_*/
vtkMatrix4x4Ptr
vtkSmartPointer< class vtkMatrix4x4 > vtkMatrix4x4Ptr
Definition: cxMathBase.h:37
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
vtkImageDataPtr
vtkSmartPointer< class vtkImageData > vtkImageDataPtr
Definition: cxVideoConnectionWidget.h:30
cx::ApplyLUTToImage2DProxy
Helper class for applying sscLUT2D to an image.
Definition: cxSlicedImageProxy.h:48
cx::SliceProxyPtr
boost::shared_ptr< class SliceProxy > SliceProxyPtr
Definition: cxForwardDeclarations.h:96
cx::SlicedImageProxy
Helper class for slicing an image given a SliceProxy and an image.
Definition: cxSlicedImageProxy.h:76
vtkImageAlgorithmPtr
vtkSmartPointer< class vtkImageAlgorithm > vtkImageAlgorithmPtr
Definition: cxVideoConnection.h:22
vtkForwardDeclarations.h
cx::ImagePtr
boost::shared_ptr< class Image > ImagePtr
Definition: cxDicomWidget.h:27
cx::SliceProxyInterfacePtr
boost::shared_ptr< class SliceProxyInterface > SliceProxyInterfacePtr
Definition: cxSlicedImageProxy.h:28
vtkImageReslicePtr
vtkSmartPointer< class vtkImageReslice > vtkImageReslicePtr
Definition: vtkForwardDeclarations.h:79
cxIndent.h
vtkImageChangeInformationPtr
vtkSmartPointer< vtkImageChangeInformation > vtkImageChangeInformationPtr
Definition: cxImage.cpp:46
cx::Indent
Formatting class for debug printing of the ssc library.
Definition: cxIndent.h:28
cxTransform3D.h
cx::SlicedImageProxyPtr
boost::shared_ptr< class SlicedImageProxy > SlicedImageProxyPtr
Definition: cxForwardDeclarations.h:89
vtkLookupTablePtr
vtkSmartPointer< class vtkLookupTable > vtkLookupTablePtr
Definition: vtkForwardDeclarations.h:88
cx::ApplyLUTToImage2DProxyPtr
boost::shared_ptr< class ApplyLUTToImage2DProxy > ApplyLUTToImage2DProxyPtr
Definition: cxSlicedImageProxy.h:31
cx::Vector3D
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42