RTK  2.0.1
Reconstruction Toolkit
rtkDaubechiesWaveletsConvolutionImageFilter.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 rtkDaubechiesWaveletsConvolutionImageFilter_h
20 #define rtkDaubechiesWaveletsConvolutionImageFilter_h
21 
22 //Includes
23 #include <itkImageToImageFilter.h>
25 
26 #include "rtkMacro.h"
27 
28 namespace rtk {
29 
43 template<typename TImage>
45 {
46 public:
47  ITK_DISALLOW_COPY_AND_ASSIGN(DaubechiesWaveletsConvolutionImageFilter);
48 
49  enum Pass
50  {
51  Low = 0x0, //Indicates to return the low-pass filter coefficients
52  High= 0x1 //Indicates to return the high-pass filter coefficients
53  };
54 
55  enum Type
56  {
57  Deconstruct = 0x0, //Indicates to deconstruct the image into levels/bands
58  Reconstruct = 0x1 //Indicates to reconstruct the image from levels/bands
59  };
60 
61 
67 
69  using OutputImageType = TImage;
70 
72  using OutputImagePixelType = typename TImage::PixelType;
73 
75  using OutputImageRegionType = typename TImage::RegionType;
76 
79 
82 
83 
84  itkNewMacro(Self)
85 
88 
90  void SetDeconstruction();
91 
93  void SetReconstruction();
94 
96  void PrintSelf(std::ostream& os, itk::Indent i) const override;
97 
99  itkSetMacro(Order, unsigned int);
100  itkGetConstMacro(Order, unsigned int);
102 
105  itkGetMacro(Pass, PassVector);
107 
108 protected:
110  ~DaubechiesWaveletsConvolutionImageFilter() override;
111 
112  using CoefficientVector = std::vector<typename TImage::PixelType>;
113 
116 
118  void GenerateData() override;
119 
121  void GenerateOutputInformation() override;
122 
123 private:
124 
131 
133  unsigned int m_Order{3};
134 
136  PassVector m_Pass{PassVector(typename PassVector::ComponentType(0))};
137 
140 };
141 
142 }// namespace rtk
143 
144 //Include CXX
145 #ifndef rtk_MANUAL_INSTANTIATION
146 #include "rtkDaubechiesWaveletsConvolutionImageFilter.hxx"
147 #endif
148 
149 #endif
CoefficientVector GenerateCoefficientsHighpassReconstruct()
typename itk::ConvolutionImageFilter< TImage > ConvolutionFilterType
void PrintSelf(std::ostream &os, itk::Indent i) const override
STL namespace.
typename itk::Vector< typename Self::Pass, TImage::ImageDimension > PassVector
Creates a Daubechies wavelets kernel image with the requested attributes (order, type, pass along each dimension)
CoefficientVector GenerateCoefficientsHighpassDeconstruct()
CoefficientVector GenerateCoefficientsLowpassDeconstruct()
CoefficientVector GenerateCoefficientsLowpassReconstruct()
#define itkSetMacro(name, type)