OTB  9.0.0
Orfeo Toolbox
List of all members
otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix > Class Template Reference

#include <otbMatrixImageFilter.h>

+ Inheritance diagram for otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >:
+ Collaboration diagram for otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >:
typedef TInputImage InputImageType
 
typedef TOutputImage OutputImageType
 
typedef MatrixImageFilter Self
 
typedef itk::ImageToImageFilter< InputImageType, OutputImageTypeSuperclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef InputImageType::PixelType InputPixelType
 
typedef OutputImageType::PixelType OutputPixelType
 
typedef InputImageType::InternalPixelType InputInternalPixelType
 
typedef OutputImageType::InternalPixelType OutputInternalPixelType
 
typedef itk::NumericTraits< InputInternalPixelType >::RealType InputRealType
 
typedef TMatrix MatrixType
 
typedef vnl_vector< InputRealTypeVectorType
 
typedef OutputImageType::RegionType OutputImageRegionType
 
typedef InputImageType::SizeType SizeType
 
static const unsigned int InputImageDimension = TInputImage::ImageDimension
 
static const unsigned int OutputImageDimension = TOutputImage::ImageDimension
 
MatrixType m_Matrix
 
bool m_MatrixByVector
 
static Pointer New ()
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 
void SetMatrix (MatrixType mat)
 
MatrixType GetMatrix ()
 
virtual bool GetMatrixByVector () const
 
virtual void SetMatrixByVector (bool _arg)
 
virtual void MatrixByVectorOn ()
 
virtual void MatrixByVectorOff ()
 
 MatrixImageFilter ()
 
 ~MatrixImageFilter () override
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
void GenerateOutputInformation () override
 
void ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, itk::ThreadIdType threadId) override
 
 MatrixImageFilter (const Self &)=delete
 
void operator= (const Self &)=delete
 

Detailed Description

template<class TInputImage, class TOutputImage, class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
class otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >

Apply a matrix multiplication over the channels of an image.

The templates are the input and output image type. The transition matrix is given using the SetTransitionMatrix() method. The awaited type must be compatible with vnl_matrix<double>

The multiplication can be done as $ p . M $ or $ M . p $ where $ p $ is the pixel and $ M $ is the vector. The behavior can be chosen with

The number of rows of the matrix must be the input image number of channels, the number of columns is the number of channels of the output image.

For example, if the image has 2 bands, the matrix is $ \begin{pmatrix} \alpha & \beta \\ \gama & \delta \end{pmatrix} $ The pixel $ [a, b] $ will give the output pixel $ [\alpha.a + \beta.b, \gamma.a + \delta.b ]. $

Definition at line 50 of file otbMatrixImageFilter.h.

Member Typedef Documentation

◆ ConstPointer

template<class TInputImage , class TOutputImage , class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
typedef itk::SmartPointer<const Self> otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::ConstPointer

typedef to simplify variables definition and declaration.

Definition at line 68 of file otbMatrixImageFilter.h.

◆ InputImageType

template<class TInputImage , class TOutputImage , class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
typedef TInputImage otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::InputImageType

typedef to simplify variables definition and declaration.

Definition at line 59 of file otbMatrixImageFilter.h.

◆ InputInternalPixelType

template<class TInputImage , class TOutputImage , class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
typedef InputImageType::InternalPixelType otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::InputInternalPixelType

typedef to simplify variables definition and declaration.

Definition at line 79 of file otbMatrixImageFilter.h.

◆ InputPixelType

template<class TInputImage , class TOutputImage , class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
typedef InputImageType::PixelType otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::InputPixelType

Supported images definition.

Definition at line 74 of file otbMatrixImageFilter.h.

◆ InputRealType

template<class TInputImage , class TOutputImage , class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
typedef itk::NumericTraits<InputInternalPixelType>::RealType otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::InputRealType

MatrixType definition

Definition at line 84 of file otbMatrixImageFilter.h.

◆ MatrixType

template<class TInputImage , class TOutputImage , class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
typedef TMatrix otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::MatrixType

typedef to simplify variables definition and declaration.

Definition at line 85 of file otbMatrixImageFilter.h.

◆ OutputImageRegionType

template<class TInputImage , class TOutputImage , class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
typedef OutputImageType::RegionType otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::OutputImageRegionType

"typedef" to define a real.

Definition at line 89 of file otbMatrixImageFilter.h.

◆ OutputImageType

template<class TInputImage , class TOutputImage , class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
typedef TOutputImage otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::OutputImageType

typedef to simplify variables definition and declaration.

Definition at line 62 of file otbMatrixImageFilter.h.

◆ OutputInternalPixelType

template<class TInputImage , class TOutputImage , class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
typedef OutputImageType::InternalPixelType otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::OutputInternalPixelType

typedef to simplify variables definition and declaration.

Definition at line 80 of file otbMatrixImageFilter.h.

◆ OutputPixelType

template<class TInputImage , class TOutputImage , class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
typedef OutputImageType::PixelType otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::OutputPixelType

typedef to simplify variables definition and declaration.

Definition at line 78 of file otbMatrixImageFilter.h.

◆ Pointer

template<class TInputImage , class TOutputImage , class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
typedef itk::SmartPointer<Self> otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::Pointer

typedef to simplify variables definition and declaration.

Definition at line 67 of file otbMatrixImageFilter.h.

◆ Self

template<class TInputImage , class TOutputImage , class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
typedef MatrixImageFilter otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::Self

typedef for standard classes.

Definition at line 65 of file otbMatrixImageFilter.h.

◆ SizeType

template<class TInputImage , class TOutputImage , class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
typedef InputImageType::SizeType otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::SizeType

"typedef" to define an image size.

Definition at line 92 of file otbMatrixImageFilter.h.

◆ Superclass

template<class TInputImage , class TOutputImage , class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
typedef itk::ImageToImageFilter<InputImageType, OutputImageType> otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::Superclass

typedef to simplify variables definition and declaration.

Definition at line 66 of file otbMatrixImageFilter.h.

◆ VectorType

template<class TInputImage , class TOutputImage , class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
typedef vnl_vector<InputRealType> otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::VectorType

typedef to simplify variables definition and declaration.

Definition at line 86 of file otbMatrixImageFilter.h.

Constructor & Destructor Documentation

◆ MatrixImageFilter() [1/2]

template<class TInputImage , class TOutputImage , class TMatrix >
otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::MatrixImageFilter
protected

typedef to simplify variables definition and declaration.

Definition at line 35 of file otbMatrixImageFilter.hxx.

◆ ~MatrixImageFilter()

template<class TInputImage , class TOutputImage , class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::~MatrixImageFilter ( )
inlineoverrideprotected

typedef to simplify variables definition and declaration.

Definition at line 113 of file otbMatrixImageFilter.h.

◆ MatrixImageFilter() [2/2]

template<class TInputImage , class TOutputImage , class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::MatrixImageFilter ( const Self )
privatedelete

typedef to simplify variables definition and declaration.

Member Function Documentation

◆ CreateAnother()

template<class TInputImage , class TOutputImage , class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
virtual::itk::LightObject::Pointer otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::CreateAnother ( void  ) const

typedef to simplify variables definition and declaration.

◆ GenerateOutputInformation()

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

Before threaded generate data method.

Definition at line 40 of file otbMatrixImageFilter.hxx.

◆ GetMatrix()

template<class TInputImage , class TOutputImage , class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
MatrixType otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::GetMatrix ( )
inline

typedef to simplify variables definition and declaration.

Definition at line 101 of file otbMatrixImageFilter.h.

◆ GetMatrixByVector()

template<class TInputImage , class TOutputImage , class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
virtual bool otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::GetMatrixByVector ( ) const
virtual

typedef to simplify variables definition and declaration.

◆ GetNameOfClass()

template<class TInputImage , class TOutputImage , class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
virtual const char* otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::GetNameOfClass ( ) const
virtual

Return the class name.

◆ MatrixByVectorOff()

template<class TInputImage , class TOutputImage , class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
virtual void otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::MatrixByVectorOff ( )
virtual

typedef to simplify variables definition and declaration.

◆ MatrixByVectorOn()

template<class TInputImage , class TOutputImage , class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
virtual void otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::MatrixByVectorOn ( )
virtual

typedef to simplify variables definition and declaration.

◆ New()

template<class TInputImage , class TOutputImage , class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
static Pointer otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::New ( )
static

"object factory" management method.

◆ operator=()

template<class TInputImage , class TOutputImage , class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
void otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::operator= ( const Self )
privatedelete

typedef to simplify variables definition and declaration.

◆ PrintSelf()

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

Standard "PrintSelf" method

Definition at line 127 of file otbMatrixImageFilter.hxx.

◆ SetMatrix()

template<class TInputImage , class TOutputImage , class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
void otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::SetMatrix ( MatrixType  mat)
inline

Transition matrix accessors.

Definition at line 96 of file otbMatrixImageFilter.h.

◆ SetMatrixByVector()

template<class TInputImage , class TOutputImage , class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
virtual void otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::SetMatrixByVector ( bool  _arg)
virtual

typedef to simplify variables definition and declaration.

◆ ThreadedGenerateData()

template<class TInputImage , class TOutputImage , class TMatrix >
void otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::ThreadedGenerateData ( const OutputImageRegionType outputRegionForThread,
itk::ThreadIdType  threadId 
)
overrideprotected

MatrixImageFilter can be implemented for a multithreaded filter treatment. Thus, this implementation give the ThreadedGenerateData() method. that is called for each process thread. Image data are automatically allocated through the parent class calling the ThreadedGenerateData() method. ThreadedGenerateData() can only write the area of the image specified by the parameter "outputRegionForThread"

See also
ImageToImageFilter::ThreadedGenerateData(), ImageToImageFilter::GenerateData()

Definition at line 75 of file otbMatrixImageFilter.hxx.

Member Data Documentation

◆ InputImageDimension

template<class TInputImage , class TOutputImage , class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
const unsigned int otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::InputImageDimension = TInputImage::ImageDimension
static

Extract input and output images sizes.

Definition at line 54 of file otbMatrixImageFilter.h.

◆ m_Matrix

template<class TInputImage , class TOutputImage , class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
MatrixType otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::m_Matrix
private

Matrix declaration

Definition at line 138 of file otbMatrixImageFilter.h.

◆ m_MatrixByVector

template<class TInputImage , class TOutputImage , class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
bool otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::m_MatrixByVector
private

If set to true, the applied operation is $ M . p $ where p is the pixel represented as a column vector. Otherwise the applied operation is $ p . M $ where p is the pixel represented as a row vector.

Definition at line 143 of file otbMatrixImageFilter.h.

◆ OutputImageDimension

template<class TInputImage , class TOutputImage , class TMatrix = vnl_matrix<typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>>
const unsigned int otb::MatrixImageFilter< TInputImage, TOutputImage, TMatrix >::OutputImageDimension = TOutputImage::ImageDimension
static

typedef to simplify variables definition and declaration.

Definition at line 55 of file otbMatrixImageFilter.h.


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