OTB  10.0.0
Orfeo Toolbox
otbInnerProductPCAImageFilter.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 otbInnerProductPCAImageFilter_h
22 #define otbInnerProductPCAImageFilter_h
23 
24 #include "otbImage.h"
25 #include "otbMacro.h"
28 #include "otbMeanFunctor.h"
32 
33 namespace otb
34 {
65 template <class TInputImage, class TOutputImage>
66 class ITK_EXPORT InnerProductPCAImageFilter : public itk::ImageToImageFilter<TInputImage, TOutputImage>
67 {
68 public:
71  typedef itk::ImageToImageFilter<TInputImage, TOutputImage> Superclass;
72  typedef itk::SmartPointer<Self> Pointer;
73  typedef itk::SmartPointer<const Self> ConstPointer;
74 
76  itkNewMacro(Self);
77 
79  itkTypeMacro(InnerProductPCAImageFilter, ImageToImageFilter);
80 
82  typedef TInputImage InputImageType;
83  typedef TOutputImage OutputImageType;
84 
89 
93  typedef itk::UnaryFunctorImageFilter<InputImageType, InternalImageType, MeanFunctorType> MeanFilterType;
94  typedef typename MeanFilterType::Pointer MeanFilterPointer;
99 
103  itkSetMacro(NumberOfPrincipalComponentsRequired, unsigned int);
104  itkGetMacro(NumberOfPrincipalComponentsRequired, unsigned int);
106 
108  itkSetMacro(GenerateMeanComponent, bool);
109  itkGetMacro(GenerateMeanComponent, bool);
110  itkBooleanMacro(GenerateMeanComponent);
112 
114  itkSetMacro(CenterData, bool);
115  itkGetMacro(CenterData, bool);
116  itkBooleanMacro(CenterData);
118 
120  otbSetObjectMemberMacro(NormalizePCAFilter, UseUnbiasedEstimator, bool);
121  otbGetObjectMemberMacro(NormalizePCAFilter, UseUnbiasedEstimator, bool);
123 
124 protected:
126  void GenerateData(void) override;
127 
130 
133  {
134  }
135 
137  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
138 
147  void GenerateOutputInformation() override;
148 
149 private:
151  void operator=(const Self&) = delete;
152 
155 
158 
161 
164 
167 
172 };
173 
174 } // End namespace otb
175 
176 #ifndef OTB_MANUAL_INSTANTIATION
178 #endif
179 
180 #endif
This filter concatenates the vector pixel of the first image with the vector pixel of the second imag...
Applies the Inner product to an vector image. Implement the itk::ImagePCAShapeModelEstimator algorith...
This functor generate the mean value of a component pixels.
This is a helper class that convert an otb::Image into a single-channel otb::VectorImage.
Creation of an "otb" image which contains metadata.
Definition: otbImage.h:92
Performs a PCA with streaming capabilities.
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
otbGetObjectMemberMacro(NormalizePCAFilter, UseUnbiasedEstimator, bool)
InnerProductPCAImageFilter(const Self &)=delete
Functor::MeanFunctor< typename InputImageType::PixelType, typename InternalImageType::PixelType > MeanFunctorType
otbSetObjectMemberMacro(NormalizePCAFilter, UseUnbiasedEstimator, bool)
Image< typename InputImageType::InternalPixelType > InternalImageType
itk::UnaryFunctorImageFilter< InputImageType, InternalImageType, MeanFunctorType > MeanFilterType
itk::SmartPointer< const Self > ConstPointer
ImageToVectorImageCastFilter< InternalImageType, OutputImageType > CastFilterType
void operator=(const Self &)=delete
NormalizeInnerProductPCAImageFilter< OutputImageType, OutputImageType > NormalizePCAFilterType
ConcatenateVectorImageFilter< OutputImageType, OutputImageType, OutputImageType > ConcatenateFilterType
EstimatePCAFilterType::Pointer EstimatePCAFilterPointer
NormalizePCAFilterType::Pointer NormalizePCAFilterPointer
EstimateInnerProductPCAImageFilter< InputImageType, OutputImageType > EstimatePCAFilterType
ConcatenateFilterType::Pointer ConcatenateFilterPointer
The aim of the class is to normalise vector images using a vector coefficient values.
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.