OTB  10.0.0
Orfeo Toolbox
otbMaximumAutocorrelationFactorImageFilter.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 #ifndef otbMaximumAutocorrelationFactorImageFilter_h
22 #define otbMaximumAutocorrelationFactorImageFilter_h
23 
24 
27 #include "itkNumericTraits.h"
28 
29 #include "vnl/vnl_vector.h"
30 #include "vnl/vnl_matrix.h"
31 
32 namespace otb
33 {
34 
68 template <class TInputImage, class TOutputImage>
69 class ITK_EXPORT MaximumAutocorrelationFactorImageFilter : public itk::ImageToImageFilter<TInputImage, TOutputImage>
70 {
71 public:
74  typedef itk::ImageToImageFilter<TInputImage, TOutputImage> Superclass;
75  typedef itk::SmartPointer<Self> Pointer;
76  typedef itk::SmartPointer<const Self> ConstPointer;
77 
79  itkNewMacro(Self);
80 
82  itkTypeMacro(MaximumAutocorrelationFactorImageFilter, ImageToImageFilter);
83 
85  typedef TInputImage InputImageType;
86  typedef typename InputImageType::Pointer InputImagePointer;
87  typedef typename InputImageType::ConstPointer InputImageConstPointer;
88  typedef typename InputImageType::RegionType InputImageRegionType;
89  typedef typename InputImageRegionType::SizeType InputImageSizeType;
90  typedef typename InputImageRegionType::IndexType InputImageIndexType;
91  typedef typename InputImageType::PixelType InputImagePixelType;
92  typedef typename InputImageType::ValueType InputImageValueType;
93  typedef TOutputImage OutputImageType;
94  typedef typename OutputImageType::Pointer OutputImagePointer;
95  typedef typename OutputImageType::RegionType OutputImageRegionType;
96  typedef typename OutputImageType::PixelType OutputImagePixelType;
97  typedef typename InputImageType::InternalPixelType InputInternalPixelType;
98  typedef typename itk::NumericTraits<InputInternalPixelType>::RealType InternalPixelType;
99 
101 
102 
107  typedef typename MatrixObjectType::ComponentType MatrixType;
108  typedef typename MatrixType::InternalMatrixType InternalMatrixType;
110 
111  typedef typename VectorType::ValueType RealType;
112  typedef vnl_vector<RealType> VnlVectorType;
113  typedef vnl_matrix<RealType> VnlMatrixType;
114 
116  itkGetMacro(V, VnlMatrixType);
117 
119  itkGetMacro(AutoCorrelation, VnlVectorType);
120 
124 
128 
132 
133 protected:
136  {
137  }
138 
139  void DynamicThreadedGenerateData(const OutputImageRegionType& outputRegionForThread) override;
140 
141  void GenerateOutputInformation() override;
142 
143 private:
145  void operator=(const Self&) = delete;
146 
149 
153 
157 
160 
163 
166 };
167 
168 } // end namespace otb
169 
170 #ifndef OTB_MANUAL_INSTANTIATION
172 #endif
173 
174 #endif
This filter implements the Maximum Autocorrelation Factor.
itkGetObjectMacro(CovarianceEstimatorH, CovarianceEstimatorType)
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
itk::NumericTraits< InputInternalPixelType >::RealType InternalPixelType
MaximumAutocorrelationFactorImageFilter(const Self &)=delete
StreamingStatisticsVectorImageFilter< InternalImageType > CovarianceEstimatorType
itkGetObjectMacro(CovarianceEstimator, CovarianceEstimatorType)
itkGetObjectMacro(CovarianceEstimatorV, CovarianceEstimatorType)
This class streams the whole input image through the PersistentStatisticsImageFilter.
Creation of an "otb" vector image which contains metadata.
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.