RTK  2.6.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  * https://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 {
33 
46 template <class TImage>
48  : public itk::ImageToImageFilter<TImage, TImage>
49 {
50 public:
51  ITK_DISALLOW_COPY_AND_MOVE(DeconstructSoftThresholdReconstructImageFilter);
52 
58 
60  itkNewMacro(Self);
61 
63 #ifdef itkOverrideGetNameOfClassMacro
64  itkOverrideGetNameOfClassMacro(DeconstructSoftThresholdReconstructImageFilter);
65 #else
67 #endif
68 
69 
71  static constexpr unsigned int ImageDimension = TImage::ImageDimension;
72 
74  using InputImageType = typename Superclass::InputImageType;
75  using OutputImageType = typename Superclass::OutputImageType;
76  using InputImagePointer = typename Superclass::InputImagePointer;
77  using OutputImagePointer = typename Superclass::OutputImagePointer;
78  using InputImageConstPointer = typename Superclass::InputImageConstPointer;
79  using PixelType = typename TImage::PixelType;
80  using InternalPixelType = typename TImage::InternalPixelType;
81 
86 
88  void
89  SetNumberOfLevels(unsigned int levels);
90 
92  itkGetMacro(Order, unsigned int);
93  itkSetMacro(Order, unsigned int);
95 
97  itkGetMacro(Threshold, float);
98  itkSetMacro(Threshold, float);
100 
101 protected:
104  void
105  PrintSelf(std::ostream & os, itk::Indent indent) const override;
106 
108  void
109  GenerateData() override;
110 
112  void
113  GenerateOutputInformation() override;
114 
115  void
116  GenerateInputRequestedRegion() override;
117 
118 private:
119  unsigned int m_Order;
120  float m_Threshold;
122 
125  std::vector<typename SoftThresholdFilterType::Pointer>
126  m_SoftTresholdFilters; // Holds an array of soft threshold filters
127 };
128 
129 } // namespace rtk
130 
131 // Include CXX
132 #ifndef rtk_MANUAL_INSTANTIATION
133 # include "rtkDeconstructSoftThresholdReconstructImageFilter.hxx"
134 #endif
135 
136 #endif
typename OutputImageType::Pointer OutputImagePointer
An image filter that reconstructs an image using Daubechies wavelets.
#define itkSetMacro(name, type)
TOutputImage OutputImageType
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