OTB  10.0.0
Orfeo Toolbox
otbForwardFourierMellinTransformImageFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2024 Centre National d'Etudes Spatiales (CNES)
3  *
4  * This file is part of Orfeo Toolbox
5  *
6  * https://www.orfeo-toolbox.org/
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 
22 #ifndef otbForwardFourierMellinTransformImageFilter_h
23 #define otbForwardFourierMellinTransformImageFilter_h
24 
25 #include "otbImage.h"
26 #include "itkForwardFFTImageFilter.h"
27 #include "otbLogPolarTransform.h"
28 #include "itkResampleImageFilter.h"
29 #include "itkImageRegionIteratorWithIndex.h"
30 
31 namespace otb
32 {
33 
51 template <class TPixel, class TInterpol, unsigned int Dimension = 2>
52 
54  : public itk::ImageToImageFilter<Image<TPixel, Dimension>, itk::Image<std::complex<TPixel>, Dimension>>
55 {
56 public:
57  // typedef TPixel PixelType;
59  /* typedef otb::Image< std::complex< TPixel > , Dimension > OutputImageType; */
60 
61  typedef typename itk::ForwardFFTImageFilter<InputImageType> FourierImageFilterType;
62  typedef typename FourierImageFilterType::OutputImageType OutputImageType;
63 
66  typedef itk::ImageToImageFilter<InputImageType, OutputImageType> Superclass;
67  typedef itk::SmartPointer<Self> Pointer;
68  typedef itk::SmartPointer<const Self> ConstPointer;
69 
71  itkTypeMacro(ForwardFourierMellinTransformImageFilter, itk::ImageToImageFilter);
72 
74  itkNewMacro(Self);
75 
83 
85  typedef typename OutputImageType::PixelType OutputPixelType;
86  typedef typename OutputImageType::IndexType OutputIndexType;
87  typedef typename OutputImageType::SizeType OutputSizeType;
88  typedef typename OutputImageType::Pointer OutputImagePointer;
89  typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
90  typedef typename OutputImageType::RegionType OutputImageRegionType;
91 
92  typedef typename OutputImageType::PixelType ComplexType;
93 
95  typedef TInterpol InterpolatorType;
96  typedef typename InterpolatorType::Pointer InterpolatorPointerType;
97  typedef typename InterpolatorType::ConstPointer InterpolatorConstPointerType;
98  typedef typename InterpolatorType::CoordRepType CoordRepType;
99  typedef typename InterpolatorType::PointType PointType;
100 
103  typedef itk::ResampleImageFilter<InputImageType, InputImageType, CoordRepType> ResampleFilterType;
104  typedef typename ResampleFilterType::Pointer ResampleFilterPointerType;
105  typedef itk::ImageRegionIteratorWithIndex<InputImageType> IteratorType;
106 
107  typedef typename FourierImageFilterType::Pointer FourierImageFilterPointer;
108  typedef typename FourierImageFilterType::ConstPointer FourierImageFilterConstPointer;
109 
111  itkSetMacro(OutputSize, OutputSizeType);
112  itkGetMacro(OutputSize, OutputSizeType);
114 
116  itkSetMacro(Sigma, double);
117  itkGetMacro(Sigma, double);
119 
121  itkSetMacro(DefaultPixelValue, PixelType);
122  itkGetMacro(DefaultPixelValue, PixelType);
124 
126  itkSetObjectMacro(Interpolator, InterpolatorType);
129 
130 protected:
133  {
134  }
135  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
136 
137  void GenerateOutputInformation(void) override;
138 
139  void GenerateInputRequestedRegion(void) override;
140 
142  void GenerateData() override;
143 
144 private:
146  void operator=(const Self&) = delete;
147 
149  double m_Sigma;
150 
153 
156 
159 
162 
165 
168 };
169 
170 } // namespace otb
171 
172 #ifndef OTB_MANUAL_INSTANTIATION
174 #endif
175 
176 #endif
Calculate the Fourier-Mellin transform over an image.
itk::ImageRegionIteratorWithIndex< InputImageType > IteratorType
itkGetObjectMacro(Interpolator, InterpolatorType)
itk::ImageToImageFilter< InputImageType, OutputImageType > Superclass
void PrintSelf(std::ostream &os, itk::Indent indent) const override
ForwardFourierMellinTransformImageFilter(const Self &)=delete
itk::ForwardFFTImageFilter< InputImageType > FourierImageFilterType
itk::ResampleImageFilter< InputImageType, InputImageType, CoordRepType > ResampleFilterType
Creation of an "otb" image which contains metadata.
Definition: otbImage.h:92
Superclass::PixelType PixelType
Definition: otbImage.h:107
itk::SmartPointer< Self > Pointer
Definition: otbImage.h:97
Superclass::SpacingType SpacingType
Definition: otbImage.h:158
Superclass::SizeType SizeType
Definition: otbImage.h:148
Superclass::IndexType IndexType
Definition: otbImage.h:142
itk::SmartPointer< const Self > ConstPointer
Definition: otbImage.h:98
Implement the log-polar coordinate transform.
itk::SmartPointer< Self > Pointer
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.