OTB  9.0.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
otb::GreyLevelCooccurrenceIndexedList< TPixel > Class Template Reference

#include <otbGreyLevelCooccurrenceIndexedList.h>

+ Inheritance diagram for otb::GreyLevelCooccurrenceIndexedList< TPixel >:
+ Collaboration diagram for otb::GreyLevelCooccurrenceIndexedList< TPixel >:

Public Types

typedef itk::SmartPointer< const SelfConstPointer
 
typedef std::pair< IndexType, FrequencyTypeCooccurrencePairType
 
typedef InstanceIdentifier FrequencyType
 
typedef itk::Index< PixelPairSizeIndexType
 
typedef itk::IndexValueType IndexValueType
 
typedef itk::IdentifierType InstanceIdentifier
 
typedef itk::Array< int > LookupArrayType
 
typedef itk::FixedArray< PixelValueType, PixelPairSizePixelPairType
 
typedef TPixel PixelType
 
typedef itk::NumericTraits< PixelType >::RealType PixelValueType
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::NumericTraits< FrequencyType >::RealType RelativeFrequencyType
 
typedef GreyLevelCooccurrenceIndexedList Self
 
typedef itk::Size< PixelPairSizeSizeType
 
typedef itk::LightObject Superclass
 
typedef itk::NumericTraits< FrequencyType >::AccumulateType TotalFrequencyType
 
typedef std::vector< CooccurrencePairTypeVectorType
 

Public Member Functions

void AddPixelPair (const PixelValueType &pixelvalue1, const PixelValueType &pixelvalue2)
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
RelativeFrequencyType GetFrequency (IndexValueType i, IndexValueType j)
 
RelativeFrequencyType GetFrequency (IndexValueType i, IndexValueType j, const VectorType &vect) const
 
virtual const char * GetNameOfClass () const
 
virtual bool GetSymmetry ()
 
virtual TotalFrequencyType GetTotalFrequency ()
 
VectorType GetVector ()
 
void Initialize (const unsigned int nbins, const PixelValueType min, const PixelValueType max, const bool symmetry=true)
 

Static Public Member Functions

static Pointer New ()
 

Public Attributes

std::vector< std::vector< PixelValueType > > m_Max
 
std::vector< std::vector< PixelValueType > > m_Min
 

Static Public Attributes

static const unsigned int PixelPairSize = 2
 

Protected Member Functions

void AddPairToVector (IndexType index)
 
bool GetIndex (const PixelPairType &pixelPair, IndexType &index) const
 
 GreyLevelCooccurrenceIndexedList ()
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
void SetBinMax (const unsigned int dimension, const InstanceIdentifier nbin, PixelValueType max)
 
void SetBinMin (const unsigned int dimension, const InstanceIdentifier nbin, PixelValueType min)
 
 ~GreyLevelCooccurrenceIndexedList () override=default
 

Private Member Functions

 GreyLevelCooccurrenceIndexedList (const Self &)=delete
 
void operator= (const Self &)=delete
 

Private Attributes

bool m_ClipBinsAtEnds
 
PixelValueType m_InputImageMaximum
 
PixelValueType m_InputImageMinimum
 
LookupArrayType m_LookupArray
 
SizeType m_Size
 
bool m_Symmetry
 
TotalFrequencyType m_TotalFrequency
 
VectorType m_Vector
 

Detailed Description

template<class TPixel>
class otb::GreyLevelCooccurrenceIndexedList< TPixel >

This class holds a VectorType of CooccurrencePairType with each pair is a combination of pixel index and frequency.

GreyLevelCooccurrenceIndexedList instance is created for every neighborhood iteration over the given input image. This class keep an internal itk::Array as a lookup array with size as [nbbins x nbbins]. The lookup array stores position CooccurrencePairType in the VectorType. It ensures us that all elements in Vector are unique in terms of the index value in the pair. For any given pixel index, -1 value indicates zero existence of the index in the VectorType. This avoid searching all elements in VectorType for each pixel index added during neighborhood iterator. It is also used to decide whether to update the frequency of pair or to insert a new element in the vector.

Print references: David A. Clausi and Yongping Zhao. 2002. Rapid extraction of image texture by co-occurrence using a hybrid data structure. Comput. Geosci. 28, 6 (July 2002), 763-774. DOI=10.1016/S0098-3004(01)00108-X http://dx.doi.org/10.1016/S0098-3004(01)00108-X

de O.Bastos, L.; Liatsis, P.; Conci, A., Automatic texture segmentation based on k-means clustering and efficient calculation of co-occurrence features. Systems, Signals and Image Processing, 2008. IWSSIP 2008. 15th International Conference on , vol., no., pp.141,144, 25-28 June 2008 doi: 10.1109/IWSSIP.2008.4604387

Definition at line 66 of file otbGreyLevelCooccurrenceIndexedList.h.

Member Typedef Documentation

◆ ConstPointer

template<class TPixel >
typedef itk::SmartPointer<const Self> otb::GreyLevelCooccurrenceIndexedList< TPixel >::ConstPointer

Definition at line 73 of file otbGreyLevelCooccurrenceIndexedList.h.

◆ CooccurrencePairType

template<class TPixel >
typedef std::pair<IndexType, FrequencyType> otb::GreyLevelCooccurrenceIndexedList< TPixel >::CooccurrencePairType

Definition at line 102 of file otbGreyLevelCooccurrenceIndexedList.h.

◆ FrequencyType

template<class TPixel >
typedef InstanceIdentifier otb::GreyLevelCooccurrenceIndexedList< TPixel >::FrequencyType

Definition at line 90 of file otbGreyLevelCooccurrenceIndexedList.h.

◆ IndexType

template<class TPixel >
typedef itk::Index<PixelPairSize> otb::GreyLevelCooccurrenceIndexedList< TPixel >::IndexType

Definition at line 85 of file otbGreyLevelCooccurrenceIndexedList.h.

◆ IndexValueType

template<class TPixel >
typedef itk::IndexValueType otb::GreyLevelCooccurrenceIndexedList< TPixel >::IndexValueType

Definition at line 87 of file otbGreyLevelCooccurrenceIndexedList.h.

◆ InstanceIdentifier

template<class TPixel >
typedef itk::IdentifierType otb::GreyLevelCooccurrenceIndexedList< TPixel >::InstanceIdentifier

Definition at line 89 of file otbGreyLevelCooccurrenceIndexedList.h.

◆ LookupArrayType

template<class TPixel >
typedef itk::Array<int> otb::GreyLevelCooccurrenceIndexedList< TPixel >::LookupArrayType

Lookup array used to store the index of the given pixel pair. Size of LookupArray is equal to the nbins * nbins. Values in the array represents 1D index of the IndexType

Definition at line 107 of file otbGreyLevelCooccurrenceIndexedList.h.

◆ PixelPairType

template<class TPixel >
typedef itk::FixedArray<PixelValueType, PixelPairSize> otb::GreyLevelCooccurrenceIndexedList< TPixel >::PixelPairType

Definition at line 95 of file otbGreyLevelCooccurrenceIndexedList.h.

◆ PixelType

template<class TPixel >
typedef TPixel otb::GreyLevelCooccurrenceIndexedList< TPixel >::PixelType

Definition at line 79 of file otbGreyLevelCooccurrenceIndexedList.h.

◆ PixelValueType

template<class TPixel >
typedef itk::NumericTraits<PixelType>::RealType otb::GreyLevelCooccurrenceIndexedList< TPixel >::PixelValueType

Definition at line 94 of file otbGreyLevelCooccurrenceIndexedList.h.

◆ Pointer

template<class TPixel >
typedef itk::SmartPointer<Self> otb::GreyLevelCooccurrenceIndexedList< TPixel >::Pointer

Definition at line 72 of file otbGreyLevelCooccurrenceIndexedList.h.

◆ RelativeFrequencyType

template<class TPixel >
typedef itk::NumericTraits<FrequencyType>::RealType otb::GreyLevelCooccurrenceIndexedList< TPixel >::RelativeFrequencyType

Definition at line 91 of file otbGreyLevelCooccurrenceIndexedList.h.

◆ Self

Standard typedefs

Definition at line 70 of file otbGreyLevelCooccurrenceIndexedList.h.

◆ SizeType

template<class TPixel >
typedef itk::Size<PixelPairSize> otb::GreyLevelCooccurrenceIndexedList< TPixel >::SizeType

Definition at line 86 of file otbGreyLevelCooccurrenceIndexedList.h.

◆ Superclass

template<class TPixel >
typedef itk::LightObject otb::GreyLevelCooccurrenceIndexedList< TPixel >::Superclass

Definition at line 71 of file otbGreyLevelCooccurrenceIndexedList.h.

◆ TotalFrequencyType

template<class TPixel >
typedef itk::NumericTraits<FrequencyType>::AccumulateType otb::GreyLevelCooccurrenceIndexedList< TPixel >::TotalFrequencyType

Definition at line 92 of file otbGreyLevelCooccurrenceIndexedList.h.

◆ VectorType

template<class TPixel >
typedef std::vector<CooccurrencePairType> otb::GreyLevelCooccurrenceIndexedList< TPixel >::VectorType

std::vector to hold CooccurrencePairType. Index of the array where the cooccurrence is stored is saved in the LookupArrayType.

Definition at line 111 of file otbGreyLevelCooccurrenceIndexedList.h.

Constructor & Destructor Documentation

◆ GreyLevelCooccurrenceIndexedList() [1/2]

template<class TPixel >
otb::GreyLevelCooccurrenceIndexedList< TPixel >::GreyLevelCooccurrenceIndexedList
protected

Definition at line 30 of file otbGreyLevelCooccurrenceIndexedList.hxx.

◆ ~GreyLevelCooccurrenceIndexedList()

template<class TPixel >
otb::GreyLevelCooccurrenceIndexedList< TPixel >::~GreyLevelCooccurrenceIndexedList ( )
overrideprotecteddefault

◆ GreyLevelCooccurrenceIndexedList() [2/2]

template<class TPixel >
otb::GreyLevelCooccurrenceIndexedList< TPixel >::GreyLevelCooccurrenceIndexedList ( const Self )
privatedelete

Member Function Documentation

◆ AddPairToVector()

template<class TPixel >
void otb::GreyLevelCooccurrenceIndexedList< TPixel >::AddPairToVector ( IndexType  index)
protected

create a cooccurrence pair with given index and frequency = 1 value. Next occurrence of same index is checked via m_LookupArray and the corresponding frequency value is incremented. If m_Symmetry is true the co-occurrence pair is added again with index values swapped

Definition at line 257 of file otbGreyLevelCooccurrenceIndexedList.hxx.

◆ AddPixelPair()

template<class TPixel >
void otb::GreyLevelCooccurrenceIndexedList< TPixel >::AddPixelPair ( const PixelValueType pixelvalue1,
const PixelValueType pixelvalue2 
)

Definition at line 185 of file otbGreyLevelCooccurrenceIndexedList.hxx.

◆ CreateAnother()

template<class TPixel >
virtual::itk::LightObject::Pointer otb::GreyLevelCooccurrenceIndexedList< TPixel >::CreateAnother ( void  ) const

◆ GetFrequency() [1/2]

template<class TPixel >
GreyLevelCooccurrenceIndexedList< TPixel >::RelativeFrequencyType otb::GreyLevelCooccurrenceIndexedList< TPixel >::GetFrequency ( IndexValueType  i,
IndexValueType  j 
)

Definition at line 221 of file otbGreyLevelCooccurrenceIndexedList.hxx.

◆ GetFrequency() [2/2]

template<class TPixel >
GreyLevelCooccurrenceIndexedList< TPixel >::RelativeFrequencyType otb::GreyLevelCooccurrenceIndexedList< TPixel >::GetFrequency ( IndexValueType  i,
IndexValueType  j,
const VectorType vect 
) const

Definition at line 237 of file otbGreyLevelCooccurrenceIndexedList.hxx.

◆ GetIndex()

template<class TPixel >
bool otb::GreyLevelCooccurrenceIndexedList< TPixel >::GetIndex ( const PixelPairType pixelPair,
IndexType index 
) const
protected

Get index of the pixelPair combination and save the result in index

Definition at line 98 of file otbGreyLevelCooccurrenceIndexedList.hxx.

◆ GetNameOfClass()

template<class TPixel >
virtual const char* otb::GreyLevelCooccurrenceIndexedList< TPixel >::GetNameOfClass ( ) const
virtual

RTTI

◆ GetSymmetry()

template<class TPixel >
virtual bool otb::GreyLevelCooccurrenceIndexedList< TPixel >::GetSymmetry ( )
virtual

Get the total frequency of Co-occurrence pairs.

◆ GetTotalFrequency()

template<class TPixel >
virtual TotalFrequencyType otb::GreyLevelCooccurrenceIndexedList< TPixel >::GetTotalFrequency ( )
virtual

Get the total frequency of Co-occurrence pairs.

◆ GetVector()

template<class TPixel >
GreyLevelCooccurrenceIndexedList< TPixel >::VectorType otb::GreyLevelCooccurrenceIndexedList< TPixel >::GetVector

Get std::vector containing non-zero co-occurrence pairs

Definition at line 251 of file otbGreyLevelCooccurrenceIndexedList.hxx.

◆ Initialize()

template<class TPixel >
void otb::GreyLevelCooccurrenceIndexedList< TPixel >::Initialize ( const unsigned int  nbins,
const PixelValueType  min,
const PixelValueType  max,
const bool  symmetry = true 
)

Initialize the lowerbound and upper bound vecotor, Fill m_LookupArray with -1 and set m_TotalFrequency to zero

Definition at line 36 of file otbGreyLevelCooccurrenceIndexedList.hxx.

◆ New()

template<class TPixel >
static Pointer otb::GreyLevelCooccurrenceIndexedList< TPixel >::New ( )
static

Creation through the object factory

◆ operator=()

template<class TPixel >
void otb::GreyLevelCooccurrenceIndexedList< TPixel >::operator= ( const Self )
privatedelete

◆ PrintSelf()

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

Definition at line 278 of file otbGreyLevelCooccurrenceIndexedList.hxx.

◆ SetBinMax()

template<class TPixel >
void otb::GreyLevelCooccurrenceIndexedList< TPixel >::SetBinMax ( const unsigned int  dimension,
const InstanceIdentifier  nbin,
PixelValueType  max 
)
protected

Definition at line 92 of file otbGreyLevelCooccurrenceIndexedList.hxx.

◆ SetBinMin()

template<class TPixel >
void otb::GreyLevelCooccurrenceIndexedList< TPixel >::SetBinMin ( const unsigned int  dimension,
const InstanceIdentifier  nbin,
PixelValueType  min 
)
protected

Definition at line 86 of file otbGreyLevelCooccurrenceIndexedList.hxx.

Member Data Documentation

◆ m_ClipBinsAtEnds

template<class TPixel >
bool otb::GreyLevelCooccurrenceIndexedList< TPixel >::m_ClipBinsAtEnds
private

boolean to check pixel values fall under m_InputImageMinimum and m_InputImageMaximum. Used in GetIndex method. false by default

Definition at line 177 of file otbGreyLevelCooccurrenceIndexedList.h.

◆ m_InputImageMaximum

template<class TPixel >
PixelValueType otb::GreyLevelCooccurrenceIndexedList< TPixel >::m_InputImageMaximum
private

Input image maximum

Definition at line 183 of file otbGreyLevelCooccurrenceIndexedList.h.

◆ m_InputImageMinimum

template<class TPixel >
PixelValueType otb::GreyLevelCooccurrenceIndexedList< TPixel >::m_InputImageMinimum
private

Input image minimum

Definition at line 180 of file otbGreyLevelCooccurrenceIndexedList.h.

◆ m_LookupArray

template<class TPixel >
LookupArrayType otb::GreyLevelCooccurrenceIndexedList< TPixel >::m_LookupArray
private

LookupArray instance

Definition at line 161 of file otbGreyLevelCooccurrenceIndexedList.h.

◆ m_Max

template<class TPixel >
std::vector<std::vector<PixelValueType> > otb::GreyLevelCooccurrenceIndexedList< TPixel >::m_Max

Definition at line 99 of file otbGreyLevelCooccurrenceIndexedList.h.

◆ m_Min

template<class TPixel >
std::vector<std::vector<PixelValueType> > otb::GreyLevelCooccurrenceIndexedList< TPixel >::m_Min

Definition at line 97 of file otbGreyLevelCooccurrenceIndexedList.h.

◆ m_Size

template<class TPixel >
SizeType otb::GreyLevelCooccurrenceIndexedList< TPixel >::m_Size
private

Definition at line 167 of file otbGreyLevelCooccurrenceIndexedList.h.

◆ m_Symmetry

template<class TPixel >
bool otb::GreyLevelCooccurrenceIndexedList< TPixel >::m_Symmetry
private

booleab to check if co-occurrene list is a symmtrical. true by default

Definition at line 170 of file otbGreyLevelCooccurrenceIndexedList.h.

◆ m_TotalFrequency

template<class TPixel >
TotalFrequencyType otb::GreyLevelCooccurrenceIndexedList< TPixel >::m_TotalFrequency
private

Definition at line 173 of file otbGreyLevelCooccurrenceIndexedList.h.

◆ m_Vector

template<class TPixel >
VectorType otb::GreyLevelCooccurrenceIndexedList< TPixel >::m_Vector
private

Definition at line 164 of file otbGreyLevelCooccurrenceIndexedList.h.

◆ PixelPairSize

template<class TPixel >
const unsigned int otb::GreyLevelCooccurrenceIndexedList< TPixel >::PixelPairSize = 2
static

Definition at line 83 of file otbGreyLevelCooccurrenceIndexedList.h.


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