ITK  6.0.0
Insight Toolkit
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
itk::Statistics::Subsample< TSample > Class Template Reference

#include <itkSubsample.h>

Detailed Description

template<typename TSample>
class itk::Statistics::Subsample< TSample >

This class stores a subset of instance identifiers from another sample object. You can create a subsample out of another sample object or another subsample object. The class is useful when storing or extracting a portion of a sample object. Note that when the elements of a subsample are sorted, the instance identifiers of the subsample are sorted without changing the original source sample. Most Statistics algorithms (that derive from StatisticsAlgorithmBase accept Subsample objects as inputs).

Definition at line 42 of file itkSubsample.h.

+ Inheritance diagram for itk::Statistics::Subsample< TSample >:
+ Collaboration diagram for itk::Statistics::Subsample< TSample >:

Classes

class  ConstIterator
 
class  Iterator
 

Public Types

using AbsoluteFrequencyType = typename TSample::AbsoluteFrequencyType
 
using ConstPointer = SmartPointer< const Self >
 
using InstanceIdentifier = typename TSample::InstanceIdentifier
 
using InstanceIdentifierHolder = std::vector< InstanceIdentifier >
 
using MeasurementType = typename TSample::MeasurementType
 
using MeasurementVectorType = typename TSample::MeasurementVectorType
 
using Pointer = SmartPointer< Self >
 
using SamplePointer = typename TSample::Pointer
 
using Self = Subsample
 
using Superclass = TSample
 
using TotalAbsoluteFrequencyType = typename TSample::TotalAbsoluteFrequencyType
 
using ValueType = MeasurementVectorType
 

Public Member Functions

void AddInstance (InstanceIdentifier id)
 
Iterator Begin ()
 
ConstIterator Begin () const
 
void Clear ()
 
Iterator End ()
 
ConstIterator End () const
 
AbsoluteFrequencyType GetFrequency (InstanceIdentifier id) const override
 
AbsoluteFrequencyType GetFrequencyByIndex (unsigned int index) const
 
const InstanceIdentifierHolderGetIdHolder () const
 
InstanceIdentifier GetInstanceIdentifier (unsigned int index)
 
const MeasurementVectorTypeGetMeasurementVector (InstanceIdentifier id) const override
 
const MeasurementVectorTypeGetMeasurementVectorByIndex (unsigned int index) const
 
const char * GetNameOfClass () const override
 
const TSample * GetSample () const
 
TotalAbsoluteFrequencyType GetTotalFrequency () const override
 
void Graft (const DataObject *thatObject) override
 
void InitializeWithAllInstances ()
 
void SetSample (const TSample *sample)
 
InstanceIdentifier Size () const override
 
void Swap (unsigned int index1, unsigned int index2)
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

void PrintSelf (std::ostream &os, Indent indent) const override
 
 Subsample ()
 
 ~Subsample () override=default
 

Private Attributes

unsigned int m_ActiveDimension {}
 
InstanceIdentifierHolder m_IdHolder {}
 
const TSample * m_Sample {}
 
TotalAbsoluteFrequencyType m_TotalFrequency {}
 

Member Typedef Documentation

◆ AbsoluteFrequencyType

template<typename TSample >
using itk::Statistics::Subsample< TSample >::AbsoluteFrequencyType = typename TSample::AbsoluteFrequencyType

Definition at line 69 of file itkSubsample.h.

◆ ConstPointer

template<typename TSample >
using itk::Statistics::Subsample< TSample >::ConstPointer = SmartPointer<const Self>

Definition at line 51 of file itkSubsample.h.

◆ InstanceIdentifier

template<typename TSample >
using itk::Statistics::Subsample< TSample >::InstanceIdentifier = typename TSample::InstanceIdentifier

Definition at line 66 of file itkSubsample.h.

◆ InstanceIdentifierHolder

template<typename TSample >
using itk::Statistics::Subsample< TSample >::InstanceIdentifierHolder = std::vector<InstanceIdentifier>

Type of the storage for instances that belong to the class represented by a Subsample object. A Subsample object stores only the InstanceIdentifiers. The actual data is still in the Sample object

Definition at line 76 of file itkSubsample.h.

◆ MeasurementType

template<typename TSample >
using itk::Statistics::Subsample< TSample >::MeasurementType = typename TSample::MeasurementType

Definition at line 65 of file itkSubsample.h.

◆ MeasurementVectorType

template<typename TSample >
using itk::Statistics::Subsample< TSample >::MeasurementVectorType = typename TSample::MeasurementVectorType

Typedefs for Measurement vector, measurement, Instance Identifier, frequency, size, size element value from the template argument TSample

Definition at line 64 of file itkSubsample.h.

◆ Pointer

template<typename TSample >
using itk::Statistics::Subsample< TSample >::Pointer = SmartPointer<Self>

Definition at line 50 of file itkSubsample.h.

◆ SamplePointer

template<typename TSample >
using itk::Statistics::Subsample< TSample >::SamplePointer = typename TSample::Pointer

Smart pointer to the actual sample data holder

Definition at line 60 of file itkSubsample.h.

◆ Self

template<typename TSample >
using itk::Statistics::Subsample< TSample >::Self = Subsample

Standard class type aliases

Definition at line 48 of file itkSubsample.h.

◆ Superclass

template<typename TSample >
using itk::Statistics::Subsample< TSample >::Superclass = TSample

Definition at line 49 of file itkSubsample.h.

◆ TotalAbsoluteFrequencyType

template<typename TSample >
using itk::Statistics::Subsample< TSample >::TotalAbsoluteFrequencyType = typename TSample::TotalAbsoluteFrequencyType

Definition at line 70 of file itkSubsample.h.

◆ ValueType

template<typename TSample >
using itk::Statistics::Subsample< TSample >::ValueType = MeasurementVectorType

Definition at line 67 of file itkSubsample.h.

Constructor & Destructor Documentation

◆ Subsample()

template<typename TSample >
itk::Statistics::Subsample< TSample >::Subsample ( )
protected

◆ ~Subsample()

template<typename TSample >
itk::Statistics::Subsample< TSample >::~Subsample ( )
overrideprotecteddefault

Member Function Documentation

◆ AddInstance()

template<typename TSample >
void itk::Statistics::Subsample< TSample >::AddInstance ( InstanceIdentifier  id)

Add instance to the subsample

◆ Begin() [1/2]

template<typename TSample >
Iterator itk::Statistics::Subsample< TSample >::Begin ( )
inline

This method returns an iterator to the beginning of the measurement vectors

Definition at line 256 of file itkSubsample.h.

Referenced by itk::Statistics::Subsample< TSample >::ConstIterator::ConstIterator().

◆ Begin() [2/2]

template<typename TSample >
ConstIterator itk::Statistics::Subsample< TSample >::Begin ( ) const
inline

Definition at line 274 of file itkSubsample.h.

◆ Clear()

template<typename TSample >
void itk::Statistics::Subsample< TSample >::Clear ( )

Clear the subsample

◆ End() [1/2]

template<typename TSample >
Iterator itk::Statistics::Subsample< TSample >::End ( )
inline

This method returns an iterator to the beginning of the measurement vectors

Definition at line 266 of file itkSubsample.h.

◆ End() [2/2]

template<typename TSample >
ConstIterator itk::Statistics::Subsample< TSample >::End ( ) const
inline

Definition at line 282 of file itkSubsample.h.

◆ GetFrequency()

template<typename TSample >
AbsoluteFrequencyType itk::Statistics::Subsample< TSample >::GetFrequency ( InstanceIdentifier  id) const
override

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

◆ GetFrequencyByIndex()

template<typename TSample >
AbsoluteFrequencyType itk::Statistics::Subsample< TSample >::GetFrequencyByIndex ( unsigned int  index) const

◆ GetIdHolder()

template<typename TSample >
const InstanceIdentifierHolder & itk::Statistics::Subsample< TSample >::GetIdHolder ( ) const
inline

Get the Id Holder

Definition at line 80 of file itkSubsample.h.

◆ GetInstanceIdentifier()

template<typename TSample >
InstanceIdentifier itk::Statistics::Subsample< TSample >::GetInstanceIdentifier ( unsigned int  index)

◆ GetMeasurementVector()

template<typename TSample >
const MeasurementVectorType & itk::Statistics::Subsample< TSample >::GetMeasurementVector ( InstanceIdentifier  id) const
override

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

◆ GetMeasurementVectorByIndex()

template<typename TSample >
const MeasurementVectorType & itk::Statistics::Subsample< TSample >::GetMeasurementVectorByIndex ( unsigned int  index) const

◆ GetNameOfClass()

template<typename TSample >
const char * itk::Statistics::Subsample< TSample >::GetNameOfClass ( ) const
override

◆ GetSample()

template<typename TSample >
const TSample * itk::Statistics::Subsample< TSample >::GetSample ( ) const

◆ GetTotalFrequency()

template<typename TSample >
TotalAbsoluteFrequencyType itk::Statistics::Subsample< TSample >::GetTotalFrequency ( ) const
override

returns the total frequency for the 'd' dimension

◆ Graft()

template<typename TSample >
void itk::Statistics::Subsample< TSample >::Graft ( const DataObject thatObject)
override

Method to graft another sample

◆ InitializeWithAllInstances()

template<typename TSample >
void itk::Statistics::Subsample< TSample >::InitializeWithAllInstances ( )

Initialize the subsample with all instances of the sample

◆ New()

template<typename TSample >
static Pointer itk::Statistics::Subsample< TSample >::New ( )
static

standard New() method support

◆ PrintSelf()

template<typename TSample >
void itk::Statistics::Subsample< TSample >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotected

◆ SetSample()

template<typename TSample >
void itk::Statistics::Subsample< TSample >::SetSample ( const TSample *  sample)

Plug in the actual sample data

◆ Size()

template<typename TSample >
InstanceIdentifier itk::Statistics::Subsample< TSample >::Size ( ) const
override

returns SizeType object whose each element is the number of elements in each dimension

◆ Swap()

template<typename TSample >
void itk::Statistics::Subsample< TSample >::Swap ( unsigned int  index1,
unsigned int  index2 
)

Member Data Documentation

◆ m_ActiveDimension

template<typename TSample >
unsigned int itk::Statistics::Subsample< TSample >::m_ActiveDimension {}
private

Definition at line 298 of file itkSubsample.h.

◆ m_IdHolder

template<typename TSample >
InstanceIdentifierHolder itk::Statistics::Subsample< TSample >::m_IdHolder {}
private

Definition at line 297 of file itkSubsample.h.

◆ m_Sample

template<typename TSample >
const TSample* itk::Statistics::Subsample< TSample >::m_Sample {}
private

Definition at line 296 of file itkSubsample.h.

◆ m_TotalFrequency

template<typename TSample >
TotalAbsoluteFrequencyType itk::Statistics::Subsample< TSample >::m_TotalFrequency {}
private

Definition at line 299 of file itkSubsample.h.


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