OTB  6.7.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 Self
ConstPointer
 
typedef std::pair< IndexType,
FrequencyType
CooccurrencePairType
 
typedef InstanceIdentifier FrequencyType
 
typedef itk::Index< PixelPairSizeIndexType
 
typedef itk::IndexValueType IndexValueType
 
typedef itk::IdentifierType InstanceIdentifier
 
typedef itk::Array< int > LookupArrayType
 
typedef itk::FixedArray
< PixelValueType,
PixelPairSize
PixelPairType
 
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
< CooccurrencePairType
VectorType
 
- Public Types inherited from itk::LightObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightObject Self
 

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)
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 
virtual void Register () const
 
virtual void SetReferenceCount (int)
 
virtual void UnRegister () const noexcept
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
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
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

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
 

Additional Inherited Members

- Protected Attributes inherited from itk::LightObject
AtomicInt< int > m_ReferenceCount
 

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 unqiue 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 wheather 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

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

Definition at line 74 of file otbGreyLevelCooccurrenceIndexedList.h.

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

Definition at line 103 of file otbGreyLevelCooccurrenceIndexedList.h.

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

Definition at line 91 of file otbGreyLevelCooccurrenceIndexedList.h.

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

Definition at line 86 of file otbGreyLevelCooccurrenceIndexedList.h.

Definition at line 88 of file otbGreyLevelCooccurrenceIndexedList.h.

Definition at line 90 of file otbGreyLevelCooccurrenceIndexedList.h.

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 LookupAray is equal to the nbins * nbins. Values in the array represents 1D index of the IndexType

Definition at line 108 of file otbGreyLevelCooccurrenceIndexedList.h.

Definition at line 96 of file otbGreyLevelCooccurrenceIndexedList.h.

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

Definition at line 80 of file otbGreyLevelCooccurrenceIndexedList.h.

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

Definition at line 95 of file otbGreyLevelCooccurrenceIndexedList.h.

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

Definition at line 73 of file otbGreyLevelCooccurrenceIndexedList.h.

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

Definition at line 92 of file otbGreyLevelCooccurrenceIndexedList.h.

Standard typedefs

Definition at line 71 of file otbGreyLevelCooccurrenceIndexedList.h.

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

Definition at line 87 of file otbGreyLevelCooccurrenceIndexedList.h.

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

Definition at line 72 of file otbGreyLevelCooccurrenceIndexedList.h.

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

Definition at line 93 of file otbGreyLevelCooccurrenceIndexedList.h.

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 112 of file otbGreyLevelCooccurrenceIndexedList.h.

Constructor & Destructor Documentation

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

Definition at line 31 of file otbGreyLevelCooccurrenceIndexedList.hxx.

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

Definition at line 141 of file otbGreyLevelCooccurrenceIndexedList.h.

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

Member Function Documentation

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 292 of file otbGreyLevelCooccurrenceIndexedList.hxx.

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

Definition at line 212 of file otbGreyLevelCooccurrenceIndexedList.hxx.

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

Reimplemented from itk::LightObject.

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

Definition at line 252 of file otbGreyLevelCooccurrenceIndexedList.hxx.

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

Definition at line 268 of file otbGreyLevelCooccurrenceIndexedList.hxx.

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 122 of file otbGreyLevelCooccurrenceIndexedList.hxx.

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

RTTI

Reimplemented from itk::LightObject.

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

Get the total frequency of Co-occurrence pairs.

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

Get the total frequency of Co-occurrence pairs.

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

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

Definition at line 284 of file otbGreyLevelCooccurrenceIndexedList.hxx.

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 45 of file otbGreyLevelCooccurrenceIndexedList.hxx.

References itk::FixedArray< TValue, VLength >::Fill().

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

Creation through the object factory

template<class TPixel>
void otb::GreyLevelCooccurrenceIndexedList< TPixel >::operator= ( const Self )
privatedelete
template<class TPixel >
void otb::GreyLevelCooccurrenceIndexedList< TPixel >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotectedvirtual

Reimplemented from itk::LightObject.

Definition at line 315 of file otbGreyLevelCooccurrenceIndexedList.hxx.

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

Definition at line 113 of file otbGreyLevelCooccurrenceIndexedList.hxx.

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

Definition at line 104 of file otbGreyLevelCooccurrenceIndexedList.hxx.

Member Data Documentation

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 182 of file otbGreyLevelCooccurrenceIndexedList.h.

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

Input image maximum

Definition at line 188 of file otbGreyLevelCooccurrenceIndexedList.h.

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

Input image minimum

Definition at line 185 of file otbGreyLevelCooccurrenceIndexedList.h.

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

LookupArray instance

Definition at line 166 of file otbGreyLevelCooccurrenceIndexedList.h.

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

Definition at line 100 of file otbGreyLevelCooccurrenceIndexedList.h.

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

Definition at line 98 of file otbGreyLevelCooccurrenceIndexedList.h.

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

Definition at line 172 of file otbGreyLevelCooccurrenceIndexedList.h.

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 175 of file otbGreyLevelCooccurrenceIndexedList.h.

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

Definition at line 178 of file otbGreyLevelCooccurrenceIndexedList.h.

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

Definition at line 169 of file otbGreyLevelCooccurrenceIndexedList.h.

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

Definition at line 84 of file otbGreyLevelCooccurrenceIndexedList.h.


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