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

itk::Statistics::MembershipSample< TSample > Class Template Reference

Container for storing the instance-identifiers of other sample with their associated class labels. More...

#include <itkMembershipSample.h>

Collaboration diagram for itk::Statistics::MembershipSample< TSample >:

Collaboration graph
[legend]
List of all members.

[NOHEADER]

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

Public Types

typedef MembershipSample Self
typedef Sample< typename TSample::MeasurementVectorType > Superclass
typedef SmartPointer< SelfPointer
typedef SmartPointer< const
Self
ConstPointer
typedef TSample::MeasurementVectorType MeasurementVectorType
typedef TSample::MeasurementType MeasurementType
typedef TSample::InstanceIdentifier InstanceIdentifier
typedef TSample::FrequencyType FrequencyType
typedef std::vector< unsigned
int > 
UniqueClassLabelsType
typedef itk::hash_map< InstanceIdentifier,
unsigned int > 
ClassLabelHolderType
typedef Subsample< TSample > ClassSampleType
typedef ClassSampleType::Pointer ClassSamplePointer
typedef ClassSampleType::ConstPointer ClassSampleConstPointer

Public Member Functions

 itkStaticConstMacro (MeasurementVectorSize, unsigned int, TSample::MeasurementVectorSize)
void SetSample (const TSample *sample)
const TSample * GetSample () const
void SetNumberOfClasses (unsigned int numberOfClasses)
unsigned int GetNumberOfClasses () const
void AddInstance (const unsigned int &classLabel, const InstanceIdentifier &id)
unsigned int GetClassLabel (const InstanceIdentifier &id) const
int GetInternalClassLabel (const unsigned int classLabel) const
unsigned int GetClassSampleSize (const unsigned int &classLabel) const
const ClassSampleTypeGetClassSample (const unsigned int &classLabel) const
ClassLabelHolderTypeGetClassLabels ()
unsigned int Size (void) const
const MeasurementVectorTypeGetMeasurementVector (const InstanceIdentifier &id) const
MeasurementType GetMeasurement (const InstanceIdentifier &id, const unsigned int &dimension)
FrequencyType GetFrequency (const InstanceIdentifier &id) const
FrequencyType GetTotalFrequency () const
void Resize (unsigned int n)
ConstIterator Begin () const
ConstIterator End () const

Protected Member Functions

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

Detailed Description

template<class TSample>
class itk::Statistics::MembershipSample< TSample >

Container for storing the instance-identifiers of other sample with their associated class labels.

This class does not store any measurement data. In a sense, you can think it as an additional information to basic samples (such as Histogram, PointSetListSampleAdaptor, and ImageToListAdaptor). The additional information is a class label for a measurement vector. Obviously without such basic types of sample, this one is meaningless. You can call any basic methods that has been defined in the Sample class such as GetMeasurementVector and GetFrequency. You can query the class label for an instance using an instance-identifier. Another new and important method is the GetClassSample method. With a given class label, it returns a pointer to the Subsample object that has all the instance-identifiers of instances that belong to the class.

This class is templated over the type of the basic sample. To use all the method, you should first plug in a basic type sample using the SetSample method

Definition at line 51 of file itkMembershipSample.h.


Member Typedef Documentation

template<class TSample>
typedef itk::hash_map< InstanceIdentifier, unsigned int> itk::Statistics::MembershipSample< TSample >::ClassLabelHolderType
 

Typedef for the storage that holds a class label for each instance. The relationship between instances and class label is one-to-one Definition at line 85 of file itkMembershipSample.h.

Referenced by itk::Statistics::MembershipSample< TSample >::~MembershipSample().

template<class TSample>
typedef ClassSampleType::ConstPointer itk::Statistics::MembershipSample< TSample >::ClassSampleConstPointer
 

Definition at line 91 of file itkMembershipSample.h.

template<class TSample>
typedef ClassSampleType::Pointer itk::Statistics::MembershipSample< TSample >::ClassSamplePointer
 

Definition at line 90 of file itkMembershipSample.h.

template<class TSample>
typedef Subsample< TSample > itk::Statistics::MembershipSample< TSample >::ClassSampleType
 

Typedef for each subsample that stores instance identifers of instances that belong to a class Definition at line 89 of file itkMembershipSample.h.

template<class TSample>
typedef SmartPointer< const Self > itk::Statistics::MembershipSample< TSample >::ConstPointer
 

Definition at line 59 of file itkMembershipSample.h.

template<class TSample>
typedef TSample::FrequencyType itk::Statistics::MembershipSample< TSample >::FrequencyType
 

Definition at line 71 of file itkMembershipSample.h.

Referenced by itk::Statistics::MembershipSample< TSample >::GetClassLabels().

template<class TSample>
typedef TSample::InstanceIdentifier itk::Statistics::MembershipSample< TSample >::InstanceIdentifier
 

Definition at line 70 of file itkMembershipSample.h.

Referenced by itk::Statistics::MembershipSample< TSample >::GetClassLabels(), and itk::Statistics::MembershipSample< TSample >::ConstIterator::GetMeasurementVector().

template<class TSample>
typedef TSample::MeasurementType itk::Statistics::MembershipSample< TSample >::MeasurementType
 

Definition at line 69 of file itkMembershipSample.h.

Referenced by itk::Statistics::MembershipSample< TSample >::GetClassLabels().

template<class TSample>
typedef TSample::MeasurementVectorType itk::Statistics::MembershipSample< TSample >::MeasurementVectorType
 

Typedefs for Measurement vector, measurement, Instance Identifier, frequency, size, size element value from the template argument TSample Definition at line 68 of file itkMembershipSample.h.

Referenced by itk::Statistics::MembershipSample< TSample >::GetClassLabels(), and itk::Statistics::MembershipSample< TSample >::ConstIterator::GetFrequency().

template<class TSample>
typedef SmartPointer< Self > itk::Statistics::MembershipSample< TSample >::Pointer
 

Definition at line 58 of file itkMembershipSample.h.

template<class TSample>
typedef MembershipSample itk::Statistics::MembershipSample< TSample >::Self
 

Standard class typedefs. Definition at line 56 of file itkMembershipSample.h.

Referenced by itk::Statistics::MembershipSample< TSample >::~MembershipSample().

template<class TSample>
typedef Sample< typename TSample::MeasurementVectorType > itk::Statistics::MembershipSample< TSample >::Superclass
 

Definition at line 57 of file itkMembershipSample.h.

template<class TSample>
typedef std::vector< unsigned int > itk::Statistics::MembershipSample< TSample >::UniqueClassLabelsType
 

vector of unique class labels that will be used for mapping internal continuous class label with real class labels Definition at line 81 of file itkMembershipSample.h.

Referenced by itk::Statistics::MembershipSample< TSample >::~MembershipSample().


Constructor & Destructor Documentation

template<class TSample>
itk::Statistics::MembershipSample< TSample >::MembershipSample  )  [protected]
 

template<class TSample>
virtual itk::Statistics::MembershipSample< TSample >::~MembershipSample  )  [inline, protected, virtual]
 

Definition at line 250 of file itkMembershipSample.h.

References itk::Statistics::MembershipSample< TSample >::ClassLabelHolderType, itk::Statistics::MembershipSample< TSample >::Self, and itk::Statistics::MembershipSample< TSample >::UniqueClassLabelsType.


Member Function Documentation

template<class TSample>
void itk::Statistics::MembershipSample< TSample >::AddInstance const unsigned int &  classLabel,
const InstanceIdentifier id
 

Adds an instance from the source sample to this container. The first argument is the class label for that instance. The second argument is the instance identifier from the source identifier that is going to be included this container.

template<class TSample>
ConstIterator itk::Statistics::MembershipSample< TSample >::Begin void   )  const [inline]
 

Definition at line 236 of file itkMembershipSample.h.

template<class TSample>
ConstIterator itk::Statistics::MembershipSample< TSample >::End void   )  const [inline]
 

Definition at line 242 of file itkMembershipSample.h.

template<class TSample>
unsigned int itk::Statistics::MembershipSample< TSample >::GetClassLabel const InstanceIdentifier id  )  const
 

Gets the class label for the instance that has the instance identifier, id.

template<class TSample>
ClassLabelHolderType* itk::Statistics::MembershipSample< TSample >::GetClassLabels  )  [inline]
 

Gets the class labels that corresponding to the each instance in this container. Definition at line 129 of file itkMembershipSample.h.

References itk::Statistics::MembershipSample< TSample >::FrequencyType, itk::Statistics::MembershipSample< TSample >::InstanceIdentifier, itk::Statistics::MembershipSample< TSample >::MeasurementType, and itk::Statistics::MembershipSample< TSample >::MeasurementVectorType.

template<class TSample>
virtual const char* itk::Statistics::MembershipSample< TSample >::GetClassName  )  const [virtual]
 

Standard macros

template<class TSample>
const ClassSampleType* itk::Statistics::MembershipSample< TSample >::GetClassSample const unsigned int &  classLabel  )  const
 

Gets the Subsample that includes only the instances that belongs to the classLabel

template<class TSample>
unsigned int itk::Statistics::MembershipSample< TSample >::GetClassSampleSize const unsigned int &  classLabel  )  const
 

Gets the number of instances that belong to the class label in this container

template<class TSample>
FrequencyType itk::Statistics::MembershipSample< TSample >::GetFrequency const InstanceIdentifier id  )  const
 

returns the frequency of the instance which is identified by the 'id'

template<class TSample>
int itk::Statistics::MembershipSample< TSample >::GetInternalClassLabel const unsigned int  classLabel  )  const
 

Gets the internal continuous class label from the class labels that are used for AddInstance method.

template<class TSample>
MeasurementType itk::Statistics::MembershipSample< TSample >::GetMeasurement const InstanceIdentifier id,
const unsigned int &  dimension
 

returns the measurement element which is the 'n'-th element in the 'd' dimension of the measurement vector

template<class TSample>
const MeasurementVectorType& itk::Statistics::MembershipSample< TSample >::GetMeasurementVector const InstanceIdentifier id  )  const
 

retunrs the measurement of the instance which is identified by the 'id'

template<class TSample>
unsigned int itk::Statistics::MembershipSample< TSample >::GetNumberOfClasses  )  const
 

Gets the number of classes (class labels)

template<class TSample>
const TSample* itk::Statistics::MembershipSample< TSample >::GetSample  )  const
 

Returns the source sample pointer

template<class TSample>
FrequencyType itk::Statistics::MembershipSample< TSample >::GetTotalFrequency  )  const
 

returns the total frequency for the 'd' dimension

template<class TSample>
itk::Statistics::MembershipSample< TSample >::itkStaticConstMacro MeasurementVectorSize  ,
unsigned  int,
TSample::MeasurementVectorSize 
 

MeasurementVectorSize enum from super class

template<class TSample>
Pointer itk::Statistics::MembershipSample< TSample >::New  )  [static]
 

Standard macros

template<class TSample>
void itk::Statistics::MembershipSample< TSample >::PrintSelf std::ostream &  os,
Indent  indent
const [protected]
 

template<class TSample>
void itk::Statistics::MembershipSample< TSample >::Resize unsigned int  n  )  [inline]
 

Definition at line 150 of file itkMembershipSample.h.

template<class TSample>
void itk::Statistics::MembershipSample< TSample >::SetNumberOfClasses unsigned int  numberOfClasses  ) 
 

Sets the number of classes (class labels)

template<class TSample>
void itk::Statistics::MembershipSample< TSample >::SetSample const TSample *  sample  ) 
 

Plug in the actual sample data

template<class TSample>
unsigned int itk::Statistics::MembershipSample< TSample >::Size void   )  const
 

returns the number of elements in each dimension


The documentation for this class was generated from the following file:
Generated at Sun Apr 1 03:24:30 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000