RTK  1.4.0
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 
48  enum Pass
49  {
50  Low = 0x0, //Indicates to return the low-pass filter coefficients
51  High= 0x1 //Indicates to return the high-pass filter coefficients
52  };
53 
54  enum Type
55  {
56  Deconstruct = 0x0, //Indicates to deconstruct the image into levels/bands
57  Reconstruct = 0x1 //Indicates to reconstruct the image from levels/bands
58  };
59 
60 
66 
68  typedef TImage OutputImageType;
69 
71  typedef typename TImage::PixelType OutputImagePixelType;
72 
74  typedef typename TImage::RegionType OutputImageRegionType;
75 
78 
81 
82 
83  itkNewMacro(Self)
84 
87 
89  void SetDeconstruction();
90 
92  void SetReconstruction();
93 
95  void PrintSelf(std::ostream& os, itk::Indent i) const ITK_OVERRIDE;
96 
98  itkSetMacro(Order, unsigned int);
99  itkGetConstMacro(Order, unsigned int);
101 
103  itkSetMacro(Pass, PassVector);
104  itkGetMacro(Pass, PassVector);
106 
107 protected:
109  virtual ~DaubechiesWaveletsConvolutionImageFilter() ITK_OVERRIDE;
110 
111  typedef std::vector<typename TImage::PixelType> CoefficientVector;
112 
114  CoefficientVector GenerateCoefficients();
115 
117  void GenerateData() ITK_OVERRIDE;
118 
120  void GenerateOutputInformation() ITK_OVERRIDE;
121 
122 private:
123 
125  CoefficientVector GenerateCoefficientsLowpassDeconstruct();
126  CoefficientVector GenerateCoefficientsHighpassDeconstruct();
127  CoefficientVector GenerateCoefficientsLowpassReconstruct();
128  CoefficientVector GenerateCoefficientsHighpassReconstruct();
130 
132  unsigned int m_Order;
133 
135  PassVector m_Pass;
136 
139 };
140 
141 }// namespace rtk
142 
143 //Include CXX
144 #ifndef rtk_MANUAL_INSTANTIATION
145 #include "rtkDaubechiesWaveletsConvolutionImageFilter.hxx"
146 #endif
147 
148 #endif
typename Superclass::PixelType PixelType
CoefficientVector GenerateCoefficientsHighpassReconstruct()
void PrintSelf(std::ostream &os, itk::Indent i) const override
itk::Vector< typename Self::Pass, TImage::ImageDimension > PassVector
STL namespace.
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)