ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkWaveletFrequencyForward.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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#ifndef itkWaveletFrequencyForward_h
19#define itkWaveletFrequencyForward_h
20
24#include <complex>
25#include <itkFixedArray.h>
29
30namespace itk
31{
46template <typename TInputImage,
47 typename TOutputImage,
48 typename TWaveletFilterBank,
49 typename TFrequencyShrinkFilterType = FrequencyShrinkImageFilter<TOutputImage>>
50// FrequencyShrinkViaInverseFFTImageFilter<TOutputImage> >
51class WaveletFrequencyForward : public ImageToImageFilter<TInputImage, TOutputImage>
52{
53public:
54 ITK_DISALLOW_COPY_AND_MOVE(WaveletFrequencyForward);
55
61
68
69 using OutputsType = typename std::vector<OutputImagePointer>;
70 // using OutputsType = typename itk::VectorContainer<OutputImagePointer>;
71
74 using OutputImageRegionType = typename OutputImageType::RegionType;
75
76 using WaveletFilterBankType = TWaveletFilterBank;
77 using WaveletFilterBankPointer = typename WaveletFilterBankType::Pointer;
78 using WaveletFunctionType = typename WaveletFilterBankType::WaveletFunctionType;
79 using FunctionValueType = typename WaveletFilterBankType::FunctionValueType;
80
81 using FrequencyShrinkFilterType = TFrequencyShrinkFilterType;
82
84 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
85
87 itkNewMacro(Self);
88
90 itkOverrideGetNameOfClassMacro(WaveletFrequencyForward);
91 virtual void
92 SetLevels(unsigned int n);
93
94 itkGetConstReferenceMacro(Levels, unsigned int);
95 virtual void
96 SetHighPassSubBands(unsigned int n);
97
98 itkGetConstReferenceMacro(HighPassSubBands, unsigned int);
99 itkGetConstReferenceMacro(TotalOutputs, unsigned int);
100
103 itkGetConstReferenceMacro(ScaleFactor, unsigned int);
104 // itkSetMacro(ScaleFactor, unsigned int);
105
107 itkGetModifiableObjectMacro(WaveletFilterBank, WaveletFilterBankType);
109 virtual WaveletFunctionType *
111 {
112 return this->GetModifiableWaveletFilterBank()->GetModifiableWaveletFunction();
113 }
114
117 itkSetMacro(StoreWaveletFilterBankPyramid, bool);
118 itkGetMacro(StoreWaveletFilterBankPyramid, bool);
119 itkBooleanMacro(StoreWaveletFilterBankPyramid);
120
121 itkGetMacro(WaveletFilterBankPyramid, OutputsType);
122
127 static unsigned int
128 ComputeMaxNumberOfLevels(const typename InputImageType::SizeType & input_size, const unsigned int scaleFactor = 2);
129
133 using IndexPairType = std::pair<unsigned int, unsigned int>;
139 OutputIndexToLevelBand(unsigned int linear_index);
140
144
147
150
152 GetOutputsHighPassByLevel(unsigned int level);
153
154protected:
156 ~WaveletFrequencyForward() override = default;
157 void
158 PrintSelf(std::ostream & os, Indent indent) const override;
159
161 void
162 GenerateData() override;
163
164 /************ Information *************/
165
174 void
176
182 void
184
192 void
194
195private:
196 unsigned int m_Levels{ 1 };
197 unsigned int m_HighPassSubBands{ 1 };
198 unsigned int m_TotalOutputs{ 1 };
199 unsigned int m_ScaleFactor{ 2 };
203};
204} // end namespace itk
205#ifndef ITK_MANUAL_INSTANTIATION
206# include "itkWaveletFrequencyForward.hxx"
207#endif
208
209#endif
Base class for all data objects in ITK.
Reduce the size of an image in the frequency domain by an integer factor –fixed to 2 at the moment– i...
Read-only ImageRegionIterator: ImageRegionConstIterator<TImage> behaves as ImageRegionIterator<const ...
A multi-dimensional iterator templated over image type that walks a region of pixels.
TOutputImage OutputImageType
typename OutputImageType::Pointer OutputImagePointer
typename InputImageType::ConstPointer InputImageConstPointer
typename InputImageType::Pointer InputImagePointer
Control indentation during Print() invocation.
Definition itkIndent.h:53
Implements transparent reference counting.
void GenerateOutputRequestedRegion(DataObject *output) override
void GenerateOutputInformation() override
void GenerateData() override
virtual WaveletFilterBankType * GetModifiableWaveletFilterBank()
void GenerateInputRequestedRegion() override
IndexPairType OutputIndexToLevelBand(unsigned int linear_index)
virtual void SetLevels(unsigned int n)
OutputImagePointer GetOutputLowPass()
static unsigned int ComputeMaxNumberOfLevels(const typename InputImageType::SizeType &input_size, const unsigned int scaleFactor=2)
OutputsType GetOutputsHighPassByLevel(unsigned int level)
OutputsType GetOutputsHighPass()
void PrintSelf(std::ostream &os, Indent indent) const override
virtual void SetHighPassSubBands(unsigned int n)
virtual WaveletFunctionType * GetModifiableWaveletFunction()
~WaveletFrequencyForward() override=default
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
#define itkSetMacro(name, type)