OTB  9.0.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-2022 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:
44  typedef itk::InPlaceImageFilter<TInputImage, TOutputImage> Superclass;
45  typedef itk::SmartPointer<Self> Pointer;
46  typedef itk::SmartPointer<const Self> ConstPointer;
47 
49  itkNewMacro(Self);
50 
52  itkTypeMacro(NormalizeInnerProductPCAImageFilter, itk::InPlaceImageFilter);
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 
72  typedef typename InputImageType::SizeType SizeType;
73 
80 
81  itkSetMacro(UseUnbiasedEstimator, bool);
82  itkGetMacro(UseUnbiasedEstimator, bool);
83 
84 protected:
87  {
88  }
89 
98  void GenerateOutputInformation() override;
99 
110  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId) override;
111 
113  void BeforeThreadedGenerateData() override;
114 
115  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
116 
117 private:
120 
121  /* use an unbiased estimator to compute the covariance */
123 };
124 
125 } // end namespace otb
126 
127 #ifndef OTB_MANUAL_INSTANTIATION
129 #endif
130 
131 #endif
otbNormalizeInnerProductPCAImageFilter.hxx
otb::NormalizeInnerProductPCAImageFilter::InputInternalPixelType
InputImageType::InternalPixelType InputInternalPixelType
Definition: otbNormalizeInnerProductPCAImageFilter.h:65
otb::NormalizeInnerProductPCAImageFilter::OutputImageType
TOutputImage OutputImageType
Definition: otbNormalizeInnerProductPCAImageFilter.h:61
otb::NormalizeInnerProductPCAImageFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbNormalizeInnerProductPCAImageFilter.h:45
otbStreamingStatisticsVectorImageFilter.h
otb::StreamingStatisticsVectorImageFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbStreamingStatisticsVectorImageFilter.h:304
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::NormalizeInnerProductPCAImageFilter::StreamingStatisticsVectorImageFilterPointer
StreamingStatisticsVectorImageFilterType::Pointer StreamingStatisticsVectorImageFilterPointer
Definition: otbNormalizeInnerProductPCAImageFilter.h:76
otb::NormalizeInnerProductPCAImageFilter::MatrixType
StreamingStatisticsVectorImageFilterType::MatrixType MatrixType
Definition: otbNormalizeInnerProductPCAImageFilter.h:79
otb::StreamingStatisticsVectorImageFilter::MatrixType
StatFilterType::MatrixType MatrixType
Definition: otbStreamingStatisticsVectorImageFilter.h:322
otb::StreamingStatisticsVectorImageFilter::RealPixelType
StatFilterType::RealPixelType RealPixelType
Definition: otbStreamingStatisticsVectorImageFilter.h:320
otb::NormalizeInnerProductPCAImageFilter::m_UseUnbiasedEstimator
bool m_UseUnbiasedEstimator
Definition: otbNormalizeInnerProductPCAImageFilter.h:122
otb::NormalizeInnerProductPCAImageFilter::RealType
StreamingStatisticsVectorImageFilterType::RealType RealType
Definition: otbNormalizeInnerProductPCAImageFilter.h:77
otb::NormalizeInnerProductPCAImageFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbNormalizeInnerProductPCAImageFilter.h:46
otb::NormalizeInnerProductPCAImageFilter::Self
NormalizeInnerProductPCAImageFilter Self
Definition: otbNormalizeInnerProductPCAImageFilter.h:43
otb::NormalizeInnerProductPCAImageFilter
The aim of the class is to normalise vector images using a vector coefficient values.
Definition: otbNormalizeInnerProductPCAImageFilter.h:38
otb::NormalizeInnerProductPCAImageFilter::OutputInternalPixelType
OutputImageType::InternalPixelType OutputInternalPixelType
Definition: otbNormalizeInnerProductPCAImageFilter.h:68
otb::StreamingStatisticsVectorImageFilter
This class streams the whole input image through the PersistentStatisticsImageFilter.
Definition: otbStreamingStatisticsVectorImageFilter.h:297
otb::NormalizeInnerProductPCAImageFilter::OutputPixelType
OutputImageType::PixelType OutputPixelType
Definition: otbNormalizeInnerProductPCAImageFilter.h:67
otb::NormalizeInnerProductPCAImageFilter::RealPixelType
StreamingStatisticsVectorImageFilterType::RealPixelType RealPixelType
Definition: otbNormalizeInnerProductPCAImageFilter.h:78
otb::NormalizeInnerProductPCAImageFilter::Superclass
itk::InPlaceImageFilter< TInputImage, TOutputImage > Superclass
Definition: otbNormalizeInnerProductPCAImageFilter.h:44
otb::NormalizeInnerProductPCAImageFilter::InputImageRegionType
InputImageType::RegionType InputImageRegionType
Definition: otbNormalizeInnerProductPCAImageFilter.h:66
otb::NormalizeInnerProductPCAImageFilter::SizeType
InputImageType::SizeType SizeType
Definition: otbNormalizeInnerProductPCAImageFilter.h:72
otb::NormalizeInnerProductPCAImageFilter::m_CoefNorm
RealPixelType m_CoefNorm
Definition: otbNormalizeInnerProductPCAImageFilter.h:119
otb::NormalizeInnerProductPCAImageFilter::InputPixelType
InputImageType::PixelType InputPixelType
Definition: otbNormalizeInnerProductPCAImageFilter.h:64
otb::NormalizeInnerProductPCAImageFilter::OutputImageRegionType
OutputImageType::RegionType OutputImageRegionType
Definition: otbNormalizeInnerProductPCAImageFilter.h:69
otb::NormalizeInnerProductPCAImageFilter::StreamingStatisticsVectorImageFilterType
StreamingStatisticsVectorImageFilter< InputImageType > StreamingStatisticsVectorImageFilterType
Definition: otbNormalizeInnerProductPCAImageFilter.h:75
otb::NormalizeInnerProductPCAImageFilter::~NormalizeInnerProductPCAImageFilter
~NormalizeInnerProductPCAImageFilter() override
Definition: otbNormalizeInnerProductPCAImageFilter.h:86
otb::StreamingStatisticsVectorImageFilter::RealType
StatFilterType::RealType RealType
Definition: otbStreamingStatisticsVectorImageFilter.h:318
otb::NormalizeInnerProductPCAImageFilter::InputImageType
TInputImage InputImageType
Definition: otbNormalizeInnerProductPCAImageFilter.h:60