RTK  2.1.0
Reconstruction Toolkit
rtkDaubechiesWaveletsDenoiseSequenceImageFilter.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 rtkDaubechiesWaveletsDenoiseSequenceImageFilter_h
20 #define rtkDaubechiesWaveletsDenoiseSequenceImageFilter_h
21 
22 #include "rtkConstantImageSource.h"
23 
24 #include <itkExtractImageFilter.h>
25 #include <itkPasteImageFilter.h>
26 #include <itkCastImageFilter.h>
28 
29 namespace rtk
30 {
73 template <typename TImageSequence>
74 class DaubechiesWaveletsDenoiseSequenceImageFilter : public itk::ImageToImageFilter<TImageSequence, TImageSequence>
75 {
76 public:
77  ITK_DISALLOW_COPY_AND_ASSIGN(DaubechiesWaveletsDenoiseSequenceImageFilter);
78 
83 
85  itkNewMacro(Self);
86 
89 
91  itkGetMacro(NumberOfLevels, unsigned int);
92  itkSetMacro(NumberOfLevels, unsigned int);
94 
96  itkGetMacro(Order, unsigned int);
97  itkSetMacro(Order, unsigned int);
99 
101  itkGetMacro(Threshold, float);
102  itkSetMacro(Threshold, float);
104 
106  using TImage = itk::Image<typename TImageSequence::PixelType, TImageSequence::ImageDimension - 1>;
112 
113 protected:
116 
118  void
119  GenerateData() override;
120 
121  void
122  GenerateOutputInformation() override;
123  void
124  GenerateInputRequestedRegion() override;
125 
132 
134  typename TImageSequence::RegionType m_ExtractAndPasteRegion;
135 
137  unsigned int m_Order{ 5 };
138  float m_Threshold{ 1 };
139  unsigned int m_NumberOfLevels{ 3 };
140 };
141 } // namespace rtk
142 
143 
144 #ifndef ITK_MANUAL_INSTANTIATION
145 # include "rtkDaubechiesWaveletsDenoiseSequenceImageFilter.hxx"
146 #endif
147 
148 #endif
Generate an n-dimensional image with constant pixel values.
#define itkSetMacro(name, type)
Applies 3D Daubechies wavelets denoising to a 3D + time sequence of images.
~DaubechiesWaveletsDenoiseSequenceImageFilter() override=default
Deconstructs an image, soft thresholds its wavelets coefficients, then reconstructs.