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  itkOverrideGetNameOfClassMacro(DeconstructSoftThresholdReconstructImageFilter);
64 
66  static constexpr unsigned int ImageDimension = TImage::ImageDimension;
67 
69  using InputImageType = typename Superclass::InputImageType;
70  using OutputImageType = typename Superclass::OutputImageType;
71  using InputImagePointer = typename Superclass::InputImagePointer;
72  using OutputImagePointer = typename Superclass::OutputImagePointer;
73  using InputImageConstPointer = typename Superclass::InputImageConstPointer;
74  using PixelType = typename TImage::PixelType;
75  using InternalPixelType = typename TImage::InternalPixelType;
76 
81 
83  void
84  SetNumberOfLevels(unsigned int levels);
85 
87  itkGetMacro(Order, unsigned int);
88  itkSetMacro(Order, unsigned int);
90 
92  itkGetMacro(Threshold, float);
93  itkSetMacro(Threshold, float);
95 
96 protected:
99  void
100  PrintSelf(std::ostream & os, itk::Indent indent) const override;
101 
103  void
104  GenerateData() override;
105 
107  void
108  GenerateOutputInformation() override;
109 
110  void
111  GenerateInputRequestedRegion() override;
112 
113 private:
114  unsigned int m_Order;
115  float m_Threshold;
117 
120  std::vector<typename SoftThresholdFilterType::Pointer>
121  m_SoftTresholdFilters; // Holds an array of soft threshold filters
122 };
123 
124 } // namespace rtk
125 
126 // Include CXX
127 #ifndef rtk_MANUAL_INSTANTIATION
128 # include "rtkDeconstructSoftThresholdReconstructImageFilter.hxx"
129 #endif
130 
131 #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