ITK  4.12.0
Insight Segmentation and Registration Toolkit
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
itk::Statistics::ListSample< TMeasurementVector > Class Template Reference

#include <itkListSample.h>

+ Inheritance diagram for itk::Statistics::ListSample< TMeasurementVector >:
+ Collaboration diagram for itk::Statistics::ListSample< TMeasurementVector >:

Detailed Description

template<typename TMeasurementVector>
class itk::Statistics::ListSample< TMeasurementVector >

This class is the native implementation of the a Sample with an STL container.

ListSample stores measurements in a list type structure (as opposed to a Histogram, etc.). ListSample allows duplicate measurements. ListSample is not sorted.

ListSample does not allow the user to specify the frequency of a measurement directly. The GetFrequency() methods returns 1 if the measurement exists in the list, 0 otherwise.

See Also
Sample, Histogram
Wiki Examples:
Examples:
Examples/Statistics/BayesianPluginClassifier.cxx, Examples/Statistics/ExpectationMaximizationMixtureModelEstimator.cxx, Examples/Statistics/KdTree.cxx, Examples/Statistics/KdTreeBasedKMeansClustering.cxx, Examples/Statistics/ListSample.cxx, Examples/Statistics/MembershipSample.cxx, Examples/Statistics/MembershipSampleGenerator.cxx, Examples/Statistics/NeighborhoodSampler.cxx, Examples/Statistics/SampleSorting.cxx, Examples/Statistics/SampleStatistics.cxx, Examples/Statistics/SampleToHistogramFilter.cxx, Examples/Statistics/SelectiveSubsampleGenerator.cxx, Examples/Statistics/Subsample.cxx, Examples/Statistics/WeightedSampleStatistics.cxx, WikiExamples/Statistics/ExpectationMaximizationMixtureModelEstimator_2D.cxx, WikiExamples/Statistics/KdTree.cxx, WikiExamples/Statistics/KdTreeBasedKMeansClustering1D.cxx, WikiExamples/Statistics/KdTreeBasedKMeansClustering3D.cxx, WikiExamples/Statistics/KdTreeBasedKmeansEstimator.cxx, WikiExamples/Statistics/ListSample.cxx, WikiExamples/Statistics/MembershipSample.cxx, and WikiExamples/Statistics/SampleToHistogramFilter.cxx.

Definition at line 51 of file itkListSample.h.

Classes

class  ConstIterator
 
class  Iterator
 

Public Types

typedef
Superclass::AbsoluteFrequencyType 
AbsoluteFrequencyType
 
typedef SmartPointer< const SelfConstPointer
 
typedef
Superclass::InstanceIdentifier 
InstanceIdentifier
 
typedef std::vector
< MeasurementVectorType
InternalDataContainerType
 
typedef Superclass::MeasurementType MeasurementType
 
typedef
Superclass::MeasurementVectorSizeType 
MeasurementVectorSizeType
 
typedef
Superclass::MeasurementVectorType 
MeasurementVectorType
 
typedef SmartPointer< SelfPointer
 
typedef ListSample Self
 
typedef Sample
< TMeasurementVector > 
Superclass
 
typedef
Superclass::TotalAbsoluteFrequencyType 
TotalAbsoluteFrequencyType
 
typedef MeasurementVectorType ValueType
 
- Public Types inherited from itk::Statistics::Sample< TMeasurementVector >
typedef
MeasurementVectorTraits::AbsoluteFrequencyType 
AbsoluteFrequencyType
 
typedef SmartPointer< const SelfConstPointer
 
typedef
MeasurementVectorTraits::InstanceIdentifier 
InstanceIdentifier
 
typedef
MeasurementVectorTraitsTypes
< MeasurementVectorType >
::ValueType 
MeasurementType
 
typedef unsigned int MeasurementVectorSizeType
 
typedef TMeasurementVector MeasurementVectorType
 
typedef SmartPointer< SelfPointer
 
typedef Sample Self
 
typedef DataObject Superclass
 
typedef NumericTraits
< AbsoluteFrequencyType >
::AccumulateType 
TotalAbsoluteFrequencyType
 

Public Member Functions

Iterator Begin ()
 
ConstIterator Begin () const
 
void Clear ()
 
virtual ::itk::LightObject::Pointer CreateAnother () const
 
Iterator End ()
 
ConstIterator End () const
 
AbsoluteFrequencyType GetFrequency (InstanceIdentifier id) const override
 
const MeasurementVectorTypeGetMeasurementVector (InstanceIdentifier id) const override
 
virtual const char * GetNameOfClass () const
 
TotalAbsoluteFrequencyType GetTotalFrequency () const override
 
virtual void Graft (const DataObject *thatObject) override
 
void PushBack (const MeasurementVectorType &mv)
 
void Resize (InstanceIdentifier newsize)
 
void SetMeasurement (InstanceIdentifier id, unsigned int dim, const MeasurementType &value)
 
void SetMeasurementVector (InstanceIdentifier id, const MeasurementVectorType &mv)
 
InstanceIdentifier Size () const override
 
- Public Member Functions inherited from itk::Statistics::Sample< TMeasurementVector >
virtual MeasurementVectorSizeType GetMeasurementVectorSize () const
 
virtual void SetMeasurementVectorSize (MeasurementVectorSizeType s)
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 ListSample ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
virtual ~ListSample ()
 
- Protected Member Functions inherited from itk::Statistics::Sample< TMeasurementVector >
 Sample ()
 
virtual ~Sample ()
 

Private Attributes

InternalDataContainerType m_InternalContainer
 

Member Typedef Documentation

template<typename TMeasurementVector>
typedef Superclass::AbsoluteFrequencyType itk::Statistics::ListSample< TMeasurementVector >::AbsoluteFrequencyType

Definition at line 70 of file itkListSample.h.

template<typename TMeasurementVector>
typedef SmartPointer< const Self > itk::Statistics::ListSample< TMeasurementVector >::ConstPointer

Definition at line 58 of file itkListSample.h.

template<typename TMeasurementVector>
typedef Superclass::InstanceIdentifier itk::Statistics::ListSample< TMeasurementVector >::InstanceIdentifier

Definition at line 72 of file itkListSample.h.

template<typename TMeasurementVector>
typedef std::vector< MeasurementVectorType > itk::Statistics::ListSample< TMeasurementVector >::InternalDataContainerType

internal data container type

Definition at line 79 of file itkListSample.h.

template<typename TMeasurementVector>
typedef Superclass::MeasurementType itk::Statistics::ListSample< TMeasurementVector >::MeasurementType

Definition at line 69 of file itkListSample.h.

template<typename TMeasurementVector>
typedef Superclass::MeasurementVectorSizeType itk::Statistics::ListSample< TMeasurementVector >::MeasurementVectorSizeType

Definition at line 68 of file itkListSample.h.

template<typename TMeasurementVector>
typedef Superclass::MeasurementVectorType itk::Statistics::ListSample< TMeasurementVector >::MeasurementVectorType

Typedefs inherited from the superclass

Definition at line 64 of file itkListSample.h.

template<typename TMeasurementVector>
typedef SmartPointer< Self > itk::Statistics::ListSample< TMeasurementVector >::Pointer

Definition at line 57 of file itkListSample.h.

template<typename TMeasurementVector>
typedef ListSample itk::Statistics::ListSample< TMeasurementVector >::Self

Standard class typedef.

Definition at line 55 of file itkListSample.h.

template<typename TMeasurementVector>
typedef Sample< TMeasurementVector > itk::Statistics::ListSample< TMeasurementVector >::Superclass

Definition at line 56 of file itkListSample.h.

template<typename TMeasurementVector>
typedef Superclass::TotalAbsoluteFrequencyType itk::Statistics::ListSample< TMeasurementVector >::TotalAbsoluteFrequencyType

Definition at line 71 of file itkListSample.h.

template<typename TMeasurementVector>
typedef MeasurementVectorType itk::Statistics::ListSample< TMeasurementVector >::ValueType

Value type of a measurement (component of the measurement vector)

Definition at line 76 of file itkListSample.h.

Constructor & Destructor Documentation

template<typename TMeasurementVector>
itk::Statistics::ListSample< TMeasurementVector >::ListSample ( )
protected
template<typename TMeasurementVector>
virtual itk::Statistics::ListSample< TMeasurementVector >::~ListSample ( )
inlineprotectedvirtual

Definition at line 274 of file itkListSample.h.

Member Function Documentation

template<typename TMeasurementVector>
Iterator itk::Statistics::ListSample< TMeasurementVector >::Begin ( )
inline

returns an iterator that points to the beginning of the container

Definition at line 240 of file itkListSample.h.

Referenced by itk::Statistics::ListSample< TMeasurementVector >::ConstIterator::ConstIterator().

template<typename TMeasurementVector>
ConstIterator itk::Statistics::ListSample< TMeasurementVector >::Begin ( ) const
inline

returns an iterator that points to the beginning of the container

Definition at line 256 of file itkListSample.h.

template<typename TMeasurementVector>
void itk::Statistics::ListSample< TMeasurementVector >::Clear ( )

Removes all the elements in the Sample

template<typename TMeasurementVector>
virtual::itk::LightObject::Pointer itk::Statistics::ListSample< TMeasurementVector >::CreateAnother ( ) const
template<typename TMeasurementVector>
Iterator itk::Statistics::ListSample< TMeasurementVector >::End ( )
inline

returns an iterator that points to the end of the container

Definition at line 248 of file itkListSample.h.

template<typename TMeasurementVector>
ConstIterator itk::Statistics::ListSample< TMeasurementVector >::End ( ) const
inline

returns an iterator that points to the end of the container

Definition at line 264 of file itkListSample.h.

template<typename TMeasurementVector>
AbsoluteFrequencyType itk::Statistics::ListSample< TMeasurementVector >::GetFrequency ( InstanceIdentifier  id) const
overridevirtual

Get the frequency of a measurement. Returns 1 if the measurement exist.

Implements itk::Statistics::Sample< TMeasurementVector >.

template<typename TMeasurementVector>
const MeasurementVectorType& itk::Statistics::ListSample< TMeasurementVector >::GetMeasurementVector ( InstanceIdentifier  id) const
overridevirtual

Get the measurement associated with the specified InstanceIdentifier

Implements itk::Statistics::Sample< TMeasurementVector >.

template<typename TMeasurementVector>
virtual const char* itk::Statistics::ListSample< TMeasurementVector >::GetNameOfClass ( ) const
virtual
template<typename TMeasurementVector>
TotalAbsoluteFrequencyType itk::Statistics::ListSample< TMeasurementVector >::GetTotalFrequency ( ) const
overridevirtual

Get the total frequency of the sample. This is equivalent to the size of the sample.

Implements itk::Statistics::Sample< TMeasurementVector >.

template<typename TMeasurementVector>
virtual void itk::Statistics::ListSample< TMeasurementVector >::Graft ( const DataObject thatObject)
overridevirtual

Method to graft another sample

Reimplemented from itk::Statistics::Sample< TMeasurementVector >.

template<typename TMeasurementVector>
static Pointer itk::Statistics::ListSample< TMeasurementVector >::New ( )
static

Method for creation through the object factory.

template<typename TMeasurementVector>
void itk::Statistics::ListSample< TMeasurementVector >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotectedvirtual
template<typename TMeasurementVector>
void itk::Statistics::ListSample< TMeasurementVector >::PushBack ( const MeasurementVectorType mv)

Inserts a measurement at the end of the list

template<typename TMeasurementVector>
void itk::Statistics::ListSample< TMeasurementVector >::Resize ( InstanceIdentifier  newsize)

Resize the container. Using Resize() and then SetMeasurementVector() is about nine times faster than usign PushBack() continuously. Which means that whenever the total number of Measurement vectors is known, the users should prefer calling Resize() first and then set the values by calling SetMeasurementVector(). On the other hand, if the number of measurement vectors is not known from the beginning, then calling PushBack() sequentially is a convenient option.

template<typename TMeasurementVector>
void itk::Statistics::ListSample< TMeasurementVector >::SetMeasurement ( InstanceIdentifier  id,
unsigned int  dim,
const MeasurementType value 
)

Set a component a measurement to a particular value.

template<typename TMeasurementVector>
void itk::Statistics::ListSample< TMeasurementVector >::SetMeasurementVector ( InstanceIdentifier  id,
const MeasurementVectorType mv 
)

Replace a measurement with a different measurement

template<typename TMeasurementVector>
InstanceIdentifier itk::Statistics::ListSample< TMeasurementVector >::Size ( ) const
overridevirtual

Get the number of measurement vectors in the sample

Implements itk::Statistics::Sample< TMeasurementVector >.

Member Data Documentation

template<typename TMeasurementVector>
InternalDataContainerType itk::Statistics::ListSample< TMeasurementVector >::m_InternalContainer
private

Definition at line 278 of file itkListSample.h.


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