OTB  9.0.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | List of all members
otb::InnerProductPCAImageFilter< TInputImage, TOutputImage > Class Template Reference

#include <otbInnerProductPCAImageFilter.h>

+ Inheritance diagram for otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >:
+ Collaboration diagram for otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >:

Public Types

typedef CastFilterType::Pointer CastFilterPointer
 
typedef ImageToVectorImageCastFilter< InternalImageType, OutputImageTypeCastFilterType
 
typedef ConcatenateFilterType::Pointer ConcatenateFilterPointer
 
typedef ConcatenateVectorImageFilter< OutputImageType, OutputImageType, OutputImageTypeConcatenateFilterType
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef EstimatePCAFilterType::Pointer EstimatePCAFilterPointer
 
typedef EstimateInnerProductPCAImageFilter< InputImageType, OutputImageTypeEstimatePCAFilterType
 
typedef TInputImage InputImageType
 
typedef Image< typename InputImageType::InternalPixelType > InternalImageType
 
typedef MeanFilterType::Pointer MeanFilterPointer
 
typedef itk::UnaryFunctorImageFilter< InputImageType, InternalImageType, MeanFunctorTypeMeanFilterType
 
typedef Functor::MeanFunctor< typename InputImageType::PixelType, typename InternalImageType::PixelTypeMeanFunctorType
 
typedef NormalizePCAFilterType::Pointer NormalizePCAFilterPointer
 
typedef NormalizeInnerProductPCAImageFilter< OutputImageType, OutputImageTypeNormalizePCAFilterType
 
typedef TOutputImage OutputImageType
 
typedef itk::SmartPointer< SelfPointer
 
typedef InnerProductPCAImageFilter Self
 
typedef itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 

Static Public Member Functions

static Pointer New ()
 
unsigned int m_NumberOfPrincipalComponentsRequired
 
EstimatePCAFilterPointer m_EstimatePCAFilter
 
NormalizePCAFilterPointer m_NormalizePCAFilter
 
bool m_CenterData
 
bool m_GenerateMeanComponent
 
MeanFilterPointer m_MeanFilter
 
CastFilterPointer m_CastFilter
 
ConcatenateFilterPointer m_ConcatenateFilter
 
virtual void SetNumberOfPrincipalComponentsRequired (unsigned int _arg)
 
virtual unsigned int GetNumberOfPrincipalComponentsRequired ()
 
virtual void SetGenerateMeanComponent (bool _arg)
 
virtual bool GetGenerateMeanComponent ()
 
virtual void GenerateMeanComponentOn ()
 
virtual void GenerateMeanComponentOff ()
 
virtual void SetCenterData (bool _arg)
 
virtual bool GetCenterData ()
 
virtual void CenterDataOn ()
 
virtual void CenterDataOff ()
 
 otbSetObjectMemberMacro (NormalizePCAFilter, UseUnbiasedEstimator, bool)
 
 otbGetObjectMemberMacro (NormalizePCAFilter, UseUnbiasedEstimator, bool)
 
void GenerateData (void) override
 
 InnerProductPCAImageFilter ()
 
 ~InnerProductPCAImageFilter () override
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
void GenerateOutputInformation () override
 
 InnerProductPCAImageFilter (const Self &)=delete
 
void operator= (const Self &)=delete
 

Detailed Description

template<class TInputImage, class TOutputImage>
class otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >

Performs a PCA with streaming capabilities.

InnerProductPCAImageFilter performs a principal component analysis (as itk::ImagePCAShapeModelEstimator) (PCA) on a vector image in streaming capabilities. All channels of the input vector image are used for training images and also the number of desired largest principal components needed. The number of channels of the output image are the user specified number of desired largest principal components.

The algorithm uses the VNL library to perform the eigen analysis. To speed the computation of the instead of performing the eigen analysis of the covariance vector A*A' where A is a matrix with p x t, p = number of pixels or voxels in each images and t = number of training images, we calculate the eigen vectors of the inner product matrix A'*A. The resulting eigen vectors (E) are then multiplied with the the matrix A to get the principal compoenets. The covariance matrix has a dimension of p x p. Since number of pixels in any image being typically very high the eigen decomposition becomes computationally expensive. The inner product on the other hand has the dimension of t x t, where t is typically much smaller that p. Hence the eigen decomposition (most compute intensive part) is an orders of magnitude faster.

The Update() function enables the calculation of the various models, creates the membership function objects and populates them.

See also
itk::ImagePCAShapeModelEstimator

Definition at line 66 of file otbInnerProductPCAImageFilter.h.

Member Typedef Documentation

◆ CastFilterPointer

template<class TInputImage , class TOutputImage >
typedef CastFilterType::Pointer otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::CastFilterPointer

Definition at line 96 of file otbInnerProductPCAImageFilter.h.

◆ CastFilterType

template<class TInputImage , class TOutputImage >
typedef ImageToVectorImageCastFilter<InternalImageType, OutputImageType> otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::CastFilterType

Definition at line 95 of file otbInnerProductPCAImageFilter.h.

◆ ConcatenateFilterPointer

template<class TInputImage , class TOutputImage >
typedef ConcatenateFilterType::Pointer otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::ConcatenateFilterPointer

Definition at line 98 of file otbInnerProductPCAImageFilter.h.

◆ ConcatenateFilterType

template<class TInputImage , class TOutputImage >
typedef ConcatenateVectorImageFilter<OutputImageType, OutputImageType, OutputImageType> otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::ConcatenateFilterType

Definition at line 97 of file otbInnerProductPCAImageFilter.h.

◆ ConstPointer

template<class TInputImage , class TOutputImage >
typedef itk::SmartPointer<const Self> otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::ConstPointer

Definition at line 73 of file otbInnerProductPCAImageFilter.h.

◆ EstimatePCAFilterPointer

template<class TInputImage , class TOutputImage >
typedef EstimatePCAFilterType::Pointer otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::EstimatePCAFilterPointer

Definition at line 86 of file otbInnerProductPCAImageFilter.h.

◆ EstimatePCAFilterType

template<class TInputImage , class TOutputImage >
typedef EstimateInnerProductPCAImageFilter<InputImageType, OutputImageType> otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::EstimatePCAFilterType

Definition at line 85 of file otbInnerProductPCAImageFilter.h.

◆ InputImageType

template<class TInputImage , class TOutputImage >
typedef TInputImage otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::InputImageType

Template parameters typedefs

Definition at line 79 of file otbInnerProductPCAImageFilter.h.

◆ InternalImageType

template<class TInputImage , class TOutputImage >
typedef Image<typename InputImageType::InternalPixelType> otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::InternalImageType

Template parameters typedefs for mean component generation

Definition at line 91 of file otbInnerProductPCAImageFilter.h.

◆ MeanFilterPointer

template<class TInputImage , class TOutputImage >
typedef MeanFilterType::Pointer otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::MeanFilterPointer

Definition at line 94 of file otbInnerProductPCAImageFilter.h.

◆ MeanFilterType

template<class TInputImage , class TOutputImage >
typedef itk::UnaryFunctorImageFilter<InputImageType, InternalImageType, MeanFunctorType> otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::MeanFilterType

Definition at line 93 of file otbInnerProductPCAImageFilter.h.

◆ MeanFunctorType

template<class TInputImage , class TOutputImage >
typedef Functor::MeanFunctor<typename InputImageType::PixelType, typename InternalImageType::PixelType> otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::MeanFunctorType

Definition at line 92 of file otbInnerProductPCAImageFilter.h.

◆ NormalizePCAFilterPointer

template<class TInputImage , class TOutputImage >
typedef NormalizePCAFilterType::Pointer otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::NormalizePCAFilterPointer

Definition at line 88 of file otbInnerProductPCAImageFilter.h.

◆ NormalizePCAFilterType

template<class TInputImage , class TOutputImage >
typedef NormalizeInnerProductPCAImageFilter<OutputImageType, OutputImageType> otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::NormalizePCAFilterType

Definition at line 87 of file otbInnerProductPCAImageFilter.h.

◆ OutputImageType

template<class TInputImage , class TOutputImage >
typedef TOutputImage otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::OutputImageType

Definition at line 83 of file otbInnerProductPCAImageFilter.h.

◆ Pointer

template<class TInputImage , class TOutputImage >
typedef itk::SmartPointer<Self> otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::Pointer

Definition at line 72 of file otbInnerProductPCAImageFilter.h.

◆ Self

template<class TInputImage , class TOutputImage >
typedef InnerProductPCAImageFilter otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::Self

Standard typedefs

Definition at line 70 of file otbInnerProductPCAImageFilter.h.

◆ Superclass

template<class TInputImage , class TOutputImage >
typedef itk::ImageToImageFilter<TInputImage, TOutputImage> otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::Superclass

Definition at line 71 of file otbInnerProductPCAImageFilter.h.

Constructor & Destructor Documentation

◆ InnerProductPCAImageFilter() [1/2]

template<class TInputImage , class TOutputImage >
otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::InnerProductPCAImageFilter
protected

Constructor

Definition at line 32 of file otbInnerProductPCAImageFilter.hxx.

◆ ~InnerProductPCAImageFilter()

template<class TInputImage , class TOutputImage >
otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::~InnerProductPCAImageFilter ( )
inlineoverrideprotected

Destructor

Definition at line 132 of file otbInnerProductPCAImageFilter.h.

◆ InnerProductPCAImageFilter() [2/2]

template<class TInputImage , class TOutputImage >
otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::InnerProductPCAImageFilter ( const Self )
privatedelete

The number of largest principal components

Member Function Documentation

◆ CenterDataOff()

template<class TInputImage , class TOutputImage >
virtual void otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::CenterDataOff ( )
virtual

The number of largest principal components

◆ CenterDataOn()

template<class TInputImage , class TOutputImage >
virtual void otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::CenterDataOn ( )
virtual

The number of largest principal components

◆ CreateAnother()

template<class TInputImage , class TOutputImage >
virtual::itk::LightObject::Pointer otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::CreateAnother ( void  ) const

◆ GenerateData()

template<class TInputImage , class TOutputImage >
void otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::GenerateData ( void  )
overrideprotected

GenerateData

Main computation method

Definition at line 68 of file otbInnerProductPCAImageFilter.hxx.

◆ GenerateMeanComponentOff()

template<class TInputImage , class TOutputImage >
virtual void otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::GenerateMeanComponentOff ( )
virtual

The number of largest principal components

◆ GenerateMeanComponentOn()

template<class TInputImage , class TOutputImage >
virtual void otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::GenerateMeanComponentOn ( )
virtual

The number of largest principal components

◆ GenerateOutputInformation()

template<class TInputImage , class TOutputImage >
void otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::GenerateOutputInformation
overrideprotected

NormalizeInnerProductPCAImageFilter can produce an image which is a different resolution than its input image. As such, NormalizeInnerProductPCAImageFilter needs to provide an implementation for GenerateOutputInformation() in order to inform the pipeline execution model. The original documentation of this method is below.

See also
ProcessObject::GenerateOutputInformation()

GenerateOutputInformation

Definition at line 50 of file otbInnerProductPCAImageFilter.hxx.

◆ GetCenterData()

template<class TInputImage , class TOutputImage >
virtual bool otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::GetCenterData ( )
virtual

The number of largest principal components

◆ GetGenerateMeanComponent()

template<class TInputImage , class TOutputImage >
virtual bool otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::GetGenerateMeanComponent ( )
virtual

The number of largest principal components

◆ GetNameOfClass()

template<class TInputImage , class TOutputImage >
virtual const char* otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::GetNameOfClass ( ) const
virtual

Creation through object factory macro

◆ GetNumberOfPrincipalComponentsRequired()

template<class TInputImage , class TOutputImage >
virtual unsigned int otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::GetNumberOfPrincipalComponentsRequired ( )
virtual

The number of largest principal components

◆ New()

template<class TInputImage , class TOutputImage >
static Pointer otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::New ( )
static

Type macro

◆ operator=()

template<class TInputImage , class TOutputImage >
void otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::operator= ( const Self )
privatedelete

The number of largest principal components

◆ otbGetObjectMemberMacro()

template<class TInputImage , class TOutputImage >
otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::otbGetObjectMemberMacro ( NormalizePCAFilter  ,
UseUnbiasedEstimator  ,
bool   
)

The number of largest principal components

◆ otbSetObjectMemberMacro()

template<class TInputImage , class TOutputImage >
otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::otbSetObjectMemberMacro ( NormalizePCAFilter  ,
UseUnbiasedEstimator  ,
bool   
)

Get the NormalizeInnerProductPCAImage filter

◆ PrintSelf()

template<class TInputImage , class TOutputImage >
void otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotected

PrintSelf method

PrintSelf Method

Definition at line 101 of file otbInnerProductPCAImageFilter.hxx.

◆ SetCenterData()

template<class TInputImage , class TOutputImage >
virtual void otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::SetCenterData ( bool  _arg)
virtual

Enable/Disable center data

◆ SetGenerateMeanComponent()

template<class TInputImage , class TOutputImage >
virtual void otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::SetGenerateMeanComponent ( bool  _arg)
virtual

Enable/Disable the generation of the mean component output

◆ SetNumberOfPrincipalComponentsRequired()

template<class TInputImage , class TOutputImage >
virtual void otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::SetNumberOfPrincipalComponentsRequired ( unsigned int  _arg)
virtual

Set/Get the number of required largest principal components. The filter produces the required number of principal components plus one outputs. Output index 0 represents the mean image and the remaining outputs the requested principal components.

Member Data Documentation

◆ m_CastFilter

template<class TInputImage , class TOutputImage >
CastFilterPointer otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::m_CastFilter
private

The number of largest principal components

Definition at line 170 of file otbInnerProductPCAImageFilter.h.

◆ m_CenterData

template<class TInputImage , class TOutputImage >
bool otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::m_CenterData
private

Enable/Disable center data

Definition at line 163 of file otbInnerProductPCAImageFilter.h.

◆ m_ConcatenateFilter

template<class TInputImage , class TOutputImage >
ConcatenateFilterPointer otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::m_ConcatenateFilter
private

The number of largest principal components

Definition at line 171 of file otbInnerProductPCAImageFilter.h.

◆ m_EstimatePCAFilter

template<class TInputImage , class TOutputImage >
EstimatePCAFilterPointer otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::m_EstimatePCAFilter
private

Radius of the structuring element

Definition at line 157 of file otbInnerProductPCAImageFilter.h.

◆ m_GenerateMeanComponent

template<class TInputImage , class TOutputImage >
bool otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::m_GenerateMeanComponent
private

Flag to specify the generation or not of the mean component output

Definition at line 166 of file otbInnerProductPCAImageFilter.h.

◆ m_MeanFilter

template<class TInputImage , class TOutputImage >
MeanFilterPointer otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::m_MeanFilter
private

Internals filters use to generate mean component output

Definition at line 169 of file otbInnerProductPCAImageFilter.h.

◆ m_NormalizePCAFilter

template<class TInputImage , class TOutputImage >
NormalizePCAFilterPointer otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::m_NormalizePCAFilter
private

Opening filter

Definition at line 160 of file otbInnerProductPCAImageFilter.h.

◆ m_NumberOfPrincipalComponentsRequired

template<class TInputImage , class TOutputImage >
unsigned int otb::InnerProductPCAImageFilter< TInputImage, TOutputImage >::m_NumberOfPrincipalComponentsRequired
private

The number of largest principal components

Definition at line 154 of file otbInnerProductPCAImageFilter.h.


The documentation for this class was generated from the following files: