ITK  4.1.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Private Member Functions | Private Attributes
itk::Statistics::HistogramToTextureFeaturesFilter< THistogram > Class Template Reference

#include <itkHistogramToTextureFeaturesFilter.h>

+ Inheritance diagram for itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >:
+ Collaboration diagram for itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >:

List of all members.

Public Types

typedef
HistogramType::AbsoluteFrequencyType 
AbsoluteFrequencyType
typedef SmartPointer< const SelfConstPointer
typedef DataObject::Pointer DataObjectPointer
typedef HistogramType::ConstPointer HistogramConstPointer
typedef HistogramType::Pointer HistogramPointer
typedef THistogram HistogramType
typedef HistogramType::IndexType IndexType
typedef
SimpleDataObjectDecorator
< MeasurementType
MeasurementObjectType
typedef
HistogramType::MeasurementType 
MeasurementType
typedef
HistogramType::MeasurementVectorType 
MeasurementVectorType
typedef SmartPointer< SelfPointer
typedef std::vector
< RelativeFrequencyType
RelativeFrequencyContainerType
typedef
HistogramType::RelativeFrequencyType 
RelativeFrequencyType
typedef
HistogramToTextureFeaturesFilter 
Self
typedef ProcessObject Superclass
enum  TextureFeatureName {
  Energy,
  Entropy,
  Correlation,
  InverseDifferenceMoment,
  Inertia,
  ClusterShade,
  ClusterProminence,
  HaralickCorrelation,
  InvalidFeatureName
}
typedef
HistogramType::TotalAbsoluteFrequencyType 
TotalAbsoluteFrequencyType
typedef
HistogramType::TotalRelativeFrequencyType 
TotalRelativeFrequencyType

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
MeasurementType GetClusterProminence () const
const MeasurementObjectTypeGetClusterProminenceOutput () const
MeasurementType GetClusterShade () const
const MeasurementObjectTypeGetClusterShadeOutput () const
MeasurementType GetCorrelation () const
const MeasurementObjectTypeGetCorrelationOutput () const
MeasurementType GetEnergy () const
const MeasurementObjectTypeGetEnergyOutput () const
MeasurementType GetEntropy () const
const MeasurementObjectTypeGetEntropyOutput () const
MeasurementType GetFeature (TextureFeatureName name)
MeasurementType GetHaralickCorrelation () const
const MeasurementObjectTypeGetHaralickCorrelationOutput () const
MeasurementType GetInertia () const
const MeasurementObjectTypeGetInertiaOutput () const
const HistogramTypeGetInput () const
MeasurementType GetInverseDifferenceMoment () const
const MeasurementObjectTypeGetInverseDifferenceMomentOutput () const
virtual const char * GetNameOfClass () const
void SetInput (const HistogramType *histogram)

Static Public Member Functions

static Pointer New ()

Protected Types

typedef
ProcessObject::DataObjectPointerArraySizeType 
DataObjectPointerArraySizeType

Protected Member Functions

void GenerateData ()
 HistogramToTextureFeaturesFilter ()
virtual DataObjectPointer MakeOutput (DataObjectPointerArraySizeType)
void PrintSelf (std::ostream &os, Indent indent) const
 ~HistogramToTextureFeaturesFilter ()

Private Member Functions

void ComputeMeansAndVariances (double &pixelMean, double &marginalMean, double &marginalDevSquared, double &pixelVariance)
 HistogramToTextureFeaturesFilter (const Self &)
void operator= (const Self &)

Private Attributes

RelativeFrequencyContainerType m_RelativeFrequencyContainer

Detailed Description

template<class THistogram>
class itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >

This class computes texture feature coefficients from a grey level co-occurrence matrix.

This class computes features that summarize image texture, given a grey level co-occurrence matrix (generated by a ScalarImageToGreyLevelCooccurrenceMatrixGenerator or related class).

The features calculated are as follows (where $ g(i, j) $ is the element in cell i, j of a a normalized GLCM):

"Energy" $ = f_1 = \sum_{i,j}g(i, j)^2 $

"Entropy" $ = f_2 = -\sum_{i,j}g(i, j) \log_2 g(i, j)$, or 0 if $g(i, j) = 0$

"Correlation" $ = f_3 = \sum_{i,j}\frac{(i - \mu)(j - \mu)g(i, j)}{\sigma^2} $

"Difference Moment" $= f_4 = \sum_{i,j}\frac{1}{1 + (i - j)^2}g(i, j) $

"Inertia" $ = f_5 = \sum_{i,j}(i - j)^2g(i, j) $ (sometimes called "contrast.")

"Cluster Shade" $ = f_6 = \sum_{i,j}((i - \mu) + (j - \mu))^3 g(i, j) $

"Cluster Prominence" $ = f_7 = \sum_{i,j}((i - \mu) + (j - \mu))^4 g(i, j) $

"Haralick's Correlation" $ = f_8 = \frac{\sum_{i,j}(i, j) g(i, j) -\mu_t^2}{\sigma_t^2} $ where $\mu_t$ and $\sigma_t$ are the mean and standard deviation of the row (or column, due to symmetry) sums.

Above, $ \mu = $ (weighted pixel average) $ = \sum_{i,j}i \cdot g(i, j) = \sum_{i,j}j \cdot g(i, j) $ (due to matrix summetry), and

$ \sigma = $ (weighted pixel variance) $ = \sum_{i,j}(i - \mu)^2 \cdot g(i, j) = \sum_{i,j}(j - \mu)^2 \cdot g(i, j) $ (due to matrix summetry)

A good texture feature set to use is the Conners, Trivedi and Harlow set: features 1, 2, 4, 5, 6, and 7. There is some correlation between the various features, so using all of them at the same time is not necessarialy a good idea.

NOTA BENE: The input histogram will be forcably normalized! This algorithm takes three passes through the input histogram if the histogram was already normalized, and four if not.

Web references:

http://www.cssip.uq.edu.au/meastex/www/algs/algs/algs.html http://www.ucalgary.ca/~mhallbey/texture/texture_tutorial.html

Print references:

Haralick, R.M., K. Shanmugam and I. Dinstein. 1973. Textural Features for Image Classification. IEEE Transactions on Systems, Man and Cybernetics. SMC-3(6):610-620.

Haralick, R.M. 1979. Statistical and Structural Approaches to Texture. Proceedings of the IEEE, 67:786-804.

R.W. Conners and C.A. Harlow. A Theoretical Comaprison of Texture Algorithms. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2:204-222, 1980.

R.W. Conners, M.M. Trivedi, and C.A. Harlow. Segmentation of a High-Resolution Urban Scene using Texture Operators. Computer Vision, Graphics and Image Processing, 25:273-310, 1984.

See also:
ScalarImageToGreyLevelCooccurrenceMatrixGenerator
MaskedScalarImageToGreyLevelCooccurrenceMatrixGenerator
ScalarImageTextureCalculator

Author: Zachary Pincus

Definition at line 103 of file itkHistogramToTextureFeaturesFilter.h.


Member Typedef Documentation

template<class THistogram >
typedef HistogramType::AbsoluteFrequencyType itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::AbsoluteFrequencyType

Definition at line 124 of file itkHistogramToTextureFeaturesFilter.h.

template<class THistogram >
typedef SmartPointer< const Self > itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::ConstPointer

Reimplemented from itk::ProcessObject.

Definition at line 110 of file itkHistogramToTextureFeaturesFilter.h.

Smart Pointer type to a DataObject.

Reimplemented from itk::ProcessObject.

Definition at line 143 of file itkHistogramToTextureFeaturesFilter.h.

Make a DataObject to be used for output output.

Reimplemented from itk::ProcessObject.

Definition at line 210 of file itkHistogramToTextureFeaturesFilter.h.

template<class THistogram >
typedef HistogramType::ConstPointer itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::HistogramConstPointer

Definition at line 120 of file itkHistogramToTextureFeaturesFilter.h.

template<class THistogram >
typedef HistogramType::Pointer itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::HistogramPointer

Definition at line 119 of file itkHistogramToTextureFeaturesFilter.h.

template<class THistogram >
typedef THistogram itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::HistogramType

Definition at line 116 of file itkHistogramToTextureFeaturesFilter.h.

template<class THistogram >
typedef HistogramType::IndexType itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::IndexType

Definition at line 123 of file itkHistogramToTextureFeaturesFilter.h.

Type of DataObjects used for scalar outputs

Definition at line 146 of file itkHistogramToTextureFeaturesFilter.h.

template<class THistogram >
typedef HistogramType::MeasurementType itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::MeasurementType

Definition at line 121 of file itkHistogramToTextureFeaturesFilter.h.

template<class THistogram >
typedef HistogramType::MeasurementVectorType itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::MeasurementVectorType

Definition at line 122 of file itkHistogramToTextureFeaturesFilter.h.

template<class THistogram >
typedef SmartPointer< Self > itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::Pointer

Reimplemented from itk::ProcessObject.

Definition at line 109 of file itkHistogramToTextureFeaturesFilter.h.

template<class THistogram >
typedef std::vector< RelativeFrequencyType > itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::RelativeFrequencyContainerType

Container to hold relative frequencies of the histogram

Definition at line 134 of file itkHistogramToTextureFeaturesFilter.h.

template<class THistogram >
typedef HistogramType::RelativeFrequencyType itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::RelativeFrequencyType

Definition at line 125 of file itkHistogramToTextureFeaturesFilter.h.

Standard typedefs

Reimplemented from itk::ProcessObject.

Definition at line 107 of file itkHistogramToTextureFeaturesFilter.h.

template<class THistogram >
typedef ProcessObject itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::Superclass

Reimplemented from itk::ProcessObject.

Definition at line 108 of file itkHistogramToTextureFeaturesFilter.h.

template<class THistogram >
typedef HistogramType::TotalAbsoluteFrequencyType itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::TotalAbsoluteFrequencyType

Definition at line 128 of file itkHistogramToTextureFeaturesFilter.h.

template<class THistogram >
typedef HistogramType::TotalRelativeFrequencyType itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::TotalRelativeFrequencyType

Definition at line 131 of file itkHistogramToTextureFeaturesFilter.h.


Member Enumeration Documentation

Texture feature types

Enumerator:
Energy 
Entropy 
Correlation 
InverseDifferenceMoment 
Inertia 
ClusterShade 
ClusterProminence 
HaralickCorrelation 
InvalidFeatureName 

Definition at line 189 of file itkHistogramToTextureFeaturesFilter.h.


Constructor & Destructor Documentation

template<class THistogram >
itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::HistogramToTextureFeaturesFilter ( ) [protected]
template<class THistogram >
itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::~HistogramToTextureFeaturesFilter ( ) [inline, protected]

Definition at line 206 of file itkHistogramToTextureFeaturesFilter.h.

template<class THistogram >
itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::HistogramToTextureFeaturesFilter ( const Self ) [private]

Member Function Documentation

template<class THistogram >
void itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::ComputeMeansAndVariances ( double &  pixelMean,
double &  marginalMean,
double &  marginalDevSquared,
double &  pixelVariance 
) [private]
template<class THistogram >
virtual::itk::LightObject::Pointer itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::CreateAnother ( void  ) const [virtual]

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::Object.

template<class THistogram >
void itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::GenerateData ( void  ) [protected, virtual]

This method causes the filter to generate its output.

Reimplemented from itk::ProcessObject.

template<class THistogram >
MeasurementType itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::GetClusterProminence ( ) const

Return cluster prominence texture value.

template<class THistogram >
const MeasurementObjectType* itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::GetClusterProminenceOutput ( ) const
template<class THistogram >
MeasurementType itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::GetClusterShade ( ) const

Return cluster shade texture value.

template<class THistogram >
const MeasurementObjectType* itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::GetClusterShadeOutput ( ) const
template<class THistogram >
MeasurementType itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::GetCorrelation ( ) const

return correlation texture value.

template<class THistogram >
const MeasurementObjectType* itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::GetCorrelationOutput ( ) const
template<class THistogram >
MeasurementType itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::GetEnergy ( ) const

Return energy texture value.

template<class THistogram >
const MeasurementObjectType* itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::GetEnergyOutput ( ) const
template<class THistogram >
MeasurementType itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::GetEntropy ( ) const

Return entropy texture value.

template<class THistogram >
const MeasurementObjectType* itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::GetEntropyOutput ( ) const

convenience method to access the texture values

Return Haralick correlation texture value.

template<class THistogram >
MeasurementType itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::GetInertia ( ) const

Return inertia texture value.

template<class THistogram >
const MeasurementObjectType* itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::GetInertiaOutput ( ) const
template<class THistogram >
const HistogramType* itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::GetInput ( ) const

Return inverse difference moment texture value.

template<class THistogram >
virtual const char* itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::GetNameOfClass ( ) const [virtual]

Run-time type information (and related methods).

Reimplemented from itk::ProcessObject.

template<class THistogram >
virtual DataObjectPointer itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::MakeOutput ( DataObjectPointerArraySizeType  idx) [protected, virtual]

Make a DataObject of the correct type to used as the specified output. Every ProcessObject subclass must be able to create a DataObject that can be used as a specified output. This method is automatically called when DataObject::DisconnectPipeline() is called. DataObject::DisconnectPipeline, disconnects a data object from being an output of its current source. When the data object is disconnected, the ProcessObject needs to construct a replacement output data object so that the ProcessObject is in a valid state. So DataObject::DisconnectPipeline eventually calls ProcessObject::MakeOutput. Note that MakeOutput always returns a itkSmartPointer to a DataObject. ImageSource and MeshSource override this method to create the correct type of image and mesh respectively. If a filter has multiple outputs of different types, then that filter must provide an implementation of MakeOutput().

Reimplemented from itk::ProcessObject.

template<class THistogram >
static Pointer itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::New ( ) [static]

standard New() method support

Reimplemented from itk::Object.

template<class THistogram >
void itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::operator= ( const Self ) [private]

Time when GenerateOutputInformation was last called.

Reimplemented from itk::ProcessObject.

template<class THistogram >
void itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const [protected, virtual]

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from itk::ProcessObject.

template<class THistogram >
void itk::Statistics::HistogramToTextureFeaturesFilter< THistogram >::SetInput ( const HistogramType histogram)

Member Data Documentation

Definition at line 223 of file itkHistogramToTextureFeaturesFilter.h.


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