OTB  9.0.0
Orfeo Toolbox
otbInnerProductPCAImageFilter.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 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:
150  InnerProductPCAImageFilter(const Self&) = delete;
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
otb::EstimateInnerProductPCAImageFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbEstimateInnerProductPCAImageFilter.h:43
otb::InnerProductPCAImageFilter::OutputImageType
TOutputImage OutputImageType
Definition: otbInnerProductPCAImageFilter.h:83
otbImageToVectorImageCastFilter.h
otb::InnerProductPCAImageFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbInnerProductPCAImageFilter.h:72
otb::ImageToVectorImageCastFilter
This is a helper class that convert an otb::Image into a single-channel otb::VectorImage.
Definition: otbImageToVectorImageCastFilter.h:79
otbMeanFunctor.h
otb::NormalizeInnerProductPCAImageFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbNormalizeInnerProductPCAImageFilter.h:45
otb::InnerProductPCAImageFilter::MeanFilterType
itk::UnaryFunctorImageFilter< InputImageType, InternalImageType, MeanFunctorType > MeanFilterType
Definition: otbInnerProductPCAImageFilter.h:93
otb::InnerProductPCAImageFilter::m_CastFilter
CastFilterPointer m_CastFilter
Definition: otbInnerProductPCAImageFilter.h:170
otb::InnerProductPCAImageFilter::m_ConcatenateFilter
ConcatenateFilterPointer m_ConcatenateFilter
Definition: otbInnerProductPCAImageFilter.h:171
otb::InnerProductPCAImageFilter::m_GenerateMeanComponent
bool m_GenerateMeanComponent
Definition: otbInnerProductPCAImageFilter.h:166
otbImage.h
otb::InnerProductPCAImageFilter::m_CenterData
bool m_CenterData
Definition: otbInnerProductPCAImageFilter.h:163
otb::InnerProductPCAImageFilter::m_EstimatePCAFilter
EstimatePCAFilterPointer m_EstimatePCAFilter
Definition: otbInnerProductPCAImageFilter.h:157
otbConcatenateVectorImageFilter.h
otb::InnerProductPCAImageFilter::CastFilterType
ImageToVectorImageCastFilter< InternalImageType, OutputImageType > CastFilterType
Definition: otbInnerProductPCAImageFilter.h:95
otb::InnerProductPCAImageFilter::ConcatenateFilterType
ConcatenateVectorImageFilter< OutputImageType, OutputImageType, OutputImageType > ConcatenateFilterType
Definition: otbInnerProductPCAImageFilter.h:97
otb::InnerProductPCAImageFilter::ConcatenateFilterPointer
ConcatenateFilterType::Pointer ConcatenateFilterPointer
Definition: otbInnerProductPCAImageFilter.h:98
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::Image
Creation of an "otb" image which contains metadata.
Definition: otbImage.h:89
otb::ImageToVectorImageCastFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbImageToVectorImageCastFilter.h:89
otb::InnerProductPCAImageFilter::NormalizePCAFilterType
NormalizeInnerProductPCAImageFilter< OutputImageType, OutputImageType > NormalizePCAFilterType
Definition: otbInnerProductPCAImageFilter.h:87
otbMacro.h
otb::InnerProductPCAImageFilter::MeanFunctorType
Functor::MeanFunctor< typename InputImageType::PixelType, typename InternalImageType::PixelType > MeanFunctorType
Definition: otbInnerProductPCAImageFilter.h:92
otb::InnerProductPCAImageFilter::Self
InnerProductPCAImageFilter Self
Definition: otbInnerProductPCAImageFilter.h:70
otb::ConcatenateVectorImageFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbConcatenateVectorImageFilter.h:42
otb::InnerProductPCAImageFilter::InternalImageType
Image< typename InputImageType::InternalPixelType > InternalImageType
Definition: otbInnerProductPCAImageFilter.h:91
otb::InnerProductPCAImageFilter::Superclass
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
Definition: otbInnerProductPCAImageFilter.h:71
otb::InnerProductPCAImageFilter::EstimatePCAFilterPointer
EstimatePCAFilterType::Pointer EstimatePCAFilterPointer
Definition: otbInnerProductPCAImageFilter.h:86
otb::InnerProductPCAImageFilter::~InnerProductPCAImageFilter
~InnerProductPCAImageFilter() override
Definition: otbInnerProductPCAImageFilter.h:132
otb::NormalizeInnerProductPCAImageFilter
The aim of the class is to normalise vector images using a vector coefficient values.
Definition: otbNormalizeInnerProductPCAImageFilter.h:38
otbNormalizeInnerProductPCAImageFilter.h
otb::InnerProductPCAImageFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbInnerProductPCAImageFilter.h:73
otb::Functor::MeanFunctor
This functor generate the mean value of a component pixels.
Definition: otbMeanFunctor.h:34
otb::InnerProductPCAImageFilter::NormalizePCAFilterPointer
NormalizePCAFilterType::Pointer NormalizePCAFilterPointer
Definition: otbInnerProductPCAImageFilter.h:88
otb::InnerProductPCAImageFilter::MeanFilterPointer
MeanFilterType::Pointer MeanFilterPointer
Definition: otbInnerProductPCAImageFilter.h:94
otb::InnerProductPCAImageFilter
Performs a PCA with streaming capabilities.
Definition: otbInnerProductPCAImageFilter.h:66
otb::InnerProductPCAImageFilter::InputImageType
TInputImage InputImageType
Definition: otbInnerProductPCAImageFilter.h:79
otbEstimateInnerProductPCAImageFilter.h
otb::EstimateInnerProductPCAImageFilter
Applies the Inner product to an vector image. Implement the itk::ImagePCAShapeModelEstimator algorith...
Definition: otbEstimateInnerProductPCAImageFilter.h:37
otb::InnerProductPCAImageFilter::EstimatePCAFilterType
EstimateInnerProductPCAImageFilter< InputImageType, OutputImageType > EstimatePCAFilterType
Definition: otbInnerProductPCAImageFilter.h:85
otb::InnerProductPCAImageFilter::m_MeanFilter
MeanFilterPointer m_MeanFilter
Definition: otbInnerProductPCAImageFilter.h:169
otb::InnerProductPCAImageFilter::CastFilterPointer
CastFilterType::Pointer CastFilterPointer
Definition: otbInnerProductPCAImageFilter.h:96
otb::InnerProductPCAImageFilter::m_NormalizePCAFilter
NormalizePCAFilterPointer m_NormalizePCAFilter
Definition: otbInnerProductPCAImageFilter.h:160
otbGetObjectMemberMacro
#define otbGetObjectMemberMacro(object, name, type)
Definition: otbMacro.h:89
otbSetObjectMemberMacro
#define otbSetObjectMemberMacro(object, name, type)
Definition: otbMacro.h:79
otb::ConcatenateVectorImageFilter
This filter concatenates the vector pixel of the first image with the vector pixel of the second imag...
Definition: otbConcatenateVectorImageFilter.h:36
otbInnerProductPCAImageFilter.hxx
otb::InnerProductPCAImageFilter::m_NumberOfPrincipalComponentsRequired
unsigned int m_NumberOfPrincipalComponentsRequired
Definition: otbInnerProductPCAImageFilter.h:154