OTB  10.0.0
Orfeo Toolbox
otbMultivariateAlterationDetectorImageFilter.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 otbMultivariateAlterationDetectorImageFilter_h
22 #define otbMultivariateAlterationDetectorImageFilter_h
23 
24 
27 
28 #include "vnl/vnl_vector.h"
29 #include "vnl/vnl_matrix.h"
30 
31 namespace otb
32 {
33 
80 template <class TInputImage, class TOutputImage>
81 class ITK_EXPORT MultivariateAlterationDetectorImageFilter : public itk::ImageToImageFilter<TInputImage, TOutputImage>
82 {
83 public:
86  typedef itk::ImageToImageFilter<TInputImage, TOutputImage> Superclass;
87  typedef itk::SmartPointer<Self> Pointer;
88  typedef itk::SmartPointer<const Self> ConstPointer;
89 
91  itkNewMacro(Self);
92 
94  itkTypeMacro(MultivariateAlterationDetectorImageFilter, ImageToImageFilter);
95 
97  typedef TInputImage InputImageType;
98  typedef typename InputImageType::Pointer InputImagePointer;
99  typedef typename InputImageType::ConstPointer InputImageConstPointer;
100  typedef typename InputImageType::RegionType InputImageRegionType;
101  typedef typename InputImageType::PixelType InputImagePixelType;
102  typedef TOutputImage OutputImageType;
103  typedef typename OutputImageType::Pointer OutputImagePointer;
104  typedef typename OutputImageType::RegionType OutputImageRegionType;
105  typedef typename OutputImageType::PixelType OutputImagePixelType;
106 
112 
114  typedef typename MatrixObjectType::ComponentType MatrixType;
115  typedef typename MatrixType::InternalMatrixType InternalMatrixType;
117 
118  typedef typename VectorType::ValueType RealType;
119 
120  typedef vnl_vector<RealType> VnlVectorType;
121  typedef vnl_matrix<RealType> VnlMatrixType;
122 
124  itkGetMacro(Mean1, VnlVectorType);
125 
127  itkGetMacro(Mean2, VnlVectorType);
128 
132  itkGetMacro(V1, VnlMatrixType);
133 
137  itkGetMacro(V2, VnlMatrixType);
138 
140  itkGetMacro(Rho, VnlVectorType);
141 
144 
146  void SetInput1(const TInputImage* image1);
147 
149  void SetInput2(const TInputImage* image2);
150 
152  const TInputImage* GetInput1();
153  const TInputImage* GetInput2();
155 
156 protected:
159  {
160  }
161 
162  void DynamicThreadedGenerateData(const OutputImageRegionType& outputRegionForThread) override;
163 
164  void GenerateOutputInformation() override;
165 
166 private:
168  void operator=(const Self&) = delete;
169 
173 
179 };
180 
181 } // end namespace otb
182 
183 #ifndef OTB_MANUAL_INSTANTIATION
185 #endif
186 
187 #endif
This filter concatenates the vector pixel of the first image with the vector pixel of the second imag...
This filter implements the Multivariate Alteration Detector.
itkGetObjectMacro(CovarianceEstimator, CovarianceEstimatorType)
MultivariateAlterationDetectorImageFilter(const Self &)=delete
otb::ConcatenateVectorImageFilter< InputImageType, InputImageType, InputImageType > ConcatenateImageFilterType
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
StreamingStatisticsVectorImageFilter< InputImageType > CovarianceEstimatorType
This class streams the whole input image through the PersistentStatisticsImageFilter.
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.