Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itk::Statistics::GoodnessOfFitComponentBase< TInputSample > Class Template Reference

provides component (module) type specific functionalities for GoodnessOfFitMixtureModelCostFunction. More...

#include <itkGoodnessOfFitComponentBase.h>

Inheritance diagram for itk::Statistics::GoodnessOfFitComponentBase< TInputSample >:

Inheritance graph
[legend]
Collaboration diagram for itk::Statistics::GoodnessOfFitComponentBase< TInputSample >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef GoodnessOfFitComponentBase Self
typedef Object Superclass
typedef SmartPointer< SelfPointer
typedef SmartPointer< const
Self
ConstPointer
typedef TInputSample InputSampleType
typedef TInputSample::MeasurementType MeasurementType
typedef TInputSample::MeasurementVectorType MeasurementVectorType
typedef TInputSample::MeasurementVectorSizeType MeasurementVectorSizeType
typedef Subsample< TInputSample > ResampledSampleType
typedef Histogram< float, 1 > HistogramType
typedef HistogramType::Pointer HistogramPointer
typedef HistogramType::ConstPointer HistogramConstPointer
typedef Array< double > ParametersType
typedef Array< double > CenterType
typedef double RadiusType
typedef Array< double > MeanType
typedef double StandardDeviationType

Public Member Functions

virtual const char * GetNameOfClass () const
virtual unsigned int GetNumberOfParameters () const=0
void SetUseExpectedHistogram (bool flag)
virtual CenterTypeGetCenter ()=0
virtual RadiusTypeGetRadius ()=0
virtual MeanTypeGetMean ()=0
virtual RadiusTypeGetStandardDeviation ()=0
virtual void CreateHistograms ()
virtual void Resample ()
ResampledSampleTypeGetResampledSample ()
virtual unsigned int GetResampledSampleSize ()
virtual void CalculateProjectionAxes ()=0
virtual void Project (int projectionAxisIndex)
virtual void UpdateExpectedHistogram ()
double * GetTotalObservedScale ()
virtual double GetCumulativeProbability (double x) const=0
virtual double GetProbabilityDensity (MeasurementVectorType &measurements) const=0
virtual double GetProportion () const
HistogramTypeGetObservedHistogram ()
HistogramTypeGetExpectedHistogram ()
virtual void PrintParameters (std::ostream &os) const=0
virtual ParametersType GetFullParameters () const=0
virtual MeasurementVectorSizeType GetMeasurementVectorSize () const
virtual void SetInputSample (const TInputSample *sample)
const TInputSample * GetInputSample () const
virtual void SetParameters (const ParametersType &parameters)
ParametersTypeGetParameters ()
void SetHistogramNumberOfBins (int numberOfBins)
int GetHistogramNumberOfBins ()
void SetHistogramUseEquiProbableBins (bool flag)
bool GetHistogramUseEquiProbableBins ()
void SetHistogramBinOverlap (double overlap)
double GetHistogramBinOverlap ()
void SetHistogramExtent (double extent)
double GetHistogramExtent ()

Protected Types

typedef NeighborhoodSampler<
TInputSample > 
ResamplerType
typedef SampleToHistogramProjectionFilter<
ResampledSampleType, float > 
ProjectorType
typedef VariableSizeMatrix<
double > 
ProjectionAxisArrayType

Protected Member Functions

 GoodnessOfFitComponentBase ()
virtual ~GoodnessOfFitComponentBase ()
virtual void PrintSelf (std::ostream &os, Indent indent) const
ProjectionAxisArrayTypeGetProjectionAxes ()
virtual void CreateEquiRangeBins ()
virtual void CreateEquiProbableBins ()

Detailed Description

template<class TInputSample>
class itk::Statistics::GoodnessOfFitComponentBase< TInputSample >

provides component (module) type specific functionalities for GoodnessOfFitMixtureModelCostFunction.

This defines common iterfaces for each subclasses and provides common functionalities across different types of components (e.g. GaussianGoodnessOfFitComponent)

The primary role of a GoodnessOfFitComponent is to create an 1D histogram (called an observed histogram ) of the input sample after resampling the input using spherical kernel and projecting the resampled sample along base axes, and to create corresponding 1D histogram (expected histogram) that has the same histogram configuration as the observed histogram but has the expected frequencies from the given component parameters.

You can set up the two histograms' configuration by calling SetHistogramNumberOfBins, SetHistogramUseEquiProbableBins, SetHistogramBingOverlap, SetHistogramExtent. After you change the histogram configuration, call the CreateHistograms method to allocate histograms. If you set the UseExpectedHistogram flag to false by callsing SetUseExpectedHistogram(false), the CreateHistograms method won't create the expected histogram. The decision should be made by the GoodnessOfFitFunction object that will be plugged-in to the GoodnessOfFitMixtureModelCostFunction. So the method shouldn't be called manually.

This base class provides default implementations for the resampling and projection using helper classes (NeighborhoodSampler, SampleToHistogramProjectionFilter).

To determine the base axis, call the CalculateProjectionAxes method. each subclass should implement it.

Another group of functions includes probability function such as GetProbabilityDensity(MeasurementVectorType) multivariate probability density function of the subclass GetCumulativeProbability(MeasurementType) univariate cumulative probabilty function

To see how all this methods are used in order, take a look at the implementation of the GetValue method of the GoodnessOfFitMixtureModelCostFunction class.

Recent API changes The typedef for CenterType and MeanType has changed to itk::Array from FixedArray and Vector respectively to allow the measurement vector length to be set at run time. The StaticConst macro MeasurementVectorSize has been removed. It is now obtained from the sample. The typedef for ProjectionAxisArrayType has changed from FixedArray to VariableSizeMatrix.

See also:
GoodnessOfFitMixtureModelCostFunction, GoodnessOfFitFunctionBase, GaussianGoodnessOfFitComponent, NeighborhoodSampler, SampleToHistogramProjectionFilter

Definition at line 89 of file itkGoodnessOfFitComponentBase.h.


Member Typedef Documentation

template<class TInputSample>
typedef Array< double > itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::CenterType
 

Type of the center position for the hyperspherical neighborhood sampling

Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.

Definition at line 124 of file itkGoodnessOfFitComponentBase.h.

template<class TInputSample>
typedef SmartPointer< const Self > itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::ConstPointer
 

Reimplemented from itk::Object.

Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.

Definition at line 97 of file itkGoodnessOfFitComponentBase.h.

template<class TInputSample>
typedef HistogramType::ConstPointer itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::HistogramConstPointer
 

Definition at line 117 of file itkGoodnessOfFitComponentBase.h.

template<class TInputSample>
typedef HistogramType::Pointer itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::HistogramPointer
 

Definition at line 116 of file itkGoodnessOfFitComponentBase.h.

template<class TInputSample>
typedef Histogram< float, 1 > itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::HistogramType
 

Histogram type that will be used for observed and expected histogram

Definition at line 115 of file itkGoodnessOfFitComponentBase.h.

template<class TInputSample>
typedef TInputSample itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::InputSampleType
 

TInputSample type alias

Definition at line 103 of file itkGoodnessOfFitComponentBase.h.

template<class TInputSample>
typedef Array< double > itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::MeanType
 

Type of the mean of the distribution

Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.

Definition at line 130 of file itkGoodnessOfFitComponentBase.h.

Referenced by itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GetHistogramExtent().

template<class TInputSample>
typedef TInputSample::MeasurementType itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::MeasurementType
 

Typedefs from the TInputSample

Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.

Definition at line 107 of file itkGoodnessOfFitComponentBase.h.

template<class TInputSample>
typedef TInputSample::MeasurementVectorSizeType itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::MeasurementVectorSizeType
 

Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.

Definition at line 109 of file itkGoodnessOfFitComponentBase.h.

template<class TInputSample>
typedef TInputSample::MeasurementVectorType itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::MeasurementVectorType
 

Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.

Definition at line 108 of file itkGoodnessOfFitComponentBase.h.

Referenced by itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GetTotalObservedScale().

template<class TInputSample>
typedef Array< double > itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::ParametersType
 

Type of the array of component parameters

Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.

Definition at line 120 of file itkGoodnessOfFitComponentBase.h.

template<class TInputSample>
typedef SmartPointer< Self > itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::Pointer
 

Reimplemented from itk::Object.

Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.

Definition at line 96 of file itkGoodnessOfFitComponentBase.h.

template<class TInputSample>
typedef VariableSizeMatrix< double > itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::ProjectionAxisArrayType [protected]
 

projection axis array type. The type of output from CalculateProjectionAxis(). The number of projection axis are fixed equal to the number of components of a measurement vector.

Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.

Definition at line 268 of file itkGoodnessOfFitComponentBase.h.

template<class TInputSample>
typedef SampleToHistogramProjectionFilter< ResampledSampleType, float > itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::ProjectorType [protected]
 

default projection filter type

Definition at line 262 of file itkGoodnessOfFitComponentBase.h.

template<class TInputSample>
typedef double itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::RadiusType
 

Type of the radius of the hyperspherical neighborhood sampling

Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.

Definition at line 127 of file itkGoodnessOfFitComponentBase.h.

Referenced by itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GetHistogramExtent().

template<class TInputSample>
typedef Subsample< TInputSample > itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::ResampledSampleType
 

Resample() output type

Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.

Definition at line 112 of file itkGoodnessOfFitComponentBase.h.

Referenced by itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GetHistogramExtent().

template<class TInputSample>
typedef NeighborhoodSampler< TInputSample > itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::ResamplerType [protected]
 

default resampler type and realted types

Definition at line 258 of file itkGoodnessOfFitComponentBase.h.

template<class TInputSample>
typedef GoodnessOfFitComponentBase itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::Self
 

Standard class typedefs

Reimplemented from itk::Object.

Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.

Definition at line 94 of file itkGoodnessOfFitComponentBase.h.

template<class TInputSample>
typedef double itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::StandardDeviationType
 

Type of standard deviation of the distribution

Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.

Definition at line 134 of file itkGoodnessOfFitComponentBase.h.

template<class TInputSample>
typedef Object itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::Superclass
 

Reimplemented from itk::Object.

Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.

Definition at line 95 of file itkGoodnessOfFitComponentBase.h.


Constructor & Destructor Documentation

template<class TInputSample>
itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GoodnessOfFitComponentBase  )  [protected]
 

template<class TInputSample>
virtual itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::~GoodnessOfFitComponentBase  )  [protected, virtual]
 


Member Function Documentation

template<class TInputSample>
virtual void itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::CalculateProjectionAxes  )  [pure virtual]
 

Calculates the longest axis based on eigen analysis

Implemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.

template<class TInputSample>
virtual void itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::CreateEquiProbableBins  )  [protected, virtual]
 

Creates an empty histogram with bins having same probability based on the distribution parameters

template<class TInputSample>
virtual void itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::CreateEquiRangeBins  )  [protected, virtual]
 

Creates an empty histogram with bins having same interval

template<class TInputSample>
virtual void itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::CreateHistograms  )  [virtual]
 

Generates the histogram (expected and observed)

template<class TInputSample>
virtual CenterType* itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GetCenter  )  [pure virtual]
 

Gets the center position for the neighborhood sampling

Implemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.

template<class TInputSample>
virtual double itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GetCumulativeProbability double  x  )  const [pure virtual]
 

Gets the probability of x. univariate function

Implemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.

template<class TInputSample>
HistogramType* itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GetExpectedHistogram  ) 
 

Gets the expected historm

template<class TInputSample>
virtual ParametersType itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GetFullParameters  )  const [pure virtual]
 

Gest the parameters of this component

Implemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.

template<class TInputSample>
double itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GetHistogramBinOverlap  )  [inline]
 

Set/Get the overlapping effects extent.

Definition at line 170 of file itkGoodnessOfFitComponentBase.h.

template<class TInputSample>
double itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GetHistogramExtent  )  [inline]
 

Set/Gets the extent of histogram from the mean in terms of standard deivation

Definition at line 177 of file itkGoodnessOfFitComponentBase.h.

References itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::MeanType, itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::RadiusType, and itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::ResampledSampleType.

template<class TInputSample>
int itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GetHistogramNumberOfBins  )  [inline]
 

Set/Gets the nubmer of bins of histograms (expected and observed)

Definition at line 156 of file itkGoodnessOfFitComponentBase.h.

template<class TInputSample>
bool itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GetHistogramUseEquiProbableBins  )  [inline]
 

Set/Gets the flag that indicates the probability of each bins in the histograms should be equal. This can be achieved by varying the interval of bins.

Definition at line 164 of file itkGoodnessOfFitComponentBase.h.

template<class TInputSample>
const TInputSample* itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GetInputSample  )  const
 

Set/Gets the input sample

template<class TInputSample>
virtual MeanType* itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GetMean  )  [pure virtual]
 

Gets the mean of the distribution

Implemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.

template<class TInputSample>
virtual MeasurementVectorSizeType itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GetMeasurementVectorSize  )  const [virtual]
 

Get Macro to get the length of a measurement vector. This is equal to the length of each measurement vector contained in the samples that are plugged in as input to this class. GetMeasurementVectorSize() will return zero until the SetInputSample() method has been called

Referenced by itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >::GetNumberOfParameters().

template<class TInputSample>
virtual const char* itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GetNameOfClass  )  const [virtual]
 

Run-time type information (and related methods).

Reimplemented from itk::Object.

Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.

template<class TInputSample>
virtual unsigned int itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GetNumberOfParameters  )  const [pure virtual]
 

Gets the total number of parameters for this component

Implemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.

template<class TInputSample>
HistogramType* itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GetObservedHistogram  ) 
 

Gets the observed historm

template<class TInputSample>
ParametersType* itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GetParameters void   )  [inline]
 

Set/Gets the component parameters

Definition at line 146 of file itkGoodnessOfFitComponentBase.h.

template<class TInputSample>
virtual double itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GetProbabilityDensity MeasurementVectorType measurements  )  const [pure virtual]
 

Gets the probability density of measurements. multivariate function

Implemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.

template<class TInputSample>
ProjectionAxisArrayType* itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GetProjectionAxes  )  [inline, protected]
 

Definition at line 271 of file itkGoodnessOfFitComponentBase.h.

template<class TInputSample>
virtual double itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GetProportion  )  const [inline, virtual]
 

Gets the proportion of this component among multiple components.

Definition at line 231 of file itkGoodnessOfFitComponentBase.h.

template<class TInputSample>
virtual RadiusType* itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GetRadius  )  [pure virtual]
 

Gets the radius for the neighborhood sampling

Implemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.

template<class TInputSample>
ResampledSampleType* itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GetResampledSample  )  [inline]
 

Gets the sampled data set

Definition at line 200 of file itkGoodnessOfFitComponentBase.h.

template<class TInputSample>
virtual unsigned int itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GetResampledSampleSize  )  [virtual]
 

Gest the size of the sampled data set

template<class TInputSample>
virtual RadiusType* itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GetStandardDeviation  )  [pure virtual]
 

Gets the standard deviation of the distribution

Implemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.

template<class TInputSample>
double* itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GetTotalObservedScale  )  [inline]
 

Gets the total scale of the observed histogram

Definition at line 218 of file itkGoodnessOfFitComponentBase.h.

References itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::MeasurementVectorType.

template<class TInputSample>
virtual void itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::PrintParameters std::ostream &  os  )  const [pure virtual]
 

Prints component parameters. For debugging

Implemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.

template<class TInputSample>
virtual void itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::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::Object.

Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.

template<class TInputSample>
virtual void itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::Project int  projectionAxisIndex  )  [virtual]
 

Projects measurement vectors onto the projection axis calculated by the CalculateProjectionAxes method.

template<class TInputSample>
virtual void itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::Resample  )  [virtual]
 

Samples measurement vectors using the center and radius

template<class TInputSample>
void itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::SetHistogramBinOverlap double  overlap  ) 
 

Set/Get the overlapping effects extent.

template<class TInputSample>
void itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::SetHistogramExtent double  extent  ) 
 

Set/Gets the extent of histogram from the mean in terms of standard deivation

template<class TInputSample>
void itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::SetHistogramNumberOfBins int  numberOfBins  ) 
 

Set/Gets the nubmer of bins of histograms (expected and observed)

template<class TInputSample>
void itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::SetHistogramUseEquiProbableBins bool  flag  ) 
 

Set/Gets the flag that indicates the probability of each bins in the histograms should be equal. This can be achieved by varying the interval of bins.

template<class TInputSample>
virtual void itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::SetInputSample const TInputSample *  sample  )  [virtual]
 

Set/Gets the input sample

Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.

template<class TInputSample>
virtual void itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::SetParameters const ParametersType parameters  )  [virtual]
 

Set/Gets the component parameters

Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.

template<class TInputSample>
void itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::SetUseExpectedHistogram bool  flag  ) 
 

Sets the flag that indicates this component uses the histogram generated with expected distribution from the parameters.

template<class TInputSample>
virtual void itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::UpdateExpectedHistogram  )  [virtual]
 

Fills up the expected histogram based on the distribution parameters


The documentation for this class was generated from the following file:
Generated at Thu May 25 03:04:54 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000