OTB  6.7.0
Orfeo Toolbox
otbMaximumAutocorrelationFactorImageFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2019 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>
70  : public itk::ImageToImageFilter<TInputImage, TOutputImage>
71 {
72 public:
78 
80  itkNewMacro(Self);
81 
83  itkTypeMacro(MaximumAutocorrelationFactorImageFilter, ImageToImageFilter);
84 
86  typedef TInputImage InputImageType;
87  typedef typename InputImageType::Pointer InputImagePointer;
88  typedef typename InputImageType::ConstPointer InputImageConstPointer;
89  typedef typename InputImageType::RegionType InputImageRegionType;
92  typedef typename InputImageType::PixelType InputImagePixelType;
93  typedef typename InputImageType::ValueType InputImageValueType;
94  typedef TOutputImage OutputImageType;
95  typedef typename OutputImageType::Pointer OutputImagePointer;
96  typedef typename OutputImageType::RegionType OutputImageRegionType;
97  typedef typename OutputImageType::PixelType OutputImagePixelType;
98  typedef typename InputImageType::InternalPixelType InputInternalPixelType;
99  typedef typename
101 
103 
104 
110  typedef typename MatrixType::InternalMatrixType InternalMatrixType;
112 
113  typedef typename VectorType::ValueType RealType;
114  typedef vnl_vector<RealType> VnlVectorType;
115  typedef vnl_matrix<RealType> VnlMatrixType;
116 
118  itkGetMacro(V, VnlMatrixType);
119 
121  itkGetMacro(AutoCorrelation, VnlVectorType);
122 
125  itkGetObjectMacro(CovarianceEstimator, CovarianceEstimatorType);
126 
129  itkGetObjectMacro(CovarianceEstimatorH, CovarianceEstimatorType);
130 
133  itkGetObjectMacro(CovarianceEstimatorV, CovarianceEstimatorType);
134 
135 protected:
138 
139  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId) override;
140 
141  void GenerateOutputInformation() override;
142 
143 private:
144  MaximumAutocorrelationFactorImageFilter(const Self &) = delete;
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
itk::Size< Monteverdi_DIMENSION > SizeType
Definition: mvdTypes.h:137
Creation of an "otb" vector image which contains metadata.
itk::NumericTraits< InputInternalPixelType >::RealType InternalPixelType
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
itk::Index< Monteverdi_DIMENSION > IndexType
Definition: mvdTypes.h:133
unsigned int ThreadIdType
RealType ComponentType
Definition: mvdTypes.h:88
This filter implements the Maximum Autocorrelation Factor.
This class streams the whole input image through the PersistentStatisticsImageFilter.
StreamingStatisticsVectorImageFilter< InternalImageType > CovarianceEstimatorType