OTB  9.0.0
Orfeo Toolbox
otbForwardFourierMellinTransformImageFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2022 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 
77  typedef typename InputImageType::PixelType PixelType;
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);
127  itkGetObjectMacro(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:
145  ForwardFourierMellinTransformImageFilter(const Self&) = delete;
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
otb::ForwardFourierMellinTransformImageFilter::m_ResampleFilter
ResampleFilterPointerType m_ResampleFilter
Definition: otbForwardFourierMellinTransformImageFilter.h:164
otb::ForwardFourierMellinTransformImageFilter::OutputImagePointer
OutputImageType::Pointer OutputImagePointer
Definition: otbForwardFourierMellinTransformImageFilter.h:88
otb::ForwardFourierMellinTransformImageFilter::~ForwardFourierMellinTransformImageFilter
~ForwardFourierMellinTransformImageFilter() override
Definition: otbForwardFourierMellinTransformImageFilter.h:132
otbLogPolarTransform.h
otb::ForwardFourierMellinTransformImageFilter::ComplexType
OutputImageType::PixelType ComplexType
Definition: otbForwardFourierMellinTransformImageFilter.h:92
otb::ForwardFourierMellinTransformImageFilter::Self
ForwardFourierMellinTransformImageFilter Self
Definition: otbForwardFourierMellinTransformImageFilter.h:65
otb::ForwardFourierMellinTransformImageFilter::PointType
InterpolatorType::PointType PointType
Definition: otbForwardFourierMellinTransformImageFilter.h:99
otb::ForwardFourierMellinTransformImageFilter::m_Interpolator
InterpolatorPointerType m_Interpolator
Definition: otbForwardFourierMellinTransformImageFilter.h:158
otb::ForwardFourierMellinTransformImageFilter::CoordRepType
InterpolatorType::CoordRepType CoordRepType
Definition: otbForwardFourierMellinTransformImageFilter.h:98
otb::ForwardFourierMellinTransformImageFilter::LogPolarTransformPointerType
LogPolarTransformType::Pointer LogPolarTransformPointerType
Definition: otbForwardFourierMellinTransformImageFilter.h:102
otbImage.h
otb::ForwardFourierMellinTransformImageFilter::ResampleFilterType
itk::ResampleImageFilter< InputImageType, InputImageType, CoordRepType > ResampleFilterType
Definition: otbForwardFourierMellinTransformImageFilter.h:103
otb::ForwardFourierMellinTransformImageFilter::PixelType
InputImageType::PixelType PixelType
Definition: otbForwardFourierMellinTransformImageFilter.h:74
otb::ForwardFourierMellinTransformImageFilter::InputImageType
Image< TPixel, Dimension > InputImageType
Definition: otbForwardFourierMellinTransformImageFilter.h:58
otb::Image::IndexType
Superclass::IndexType IndexType
Definition: otbImage.h:142
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::Image
Creation of an "otb" image which contains metadata.
Definition: otbImage.h:89
otb::ForwardFourierMellinTransformImageFilter::ImageConstPointer
InputImageType::ConstPointer ImageConstPointer
Definition: otbForwardFourierMellinTransformImageFilter.h:80
otb::ForwardFourierMellinTransformImageFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbForwardFourierMellinTransformImageFilter.h:67
otb::ForwardFourierMellinTransformImageFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbForwardFourierMellinTransformImageFilter.h:68
otb::ForwardFourierMellinTransformImageFilter::FourierImageFilterType
itk::ForwardFFTImageFilter< InputImageType > FourierImageFilterType
Definition: otbForwardFourierMellinTransformImageFilter.h:61
otb::ForwardFourierMellinTransformImageFilter::Superclass
itk::ImageToImageFilter< InputImageType, OutputImageType > Superclass
Definition: otbForwardFourierMellinTransformImageFilter.h:66
otb::ForwardFourierMellinTransformImageFilter::OutputImageType
FourierImageFilterType::OutputImageType OutputImageType
Definition: otbForwardFourierMellinTransformImageFilter.h:62
otb::ForwardFourierMellinTransformImageFilter::m_Transform
LogPolarTransformPointerType m_Transform
Definition: otbForwardFourierMellinTransformImageFilter.h:161
otbForwardFourierMellinTransformImageFilter.hxx
otb::ForwardFourierMellinTransformImageFilter
Calculate the Fourier-Mellin transform over an image.
Definition: otbForwardFourierMellinTransformImageFilter.h:53
otb::ForwardFourierMellinTransformImageFilter::m_FFTFilter
FourierImageFilterPointer m_FFTFilter
Definition: otbForwardFourierMellinTransformImageFilter.h:167
otb::ForwardFourierMellinTransformImageFilter::IndexType
InputImageType::IndexType IndexType
Definition: otbForwardFourierMellinTransformImageFilter.h:78
otb::ForwardFourierMellinTransformImageFilter::InterpolatorType
TInterpol InterpolatorType
Definition: otbForwardFourierMellinTransformImageFilter.h:95
otb::ForwardFourierMellinTransformImageFilter::OutputSizeType
OutputImageType::SizeType OutputSizeType
Definition: otbForwardFourierMellinTransformImageFilter.h:87
otb::ForwardFourierMellinTransformImageFilter::FourierImageFilterConstPointer
FourierImageFilterType::ConstPointer FourierImageFilterConstPointer
Definition: otbForwardFourierMellinTransformImageFilter.h:108
otb::ForwardFourierMellinTransformImageFilter::OutputPixelType
OutputImageType::PixelType OutputPixelType
Definition: otbForwardFourierMellinTransformImageFilter.h:85
otb::Image::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbImage.h:98
otb::ForwardFourierMellinTransformImageFilter::FourierImageFilterPointer
FourierImageFilterType::Pointer FourierImageFilterPointer
Definition: otbForwardFourierMellinTransformImageFilter.h:107
otb::LogPolarTransform
Implement the log-polar coordinate transform.
Definition: otbLogPolarTransform.h:49
otb::ForwardFourierMellinTransformImageFilter::m_DefaultPixelValue
PixelType m_DefaultPixelValue
Definition: otbForwardFourierMellinTransformImageFilter.h:155
otb::ForwardFourierMellinTransformImageFilter::OutputImageRegionType
OutputImageType::RegionType OutputImageRegionType
Definition: otbForwardFourierMellinTransformImageFilter.h:90
otb::ForwardFourierMellinTransformImageFilter::IteratorType
itk::ImageRegionIteratorWithIndex< InputImageType > IteratorType
Definition: otbForwardFourierMellinTransformImageFilter.h:105
otb::ForwardFourierMellinTransformImageFilter::SpacingType
InputImageType::SpacingType SpacingType
Definition: otbForwardFourierMellinTransformImageFilter.h:82
otb::ForwardFourierMellinTransformImageFilter::m_Sigma
double m_Sigma
Definition: otbForwardFourierMellinTransformImageFilter.h:149
otb::ForwardFourierMellinTransformImageFilter::OutputIndexType
OutputImageType::IndexType OutputIndexType
Definition: otbForwardFourierMellinTransformImageFilter.h:86
otb::ForwardFourierMellinTransformImageFilter::LogPolarTransformType
LogPolarTransform< CoordRepType > LogPolarTransformType
Definition: otbForwardFourierMellinTransformImageFilter.h:101
otb::Image::SpacingType
Superclass::SpacingType SpacingType
Definition: otbImage.h:158
otb::ForwardFourierMellinTransformImageFilter::ResampleFilterPointerType
ResampleFilterType::Pointer ResampleFilterPointerType
Definition: otbForwardFourierMellinTransformImageFilter.h:104
otb::ForwardFourierMellinTransformImageFilter::SizeType
InputImageType::SizeType SizeType
Definition: otbForwardFourierMellinTransformImageFilter.h:81
otb::Image::PixelType
Superclass::PixelType PixelType
Definition: otbImage.h:107
otb::LogPolarTransform::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbLogPolarTransform.h:55
otb::Image::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbImage.h:97
otb::ForwardFourierMellinTransformImageFilter::OutputImageConstPointer
OutputImageType::ConstPointer OutputImageConstPointer
Definition: otbForwardFourierMellinTransformImageFilter.h:89
otb::ForwardFourierMellinTransformImageFilter::InterpolatorPointerType
InterpolatorType::Pointer InterpolatorPointerType
Definition: otbForwardFourierMellinTransformImageFilter.h:96
otb::ForwardFourierMellinTransformImageFilter::InterpolatorConstPointerType
InterpolatorType::ConstPointer InterpolatorConstPointerType
Definition: otbForwardFourierMellinTransformImageFilter.h:97
otb::ForwardFourierMellinTransformImageFilter::m_OutputSize
OutputSizeType m_OutputSize
Definition: otbForwardFourierMellinTransformImageFilter.h:152
otb::ForwardFourierMellinTransformImageFilter::ImagePointer
InputImageType::Pointer ImagePointer
Definition: otbForwardFourierMellinTransformImageFilter.h:79
otb::Image::SizeType
Superclass::SizeType SizeType
Definition: otbImage.h:148