ITK  6.0.0
Insight Toolkit
Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
itk::Statistics::Sample< TMeasurementVector > Class Template Referenceabstract

#include <itkSample.h>

Detailed Description

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

A collection of measurements for statistical analysis.

Sample represents a set of measurements for statistical analysis. Sample is templated over a measurement vector. The measurement vector encapsulates the set of values associated with a single measurement. For instance, a measurement vector may contain an image intensity of a pixel and the gradient magnitude at that pixel.

Data within a sample can be accessed via an InstanceIdentifier. InstanceIdentifiers have different forms and meanings depending on the type of sample. For ListSamples, the InstanceIdentifier is an index into the corresponding list. In this case, the InstanceIdentifier corresponds to a particular measurement stored in the Sample. For Histograms, an InstanceIdentifier corresponds to a particular bin in the N-dimensional histogram. In other words, the InstanceIdentifier in a histogram does not correspond to a specific measurement used to build the histogram but to the "bin" in which a number of original measurements were "accumulated".

Recent API changes: The static const macro to get the length of a measurement vector, 'MeasurementVectorSize' has been removed to allow the length of a measurement vector to be specified at run time. Please use the function GetMeasurementVectorSize() instead.

Definition at line 62 of file itkSample.h.

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

Public Types

using AbsoluteFrequencyType = MeasurementVectorTraits::AbsoluteFrequencyType
 
using ConstPointer = SmartPointer< const Self >
 
using InstanceIdentifier = typename MeasurementVectorTraits::InstanceIdentifier
 
using MeasurementType = typename MeasurementVectorTraitsTypes< MeasurementVectorType >::ValueType
 
using MeasurementVectorSizeType = unsigned int
 
using MeasurementVectorType = TMeasurementVector
 
using Pointer = SmartPointer< Self >
 
using Self = Sample
 
using Superclass = DataObject
 
using TotalAbsoluteFrequencyType = NumericTraits< AbsoluteFrequencyType >::AccumulateType
 
- Public Types inherited from itk::DataObject
using ConstPointer = SmartPointer< const Self >
 
using DataObjectIdentifierType = std::string
 
using DataObjectPointerArraySizeType = std::vector< Pointer >::size_type
 
using Pointer = SmartPointer< Self >
 
using Self = DataObject
 
using Superclass = Object
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 

Public Member Functions

virtual AbsoluteFrequencyType GetFrequency (InstanceIdentifier id) const =0
 
virtual const MeasurementVectorTypeGetMeasurementVector (InstanceIdentifier id) const =0
 
virtual MeasurementVectorSizeType GetMeasurementVectorSize () const
 
const char * GetNameOfClass () const override
 
virtual TotalAbsoluteFrequencyType GetTotalFrequency () const =0
 
void Graft (const DataObject *thatObject) override
 
virtual InstanceIdentifier Size () const =0
 
virtual void SetMeasurementVectorSize (MeasurementVectorSizeType s)
 
- Public Member Functions inherited from itk::DataObject
virtual void CopyInformation (const DataObject *)
 
virtual void DataHasBeenGenerated ()
 
void DisconnectPipeline ()
 
bool GetDataReleased () const
 
const char * GetNameOfClass () const override
 
virtual const bool & GetReleaseDataFlag () const
 
SmartPointer< ProcessObjectGetSource () const
 
DataObjectPointerArraySizeType GetSourceOutputIndex () const
 
const DataObjectIdentifierTypeGetSourceOutputName () const
 
virtual ModifiedTimeType GetUpdateMTime () const
 
virtual void Graft (const DataObject *)
 
virtual void Initialize ()
 
virtual void PrepareForNewData ()
 
virtual void PropagateRequestedRegion ()
 
void ReleaseData ()
 
virtual void ReleaseDataFlagOn ()
 
virtual bool RequestedRegionIsOutsideOfTheBufferedRegion ()
 
virtual void ResetPipeline ()
 
void SetReleaseDataFlag (bool flag)
 
virtual void SetRequestedRegion (const DataObject *)
 
virtual void SetRequestedRegionToLargestPossibleRegion ()
 
bool ShouldIReleaseData () const
 
virtual void Update ()
 
virtual void UpdateOutputData ()
 
virtual void UpdateOutputInformation ()
 
void UpdateSource () const
 
virtual bool VerifyRequestedRegion ()
 
void SetPipelineMTime (ModifiedTimeType time)
 
virtual const ModifiedTimeTypeGetPipelineMTime () const
 
virtual void SetRealTimeStamp (RealTimeStamp _arg)
 
virtual const RealTimeStampGetRealTimeStamp () const
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *cmd) const
 
unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const
 
LightObject::Pointer CreateAnother () const override
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
const char * GetNameOfClass () const override
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag) const
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
Pointer Clone () const
 
virtual Pointer CreateAnother () const
 
virtual void Delete ()
 
virtual const char * GetNameOfClass () const
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 
virtual void Register () const
 
virtual void SetReferenceCount (int)
 
virtual void UnRegister () const noexcept
 

Protected Member Functions

void PrintSelf (std::ostream &os, Indent indent) const override
 
 Sample ()
 
 ~Sample () override=default
 
- Protected Member Functions inherited from itk::DataObject
 DataObject ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
virtual void PropagateResetPipeline ()
 
 ~DataObject () override
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
virtual void SetTimeStamp (const TimeStamp &timeStamp)
 
 ~Object () override
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintSelf (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Private Attributes

MeasurementVectorSizeType m_MeasurementVectorSize {}
 

Additional Inherited Members

- Static Public Member Functions inherited from itk::DataObject
static bool GetGlobalReleaseDataFlag ()
 
static void GlobalReleaseDataFlagOff ()
 
static void GlobalReleaseDataFlagOn ()
 
static Pointer New ()
 
static void SetGlobalReleaseDataFlag (bool val)
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool val)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount {}
 

Member Typedef Documentation

◆ AbsoluteFrequencyType

template<typename TMeasurementVector >
using itk::Statistics::Sample< TMeasurementVector >::AbsoluteFrequencyType = MeasurementVectorTraits::AbsoluteFrequencyType

Frequency value type

Definition at line 84 of file itkSample.h.

◆ ConstPointer

template<typename TMeasurementVector >
using itk::Statistics::Sample< TMeasurementVector >::ConstPointer = SmartPointer<const Self>

Definition at line 71 of file itkSample.h.

◆ InstanceIdentifier

template<typename TMeasurementVector >
using itk::Statistics::Sample< TMeasurementVector >::InstanceIdentifier = typename MeasurementVectorTraits::InstanceIdentifier

InstanceIdentifier type alias. This identifier is a unique sequential id for each measurement vector in a Sample subclass.

Definition at line 91 of file itkSample.h.

◆ MeasurementType

template<typename TMeasurementVector >
using itk::Statistics::Sample< TMeasurementVector >::MeasurementType = typename MeasurementVectorTraitsTypes<MeasurementVectorType>::ValueType

ValueType of a measurement (ValueType of a component of the MeasurementVector

Definition at line 81 of file itkSample.h.

◆ MeasurementVectorSizeType

template<typename TMeasurementVector >
using itk::Statistics::Sample< TMeasurementVector >::MeasurementVectorSizeType = unsigned int

Type of the length of each measurement vector

Definition at line 94 of file itkSample.h.

◆ MeasurementVectorType

template<typename TMeasurementVector >
using itk::Statistics::Sample< TMeasurementVector >::MeasurementVectorType = TMeasurementVector

MeasurementVector type alias support

Definition at line 77 of file itkSample.h.

◆ Pointer

template<typename TMeasurementVector >
using itk::Statistics::Sample< TMeasurementVector >::Pointer = SmartPointer<Self>

Definition at line 70 of file itkSample.h.

◆ Self

template<typename TMeasurementVector >
using itk::Statistics::Sample< TMeasurementVector >::Self = Sample

Standard class type aliases

Definition at line 68 of file itkSample.h.

◆ Superclass

template<typename TMeasurementVector >
using itk::Statistics::Sample< TMeasurementVector >::Superclass = DataObject

Definition at line 69 of file itkSample.h.

◆ TotalAbsoluteFrequencyType

template<typename TMeasurementVector >
using itk::Statistics::Sample< TMeasurementVector >::TotalAbsoluteFrequencyType = NumericTraits<AbsoluteFrequencyType>::AccumulateType

Total frequency type

Definition at line 87 of file itkSample.h.

Constructor & Destructor Documentation

◆ Sample()

template<typename TMeasurementVector >
itk::Statistics::Sample< TMeasurementVector >::Sample ( )
inlineprotected

◆ ~Sample()

template<typename TMeasurementVector >
itk::Statistics::Sample< TMeasurementVector >::~Sample ( )
overrideprotecteddefault

Member Function Documentation

◆ GetFrequency()

template<typename TMeasurementVector >
virtual AbsoluteFrequencyType itk::Statistics::Sample< TMeasurementVector >::GetFrequency ( InstanceIdentifier  id) const
pure virtual

◆ GetMeasurementVector()

template<typename TMeasurementVector >
virtual const MeasurementVectorType & itk::Statistics::Sample< TMeasurementVector >::GetMeasurementVector ( InstanceIdentifier  id) const
pure virtual

◆ GetMeasurementVectorSize()

template<typename TMeasurementVector >
virtual MeasurementVectorSizeType itk::Statistics::Sample< TMeasurementVector >::GetMeasurementVectorSize ( ) const
virtual

Get method for the length of the measurement vector

Reimplemented in itk::Statistics::ImageToListSampleAdaptor< TImage >.

◆ GetNameOfClass()

template<typename TMeasurementVector >
const char * itk::Statistics::Sample< TMeasurementVector >::GetNameOfClass ( ) const
overridevirtual
See also
LightObject::GetNameOfClass()

Reimplemented from itk::DataObject.

◆ GetTotalFrequency()

template<typename TMeasurementVector >
virtual TotalAbsoluteFrequencyType itk::Statistics::Sample< TMeasurementVector >::GetTotalFrequency ( ) const
pure virtual

◆ Graft()

template<typename TMeasurementVector >
void itk::Statistics::Sample< TMeasurementVector >::Graft ( const DataObject thatObject)
inlineoverridevirtual

Method to graft another sample

Reimplemented from itk::DataObject.

Definition at line 162 of file itkSample.h.

References itk::DataObject::Graft(), and itk::Statistics::Sample< TMeasurementVector >::SetMeasurementVectorSize().

◆ PrintSelf()

template<typename TMeasurementVector >
void itk::Statistics::Sample< TMeasurementVector >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
inlineoverrideprotectedvirtual

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::DataObject.

Definition at line 179 of file itkSample.h.

References itk::Statistics::Sample< TMeasurementVector >::m_MeasurementVectorSize, and itk::DataObject::PrintSelf().

◆ SetMeasurementVectorSize()

template<typename TMeasurementVector >
virtual void itk::Statistics::Sample< TMeasurementVector >::SetMeasurementVectorSize ( MeasurementVectorSizeType  s)
inlinevirtual

◆ Size()

template<typename TMeasurementVector >
virtual InstanceIdentifier itk::Statistics::Sample< TMeasurementVector >::Size ( ) const
pure virtual

Member Data Documentation

◆ m_MeasurementVectorSize

template<typename TMeasurementVector >
MeasurementVectorSizeType itk::Statistics::Sample< TMeasurementVector >::m_MeasurementVectorSize {}
private

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