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

itk::Statistics::SparseFrequencyContainer Class Reference

his class is a container for an histogram. More...

#include <itkSparseFrequencyContainer.h>

Inheritance diagram for itk::Statistics::SparseFrequencyContainer:

Inheritance graph
[legend]
Collaboration diagram for itk::Statistics::SparseFrequencyContainer:

Collaboration graph
[legend]
List of all members.

[NOHEADER]

virtual const char * GetNameOfClass () const
Pointer New ()

Public Types

typedef SparseFrequencyContainer Self
typedef Object Superclass
typedef SmartPointer< SelfPointer
typedef SmartPointer< const
Self
ConstPointer
typedef unsigned long InstanceIdentifier
typedef float FrequencyType
typedef NumericTraits< FrequencyType
>::AccumulateType 
TotalFrequencyType
typedef std::map< InstanceIdentifier,
FrequencyType
FrequencyContainerType
typedef FrequencyContainerType::const_iterator FrequencyContainerConstIterator

Public Member Functions

void Initialize (unsigned long length)
void SetToZero ()
bool SetFrequency (const InstanceIdentifier id, const FrequencyType value)
bool IncreaseFrequency (const InstanceIdentifier id, const FrequencyType value)
FrequencyType GetFrequency (const InstanceIdentifier id) const
TotalFrequencyType GetTotalFrequency ()

Protected Member Functions

 SparseFrequencyContainer ()
virtual ~SparseFrequencyContainer ()
void PrintSelf (std::ostream &os, Indent indent) const

Detailed Description

his class is a container for an histogram.

This class uses an map to store histogram. If your histogram is dense use DenseHistogram. You should access each bin by (InstanceIdentifier)index or measurement vector.

Definition at line 36 of file itkSparseFrequencyContainer.h.


Member Typedef Documentation

typedef SmartPointer<const Self> itk::Statistics::SparseFrequencyContainer::ConstPointer
 

Reimplemented from itk::Object.

Definition at line 43 of file itkSparseFrequencyContainer.h.

typedef FrequencyContainerType::const_iterator itk::Statistics::SparseFrequencyContainer::FrequencyContainerConstIterator
 

Definition at line 62 of file itkSparseFrequencyContainer.h.

typedef std::map< InstanceIdentifier, FrequencyType > itk::Statistics::SparseFrequencyContainer::FrequencyContainerType
 

Histogram typedef support

Definition at line 60 of file itkSparseFrequencyContainer.h.

Referenced by ~SparseFrequencyContainer().

typedef float itk::Statistics::SparseFrequencyContainer::FrequencyType
 

frequency type alias

Definition at line 54 of file itkSparseFrequencyContainer.h.

typedef unsigned long itk::Statistics::SparseFrequencyContainer::InstanceIdentifier
 

instance idenfitifer alias

Definition at line 51 of file itkSparseFrequencyContainer.h.

typedef SmartPointer<Self> itk::Statistics::SparseFrequencyContainer::Pointer
 

Reimplemented from itk::Object.

Definition at line 42 of file itkSparseFrequencyContainer.h.

typedef SparseFrequencyContainer itk::Statistics::SparseFrequencyContainer::Self
 

Standard class typedefs.

Reimplemented from itk::Object.

Definition at line 40 of file itkSparseFrequencyContainer.h.

Referenced by ~SparseFrequencyContainer().

typedef Object itk::Statistics::SparseFrequencyContainer::Superclass
 

Reimplemented from itk::Object.

Definition at line 41 of file itkSparseFrequencyContainer.h.

typedef NumericTraits<FrequencyType>::AccumulateType itk::Statistics::SparseFrequencyContainer::TotalFrequencyType
 

Total frequency type

Definition at line 57 of file itkSparseFrequencyContainer.h.

Referenced by ~SparseFrequencyContainer().


Constructor & Destructor Documentation

itk::Statistics::SparseFrequencyContainer::SparseFrequencyContainer  )  [protected]
 

virtual itk::Statistics::SparseFrequencyContainer::~SparseFrequencyContainer  )  [inline, protected, virtual]
 

Definition at line 89 of file itkSparseFrequencyContainer.h.

References FrequencyContainerType, Self, and TotalFrequencyType.


Member Function Documentation

FrequencyType itk::Statistics::SparseFrequencyContainer::GetFrequency const InstanceIdentifier  id  )  const
 

Method to get the frequency of a bin from the histogram. It will return zero when the Id is out of bounds.

virtual const char* itk::Statistics::SparseFrequencyContainer::GetNameOfClass  )  const [virtual]
 

Standard macros

Reimplemented from itk::Object.

TotalFrequencyType itk::Statistics::SparseFrequencyContainer::GetTotalFrequency  )  [inline]
 

Definition at line 84 of file itkSparseFrequencyContainer.h.

bool itk::Statistics::SparseFrequencyContainer::IncreaseFrequency const InstanceIdentifier  id,
const FrequencyType  value
 

Method to increase the frequency by one. This function is convinent to create a histogram. It returns false when the id is out of bounds.

void itk::Statistics::SparseFrequencyContainer::Initialize unsigned long  length  ) 
 

prepares the frequency container

Pointer itk::Statistics::SparseFrequencyContainer::New  )  [static]
 

Standard macros

Reimplemented from itk::Object.

void itk::Statistics::SparseFrequencyContainer::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.

bool itk::Statistics::SparseFrequencyContainer::SetFrequency const InstanceIdentifier  id,
const FrequencyType  value
 

Method to set the frequency of histogram using instance identifier. It returns false when the Id is out of bounds

void itk::Statistics::SparseFrequencyContainer::SetToZero  ) 
 

Calls the SetToZero method of superclass to initialize all the bins to Zero. This should be done before starting to call the IncreaseFrequency method.


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