RTK  1.4.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 {
72 template< typename TImageSequence >
73 class DaubechiesWaveletsDenoiseSequenceImageFilter : public itk::ImageToImageFilter<TImageSequence, TImageSequence>
74 {
75 public:
80 
82  itkNewMacro(Self)
83 
84 
86 
88  itkGetMacro(NumberOfLevels, unsigned int)
89  itkSetMacro(NumberOfLevels, unsigned int)
90 
92  itkGetMacro(Order, unsigned int)
93  itkSetMacro(Order, unsigned int)
94 
96  itkGetMacro(Threshold, float)
97  itkSetMacro(Threshold, float)
98 
100  typedef itk::Image<typename TImageSequence::PixelType,
101  TImageSequence::ImageDimension - 1> TImage;
103  typedef itk::ExtractImageFilter<TImageSequence, TImage> ExtractFilterType;
104  typedef itk::PasteImageFilter<TImageSequence,TImageSequence> PasteFilterType;
105  typedef itk::CastImageFilter<TImage, TImageSequence> CastFilterType;
107 
108 protected:
109  DaubechiesWaveletsDenoiseSequenceImageFilter();
110  virtual ~DaubechiesWaveletsDenoiseSequenceImageFilter() ITK_OVERRIDE {}
111 
113  void GenerateData() ITK_OVERRIDE;
114 
115  void GenerateOutputInformation() ITK_OVERRIDE;
116  void GenerateInputRequestedRegion() ITK_OVERRIDE;
117 
120  typename ExtractFilterType::Pointer m_ExtractFilter;
124 
126  typename TImageSequence::RegionType m_ExtractAndPasteRegion;
127 
129  unsigned int m_Order;
130  float m_Threshold;
131  unsigned int m_NumberOfLevels;
132 
133 private:
134  DaubechiesWaveletsDenoiseSequenceImageFilter(const Self &); //purposely not implemented
135  void operator=(const Self &); //purposely not implemented
136 };
137 } //namespace ITK
138 
139 
140 #ifndef ITK_MANUAL_INSTANTIATION
141 #include "rtkDaubechiesWaveletsDenoiseSequenceImageFilter.hxx"
142 #endif
143 
144 #endif
typename Superclass::PixelType PixelType
Generate an n-dimensional image with constant pixel values.
itk::ImageToImageFilter< TImageSequence, TImageSequence > Superclass
Applies 3D Daubechies wavelets denoising to a 3D + time sequence of images.
Deconstructs an image, soft thresholds its wavelets coefficients, then reconstructs.
#define itkSetMacro(name, type)