OTB  10.0.0
Orfeo Toolbox
otbEstimateInnerProductPCAImageFilter.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 otbEstimateInnerProductPCAImageFilter_h
22 #define otbEstimateInnerProductPCAImageFilter_h
23 
24 #include "itkImageToImageFilter.h"
26 
27 namespace otb
28 {
36 template <class TInputImage, class TOutputImage>
37 class ITK_EXPORT EstimateInnerProductPCAImageFilter : public itk::ImageToImageFilter<TInputImage, TOutputImage>
38 {
39 public:
42  typedef typename itk::ImageToImageFilter<TInputImage, TOutputImage> Superclass;
43  typedef itk::SmartPointer<Self> Pointer;
44  typedef itk::SmartPointer<const Self> ConstPointer;
45 
47  itkNewMacro(Self);
48 
50  itkTypeMacro(EstimateInnerProductPCAImageFilter, ImageToImageFilter);
51 
53  typedef TInputImage InputImageType;
54  typedef typename InputImageType::Pointer InputImagePointer;
55  typedef typename InputImageType::PixelType InputPixelType;
56  typedef typename InputImageType::RegionType InputImageRegionType;
57  typedef TOutputImage OutputImageType;
58  typedef typename OutputImageType::Pointer OutputImagePointer;
59  typedef typename OutputImageType::RegionType OutputImageRegionType;
60  typedef typename OutputImageType::PixelType OutputPixelType;
61  typedef typename OutputImageType::InternalPixelType OutputInternalPixelType;
62 
67 
71  itkSetMacro(NumberOfPrincipalComponentsRequired, unsigned int);
72  itkGetMacro(NumberOfPrincipalComponentsRequired, unsigned int);
74 
76  itkSetMacro(CenterData, bool);
77  itkGetMacro(CenterData, bool);
78  itkBooleanMacro(CenterData);
80 
81 protected:
84  {
85  }
86 
91  void GenerateOutputInformation(void) override;
92 
96  void BeforeThreadedGenerateData() override;
97 
98  void DynamicThreadedGenerateData(const OutputImageRegionType& outputRegionForThread) override;
99  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
100 
101 private:
103  void operator=(const Self&) = delete;
104 
107 
110 
113 
116 };
117 
118 } // end namespace otb
119 
120 #ifndef OTB_MANUAL_INSTANTIATION
122 #endif
123 
124 #endif
Applies the Inner product to an vector image. Implement the itk::ImagePCAShapeModelEstimator algorith...
StreamingInnerProductVectorImageFilter< InputImageType > StreamingInnerProductType
EstimateInnerProductPCAImageFilter(const Self &)=delete
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
StreamingInnerProductType::Pointer StreamingInnerProductPointer
void operator=(const Self &)=delete
StreamingInnerProductType::MatrixObjectType MatrixObjectType
This class streams the whole input image through the PersistentStatisticsImageFilter.
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.