OTB  9.0.0
Orfeo Toolbox
otbMultivariateAlterationDetectorImageFilter.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 #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 
143  itkGetObjectMacro(CovarianceEstimator, CovarianceEstimatorType);
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 ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId) override;
163 
164  void GenerateOutputInformation() override;
165 
166 private:
167  MultivariateAlterationDetectorImageFilter(const Self&) = delete;
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
otb::MultivariateAlterationDetectorImageFilter::~MultivariateAlterationDetectorImageFilter
~MultivariateAlterationDetectorImageFilter() override
Definition: otbMultivariateAlterationDetectorImageFilter.h:158
otb::MultivariateAlterationDetectorImageFilter::m_Mean2
VnlVectorType m_Mean2
Definition: otbMultivariateAlterationDetectorImageFilter.h:177
otbStreamingStatisticsVectorImageFilter.h
otb::MultivariateAlterationDetectorImageFilter::VectorType
CovarianceEstimatorType::RealPixelType VectorType
Definition: otbMultivariateAlterationDetectorImageFilter.h:116
otb::MultivariateAlterationDetectorImageFilter::InputImageRegionType
InputImageType::RegionType InputImageRegionType
Definition: otbMultivariateAlterationDetectorImageFilter.h:100
otb::MultivariateAlterationDetectorImageFilter::InputImagePointer
InputImageType::Pointer InputImagePointer
Definition: otbMultivariateAlterationDetectorImageFilter.h:98
otb::MultivariateAlterationDetectorImageFilter::OutputImagePointer
OutputImageType::Pointer OutputImagePointer
Definition: otbMultivariateAlterationDetectorImageFilter.h:103
otb::MultivariateAlterationDetectorImageFilter::VnlMatrixType
vnl_matrix< RealType > VnlMatrixType
Definition: otbMultivariateAlterationDetectorImageFilter.h:121
otb::MultivariateAlterationDetectorImageFilter::MatrixObjectType
CovarianceEstimatorType::MatrixObjectType MatrixObjectType
Definition: otbMultivariateAlterationDetectorImageFilter.h:113
otb::MultivariateAlterationDetectorImageFilter::OutputImageRegionType
OutputImageType::RegionType OutputImageRegionType
Definition: otbMultivariateAlterationDetectorImageFilter.h:104
otb::StreamingStatisticsVectorImageFilter::MatrixObjectType
StatFilterType::MatrixObjectType MatrixObjectType
Definition: otbStreamingStatisticsVectorImageFilter.h:323
otb::StreamingStatisticsVectorImageFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbStreamingStatisticsVectorImageFilter.h:304
otb::MultivariateAlterationDetectorImageFilter::InputImagePixelType
InputImageType::PixelType InputImagePixelType
Definition: otbMultivariateAlterationDetectorImageFilter.h:101
otbConcatenateVectorImageFilter.h
otb::MultivariateAlterationDetectorImageFilter::CovarianceEstimatorType
StreamingStatisticsVectorImageFilter< InputImageType > CovarianceEstimatorType
Definition: otbMultivariateAlterationDetectorImageFilter.h:108
otb::MultivariateAlterationDetectorImageFilter::m_V1
VnlMatrixType m_V1
Definition: otbMultivariateAlterationDetectorImageFilter.h:174
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::MultivariateAlterationDetectorImageFilter::m_CovarianceMatrix
MatrixType m_CovarianceMatrix
Definition: otbMultivariateAlterationDetectorImageFilter.h:171
otb::MultivariateAlterationDetectorImageFilter::MatrixType
MatrixObjectType::ComponentType MatrixType
Definition: otbMultivariateAlterationDetectorImageFilter.h:114
otb::MultivariateAlterationDetectorImageFilter::m_V2
VnlMatrixType m_V2
Definition: otbMultivariateAlterationDetectorImageFilter.h:175
otbMultivariateAlterationDetectorImageFilter.hxx
otb::MultivariateAlterationDetectorImageFilter::InputImageConstPointer
InputImageType::ConstPointer InputImageConstPointer
Definition: otbMultivariateAlterationDetectorImageFilter.h:99
otb::MultivariateAlterationDetectorImageFilter::CovarianceEstimatorPointer
CovarianceEstimatorType::Pointer CovarianceEstimatorPointer
Definition: otbMultivariateAlterationDetectorImageFilter.h:109
otb::MultivariateAlterationDetectorImageFilter::VnlVectorType
vnl_vector< RealType > VnlVectorType
Definition: otbMultivariateAlterationDetectorImageFilter.h:120
otb::MultivariateAlterationDetectorImageFilter::ConcatenateImageFilterType
otb::ConcatenateVectorImageFilter< InputImageType, InputImageType, InputImageType > ConcatenateImageFilterType
Definition: otbMultivariateAlterationDetectorImageFilter.h:110
otb::StreamingStatisticsVectorImageFilter::RealPixelType
StatFilterType::RealPixelType RealPixelType
Definition: otbStreamingStatisticsVectorImageFilter.h:320
otb::MultivariateAlterationDetectorImageFilter::Superclass
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
Definition: otbMultivariateAlterationDetectorImageFilter.h:86
otb::ConcatenateVectorImageFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbConcatenateVectorImageFilter.h:42
otb::MultivariateAlterationDetectorImageFilter::Self
MultivariateAlterationDetectorImageFilter Self
Definition: otbMultivariateAlterationDetectorImageFilter.h:85
otb::MultivariateAlterationDetectorImageFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbMultivariateAlterationDetectorImageFilter.h:87
otb::MultivariateAlterationDetectorImageFilter::m_MeanValues
VectorType m_MeanValues
Definition: otbMultivariateAlterationDetectorImageFilter.h:172
otb::StreamingStatisticsVectorImageFilter
This class streams the whole input image through the PersistentStatisticsImageFilter.
Definition: otbStreamingStatisticsVectorImageFilter.h:297
otb::MultivariateAlterationDetectorImageFilter::m_Mean1
VnlVectorType m_Mean1
Definition: otbMultivariateAlterationDetectorImageFilter.h:176
otb::MultivariateAlterationDetectorImageFilter::InputImageType
TInputImage InputImageType
Definition: otbMultivariateAlterationDetectorImageFilter.h:94
otb::MultivariateAlterationDetectorImageFilter::OutputImagePixelType
OutputImageType::PixelType OutputImagePixelType
Definition: otbMultivariateAlterationDetectorImageFilter.h:105
otb::MultivariateAlterationDetectorImageFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbMultivariateAlterationDetectorImageFilter.h:88
otb::MultivariateAlterationDetectorImageFilter::m_Rho
VnlVectorType m_Rho
Definition: otbMultivariateAlterationDetectorImageFilter.h:178
otb::MultivariateAlterationDetectorImageFilter::ConcatenateImageFilterPointer
ConcatenateImageFilterType::Pointer ConcatenateImageFilterPointer
Definition: otbMultivariateAlterationDetectorImageFilter.h:111
otb::MultivariateAlterationDetectorImageFilter::RealType
VectorType::ValueType RealType
Definition: otbMultivariateAlterationDetectorImageFilter.h:118
otb::MultivariateAlterationDetectorImageFilter::m_CovarianceEstimator
CovarianceEstimatorPointer m_CovarianceEstimator
Definition: otbMultivariateAlterationDetectorImageFilter.h:170
otb::MultivariateAlterationDetectorImageFilter::OutputImageType
TOutputImage OutputImageType
Definition: otbMultivariateAlterationDetectorImageFilter.h:102
otb::ConcatenateVectorImageFilter
This filter concatenates the vector pixel of the first image with the vector pixel of the second imag...
Definition: otbConcatenateVectorImageFilter.h:36
otb::MultivariateAlterationDetectorImageFilter::InternalMatrixType
MatrixType::InternalMatrixType InternalMatrixType
Definition: otbMultivariateAlterationDetectorImageFilter.h:115
otb::MultivariateAlterationDetectorImageFilter
This filter implements the Multivariate Alteration Detector.
Definition: otbMultivariateAlterationDetectorImageFilter.h:81