OTB  6.7.0
Orfeo Toolbox
otbNormalizeInnerProductPCAImageFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1999-2011 Insight Software Consortium
3  * Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES)
4  *
5  * This file is part of Orfeo Toolbox
6  *
7  * https://www.orfeo-toolbox.org/
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21 
22 #ifndef otbNormalizeInnerProductPCAImageFilter_h
23 #define otbNormalizeInnerProductPCAImageFilter_h
24 
25 #include "itkInPlaceImageFilter.h"
27 
28 namespace otb
29 {
37 template <class TInputImage, class TOutputImage>
38 class ITK_EXPORT NormalizeInnerProductPCAImageFilter : public itk::InPlaceImageFilter<TInputImage, TOutputImage>
39 
40 {
41 public:
47 
49  itkNewMacro(Self);
50 
53 
55  itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
56  itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
58 
60  typedef TInputImage InputImageType;
61  typedef TOutputImage OutputImageType;
62 
64  typedef typename InputImageType::PixelType InputPixelType;
65  typedef typename InputImageType::InternalPixelType InputInternalPixelType;
66  typedef typename InputImageType::RegionType InputImageRegionType;
67  typedef typename OutputImageType::PixelType OutputPixelType;
68  typedef typename OutputImageType::InternalPixelType OutputInternalPixelType;
69  typedef typename OutputImageType::RegionType OutputImageRegionType;
70 
73 
80 
81  itkSetMacro(UseUnbiasedEstimator, bool);
82  itkGetMacro(UseUnbiasedEstimator, bool);
83 
84 protected:
87 
96  void GenerateOutputInformation() override;
97 
108  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId) override;
109 
111  void BeforeThreadedGenerateData() override;
112 
113  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
114 
115 private:
116 
119 
120  /* use an unbiased estimator to compute the covariance */
122 };
123 
124 } // end namespace otb
125 
126 #ifndef OTB_MANUAL_INSTANTIATION
128 #endif
129 
130 #endif
itk::Size< Monteverdi_DIMENSION > SizeType
Definition: mvdTypes.h:137
StreamingStatisticsVectorImageFilterType::RealType RealType
The aim of the class is to normalise vector images using a vector coefficient values.
itk::InPlaceImageFilter< TInputImage, TOutputImage > Superclass
StreamingStatisticsVectorImageFilterType::RealPixelType RealPixelType
StreamingStatisticsVectorImageFilterType::Pointer StreamingStatisticsVectorImageFilterPointer
unsigned int ThreadIdType
StreamingStatisticsVectorImageFilter< InputImageType > StreamingStatisticsVectorImageFilterType
StreamingStatisticsVectorImageFilterType::MatrixType MatrixType
This class streams the whole input image through the PersistentStatisticsImageFilter.