OTB  6.7.0
Orfeo Toolbox
otbInnerProductPCAImageFilter.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 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>
67  : public itk::ImageToImageFilter<TInputImage, TOutputImage>
68 {
69 public:
75 
77  itkNewMacro(Self);
78 
80  itkTypeMacro(InnerProductPCAImageFilter, ImageToImageFilter);
81 
83  typedef TInputImage InputImageType;
84  typedef TOutputImage OutputImageType;
85 
90 
101 
105  itkSetMacro(NumberOfPrincipalComponentsRequired, unsigned int);
106  itkGetMacro(NumberOfPrincipalComponentsRequired, unsigned int);
108 
110  itkSetMacro(GenerateMeanComponent, bool);
111  itkGetMacro(GenerateMeanComponent, bool);
112  itkBooleanMacro(GenerateMeanComponent);
114 
116  itkSetMacro(CenterData, bool);
117  itkGetMacro(CenterData, bool);
118  itkBooleanMacro(CenterData);
120 
122  otbSetObjectMemberMacro(NormalizePCAFilter, UseUnbiasedEstimator, bool);
123  otbGetObjectMemberMacro(NormalizePCAFilter, UseUnbiasedEstimator, bool);
125 
126 protected:
128  void GenerateData(void) override;
129 
132 
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
itk::SmartPointer< const Self > ConstPointer
EstimateInnerProductPCAImageFilter< InputImageType, OutputImageType > EstimatePCAFilterType
ConcatenateFilterType::Pointer ConcatenateFilterPointer
#define otbGetObjectMemberMacro(object, name, type)
Definition: otbMacro.h:90
itk::UnaryFunctorImageFilter< InputImageType, InternalImageType, MeanFunctorType > MeanFilterType
NormalizeInnerProductPCAImageFilter< OutputImageType, OutputImageType > NormalizePCAFilterType
The aim of the class is to normalise vector images using a vector coefficient values.
ImageToVectorImageCastFilter< InternalImageType, OutputImageType > CastFilterType
Image< typename InputImageType::InternalPixelType > InternalImageType
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
Performs a PCA with streaming capabilities.
Creation of an "otb" image which contains metadata.
Definition: otbImage.h:89
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.
Functor::MeanFunctor< typename InputImageType::PixelType, typename InternalImageType::PixelType > MeanFunctorType
#define otbSetObjectMemberMacro(object, name, type)
Definition: otbMacro.h:80
ConcatenateVectorImageFilter< OutputImageType, OutputImageType, OutputImageType > ConcatenateFilterType
This filter concatenates the vector pixel of the first image with the vector pixel of the second imag...
NormalizePCAFilterType::Pointer NormalizePCAFilterPointer
EstimatePCAFilterType::Pointer EstimatePCAFilterPointer
Applies the Inner product to an vector image. Implement the itk::ImagePCAShapeModelEstimator algorith...