OTB  6.7.0
Orfeo Toolbox
otbEstimateInnerProductPCAImageFilter.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 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:
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 
89  void GenerateOutputInformation(void) override;
90 
94  void BeforeThreadedGenerateData() override;
95 
96  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId) override;
97  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
98 
99 private:
100  EstimateInnerProductPCAImageFilter(const Self &) = delete;
101  void operator =(const Self&) = delete;
102 
105 
108 
111 
114 
115 };
116 
117 } // end namespace otb
118 
119 #ifndef OTB_MANUAL_INSTANTIATION
121 #endif
122 
123 #endif
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
This class streams the whole input image through the PersistentStatisticsImageFilter.
unsigned int ThreadIdType
StreamingInnerProductType::MatrixObjectType MatrixObjectType
StreamingInnerProductVectorImageFilter< InputImageType > StreamingInnerProductType
StreamingInnerProductType::Pointer StreamingInnerProductPointer
Applies the Inner product to an vector image. Implement the itk::ImagePCAShapeModelEstimator algorith...