RTK  2.0.1
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  ITK_DISALLOW_COPY_AND_ASSIGN(DeconstructSoftThresholdReconstructImageFilter);
51 
57 
59  itkNewMacro(Self)
60 
61 
63 
65  static constexpr unsigned int ImageDimension = TImage::ImageDimension;
66 
73  using PixelType = typename TImage::PixelType;
74  using InternalPixelType = typename TImage::InternalPixelType;
75 
79  using SoftThresholdFilterType = rtk::SoftThresholdImageFilter<InputImageType, InputImageType>;
80 
82  void SetNumberOfLevels(unsigned int levels);
83 
85  itkGetMacro(Order, unsigned int)
86  itkSetMacro(Order, unsigned int)
87 
89  itkGetMacro(Threshold, float)
90  itkSetMacro(Threshold, float)
91 
92 protected:
93  DeconstructSoftThresholdReconstructImageFilter();
94  ~DeconstructSoftThresholdReconstructImageFilter() override = default;
95  void PrintSelf(std::ostream&os, itk::Indent indent) const override;
96 
98  void GenerateData() override;
99 
101  void GenerateOutputInformation() override;
102 
103  void GenerateInputRequestedRegion() override;
104 
105 private:
106  unsigned int m_Order;
107  float m_Threshold;
109 
112  std::vector<typename SoftThresholdFilterType::Pointer> m_SoftTresholdFilters; //Holds an array of soft threshold filters
113 
114 };
115 
116 }// namespace rtk
117 
118 //Include CXX
119 #ifndef rtk_MANUAL_INSTANTIATION
120 #include "rtkDeconstructSoftThresholdReconstructImageFilter.hxx"
121 #endif
122 
123 #endif
STL namespace.
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)