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

itk::Statistics::Sample< TMeasurementVector > Class Template Reference

Sample defines common iterfaces for each subclasses. More...

#include <itkSample.h>

Inheritance diagram for itk::Statistics::Sample< TMeasurementVector >:

Inheritance graph
[legend]
Collaboration diagram for itk::Statistics::Sample< TMeasurementVector >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef Sample Self
typedef Object Superclass
typedef SmartPointer< SelfPointer
typedef TMeasurementVector MeasurementVectorType
typedef TMeasurementVector::ValueType MeasurementType
typedef float FrequencyType
typedef unsigned long InstanceIdentifier

Public Member Functions

virtual const char * GetClassName () const
 itkStaticConstMacro (MeasurementVectorSize, unsigned int, TMeasurementVector::Length)
virtual unsigned int Size () const =0
virtual MeasurementVectorType GetMeasurementVector (const InstanceIdentifier &id)=0
virtual FrequencyType GetFrequency (const InstanceIdentifier &id) const =0
virtual FrequencyType GetTotalFrequency () const =0

Protected Member Functions

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

Detailed Description

template<class TMeasurementVector>
class itk::Statistics::Sample< TMeasurementVector >

Sample defines common iterfaces for each subclasses.

A measurement vector is a vector of different types of values. For example, users might have an image with each pixel have a gray level intensity value and a gradient magnitude. In this example, user think each pixel as a measurement vector that has two types of values, intensity and gradient magnitude. In this sense, the meaning of "measurement" can be interchaneable with "measurement".

The primary purpose of Sample clases are storing such measurement vectors and providing different types of element access methods.

The "TMeasurement" template argument defines the type of each values in a measurement vector. The "VMeasurementVectorSize" template argument defines the number of elements in a measurement vector. The type of measurement vector is fixed as ITK Point. The resulting measurement vector type is Point< TMeasurement, VMeasurementVectorSize >.

There are two common ways of accessing data. First, users can use an "InstanceIdentifier", say 'id' which is sequential index of measurement vectors to access a measurement vector in a container. Second, users can access a measurement value using dimension and the index of a measurement value, say 'n' in that dimension. The 'id' and 'n' is equal in the ListSample classes. However, in Histogram class, its different. See Histogram. For algorithms using these indexes, there are methods to get the length of each dimension, GetSize() and GetSize(dimension). See each method's comment.

Users may need to know two other groups of methods to fully utilize Sample. One group of methods is about frequency of measurement vectors. In Histogram classes, you can use such methods to get/set the frequency of each measurement vector. The other group of methods is about characteristics of each subclasses of this class. If user want to create or know the characteristics of a subclass, use them. The set of characteristics tell that if the data is sorted (true for Histogram), if the each measurement vector is unique (true for Histogram), and if the container supports "meaningful" frequency interfaces. In ListSample classes, users cannot set frequency, and GetFrequency() methods return one if the element exists, else zero. So, currently ListSample's supporting frequency is set to false.

Definition at line 77 of file itkSample.h.


Member Typedef Documentation

template<class TMeasurementVector>
typedef float itk::Statistics::Sample< TMeasurementVector >::FrequencyType
 

frequency value typedef

Reimplemented in itk::Statistics::Histogram< TMeasurement, VMeasurementVectorSize, TFrequencyContainer >, itk::Statistics::ImageToListAdaptor< TImage, TMeasurementVector >, itk::Statistics::ListSample< TMeasurementVector >, itk::Statistics::ListSampleBase< TMeasurementVector >, and itk::Statistics::Histogram< THistogramMeasurement, 1 >.

Definition at line 95 of file itkSample.h.

template<class TMeasurementVector>
typedef unsigned long itk::Statistics::Sample< TMeasurementVector >::InstanceIdentifier
 

Instance Identifier typedef support this identifier will be unique sequential id for each measurement vector in a Sample subclass.

Reimplemented in itk::Statistics::Histogram< TMeasurement, VMeasurementVectorSize, TFrequencyContainer >, itk::Statistics::ImageToListAdaptor< TImage, TMeasurementVector >, itk::Statistics::ListSample< TMeasurementVector >, itk::Statistics::ListSampleBase< TMeasurementVector >, and itk::Statistics::Histogram< THistogramMeasurement, 1 >.

Definition at line 100 of file itkSample.h.

template<class TMeasurementVector>
typedef TMeasurementVector::ValueType itk::Statistics::Sample< TMeasurementVector >::MeasurementType
 

typedef for each element in a measurement vector

Reimplemented in itk::Statistics::Histogram< TMeasurement, VMeasurementVectorSize, TFrequencyContainer >, itk::Statistics::ImageToListAdaptor< TImage, TMeasurementVector >, itk::Statistics::ListSample< TMeasurementVector >, itk::Statistics::ListSampleBase< TMeasurementVector >, and itk::Statistics::Histogram< THistogramMeasurement, 1 >.

Definition at line 92 of file itkSample.h.

template<class TMeasurementVector>
typedef TMeasurementVector itk::Statistics::Sample< TMeasurementVector >::MeasurementVectorType
 

MeasurementVector typedef support

Reimplemented in itk::Statistics::Histogram< TMeasurement, VMeasurementVectorSize, TFrequencyContainer >, itk::Statistics::ImageToListAdaptor< TImage, TMeasurementVector >, itk::Statistics::ListSample< TMeasurementVector >, itk::Statistics::ListSampleBase< TMeasurementVector >, and itk::Statistics::Histogram< THistogramMeasurement, 1 >.

Definition at line 89 of file itkSample.h.

template<class TMeasurementVector>
typedef SmartPointer< Self > itk::Statistics::Sample< TMeasurementVector >::Pointer
 

Reimplemented from itk::Object.

Reimplemented in itk::Statistics::Histogram< TMeasurement, VMeasurementVectorSize, TFrequencyContainer >, itk::Statistics::ImageToListAdaptor< TImage, TMeasurementVector >, itk::Statistics::ListSample< TMeasurementVector >, and itk::Statistics::Histogram< THistogramMeasurement, 1 >.

Definition at line 83 of file itkSample.h.

template<class TMeasurementVector>
typedef Sample itk::Statistics::Sample< TMeasurementVector >::Self
 

Standard class typedefs

Reimplemented from itk::Object.

Reimplemented in itk::Statistics::Histogram< TMeasurement, VMeasurementVectorSize, TFrequencyContainer >, itk::Statistics::ImageToListAdaptor< TImage, TMeasurementVector >, itk::Statistics::ListSample< TMeasurementVector >, itk::Statistics::ListSampleBase< TMeasurementVector >, and itk::Statistics::Histogram< THistogramMeasurement, 1 >.

Definition at line 81 of file itkSample.h.

template<class TMeasurementVector>
typedef Object itk::Statistics::Sample< TMeasurementVector >::Superclass
 

Reimplemented from itk::Object.

Reimplemented in itk::Statistics::Histogram< TMeasurement, VMeasurementVectorSize, TFrequencyContainer >, itk::Statistics::ImageToListAdaptor< TImage, TMeasurementVector >, itk::Statistics::ListSample< TMeasurementVector >, itk::Statistics::ListSampleBase< TMeasurementVector >, and itk::Statistics::Histogram< THistogramMeasurement, 1 >.

Definition at line 82 of file itkSample.h.


Constructor & Destructor Documentation

template<class TMeasurementVector>
itk::Statistics::Sample< TMeasurementVector >::Sample  )  [inline, protected]
 

Definition at line 119 of file itkSample.h.

template<class TMeasurementVector>
virtual itk::Statistics::Sample< TMeasurementVector >::~Sample  )  [inline, protected, virtual]
 

Definition at line 120 of file itkSample.h.


Member Function Documentation

template<class TMeasurementVector>
virtual const char* itk::Statistics::Sample< TMeasurementVector >::GetClassName  )  const [virtual]
 

Run-time type information (and related methods)

Reimplemented from itk::Object.

Reimplemented in itk::Statistics::Histogram< TMeasurement, VMeasurementVectorSize, TFrequencyContainer >, itk::Statistics::ImageToListAdaptor< TImage, TMeasurementVector >, itk::Statistics::ListSample< TMeasurementVector >, itk::Statistics::ListSampleBase< TMeasurementVector >, and itk::Statistics::Histogram< THistogramMeasurement, 1 >.

template<class TMeasurementVector>
virtual FrequencyType itk::Statistics::Sample< TMeasurementVector >::GetFrequency const InstanceIdentifier id  )  const [pure virtual]
 

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

Implemented in itk::Statistics::Histogram< TMeasurement, VMeasurementVectorSize, TFrequencyContainer >, itk::Statistics::ImageToListAdaptor< TImage, TMeasurementVector >, itk::Statistics::ListSample< TMeasurementVector >, and itk::Statistics::Histogram< THistogramMeasurement, 1 >.

template<class TMeasurementVector>
virtual MeasurementVectorType itk::Statistics::Sample< TMeasurementVector >::GetMeasurementVector const InstanceIdentifier id  )  [pure virtual]
 

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

Implemented in itk::Statistics::Histogram< TMeasurement, VMeasurementVectorSize, TFrequencyContainer >, itk::Statistics::ImageToListAdaptor< TImage, TMeasurementVector >, itk::Statistics::ListSample< TMeasurementVector >, and itk::Statistics::Histogram< THistogramMeasurement, 1 >.

template<class TMeasurementVector>
virtual FrequencyType itk::Statistics::Sample< TMeasurementVector >::GetTotalFrequency  )  const [pure virtual]
 

returns the total frequency for the 'd' dimension

Implemented in itk::Statistics::Histogram< TMeasurement, VMeasurementVectorSize, TFrequencyContainer >, itk::Statistics::ImageToListAdaptor< TImage, TMeasurementVector >, itk::Statistics::ListSample< TMeasurementVector >, and itk::Statistics::Histogram< THistogramMeasurement, 1 >.

template<class TMeasurementVector>
itk::Statistics::Sample< TMeasurementVector >::itkStaticConstMacro MeasurementVectorSize  ,
unsigned  int,
TMeasurementVector::Length 
 

Reimplemented in itk::Statistics::ListSampleBase< TMeasurementVector >.

template<class TMeasurementVector>
void itk::Statistics::Sample< TMeasurementVector >::PrintSelf std::ostream &  os,
Indent  indent
const [inline, 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::Histogram< TMeasurement, VMeasurementVectorSize, TFrequencyContainer >, itk::Statistics::ImageToListAdaptor< TImage, TMeasurementVector >, itk::Statistics::ListSample< TMeasurementVector >, and itk::Statistics::Histogram< THistogramMeasurement, 1 >.

Definition at line 121 of file itkSample.h.

template<class TMeasurementVector>
virtual unsigned int itk::Statistics::Sample< TMeasurementVector >::Size  )  const [pure virtual]
 

Implemented in itk::Statistics::Histogram< TMeasurement, VMeasurementVectorSize, TFrequencyContainer >, itk::Statistics::ImageToListAdaptor< TImage, TMeasurementVector >, itk::Statistics::ListSample< TMeasurementVector >, and itk::Statistics::Histogram< THistogramMeasurement, 1 >.


The documentation for this class was generated from the following file:
Generated at Sat Mar 31 03:13:50 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000