RTK  1.4.0
Reconstruction Toolkit
rtkDeconstructSoftThresholdReconstructImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright RTK Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 
19 #ifndef rtkDeconstructSoftThresholdReconstructImageFilter_h
20 #define rtkDeconstructSoftThresholdReconstructImageFilter_h
21 
22 //ITK includes
23 #include "itkMacro.h"
24 #include "itkProgressReporter.h"
25 
26 //rtk includes
30 
31 namespace rtk {
32 
45 template <class TImage>
47  : public itk::ImageToImageFilter<TImage,TImage>
48 {
49 public:
50 
56 
58  itkNewMacro(Self)
59 
60 
62 
64  itkStaticConstMacro(ImageDimension, unsigned int, TImage::ImageDimension);
65 
67  typedef typename Superclass::InputImageType InputImageType;
68  typedef typename Superclass::OutputImageType OutputImageType;
69  typedef typename Superclass::InputImagePointer InputImagePointer;
70  typedef typename Superclass::OutputImagePointer OutputImagePointer;
71  typedef typename Superclass::InputImageConstPointer InputImageConstPointer;
72  typedef typename TImage::PixelType PixelType;
73  typedef typename TImage::InternalPixelType InternalPixelType;
74 
78  typedef rtk::SoftThresholdImageFilter<InputImageType, InputImageType> SoftThresholdFilterType;
79 
81  void SetNumberOfLevels(unsigned int levels);
82 
84  itkGetMacro(Order, unsigned int)
85  itkSetMacro(Order, unsigned int)
86 
88  itkGetMacro(Threshold, float)
89  itkSetMacro(Threshold, float)
90 
91 protected:
92  DeconstructSoftThresholdReconstructImageFilter();
93  virtual ~DeconstructSoftThresholdReconstructImageFilter() ITK_OVERRIDE {}
94  void PrintSelf(std::ostream&os, itk::Indent indent) const ITK_OVERRIDE;
95 
97  void GenerateData() ITK_OVERRIDE;
98 
100  void GenerateOutputInformation() ITK_OVERRIDE;
101 
102  void GenerateInputRequestedRegion() ITK_OVERRIDE;
103 
104 private:
105  DeconstructSoftThresholdReconstructImageFilter(const Self&); //purposely not implemented
106  void operator=(const Self&); //purposely not implemented
107 
108  unsigned int m_Order;
109  float m_Threshold;
111 
114  std::vector<typename SoftThresholdFilterType::Pointer> m_SoftTresholdFilters; //Holds an array of soft threshold filters
115 
116 };
117 
118 }// namespace rtk
119 
120 //Include CXX
121 #ifndef rtk_MANUAL_INSTANTIATION
122 #include "rtkDeconstructSoftThresholdReconstructImageFilter.hxx"
123 #endif
124 
125 #endif
An image filter that reconstructs an image using Daubechies wavelets.
void PrintSelf(std::ostream &os, itk::Indent indent) const override
An image filter that deconstructs an image using Daubechies wavelets.
Deconstructs an image, soft thresholds its wavelets coefficients, then reconstructs.
std::vector< typename SoftThresholdFilterType::Pointer > m_SoftTresholdFilters
#define itkSetMacro(name, type)