ITK  5.2.0
Insight 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 >:

Classes

class  ConstIterator
 
class  Iterator
 

Public Types

using AbsoluteFrequencyType = typename Superclass::AbsoluteFrequencyType
 
using ConstPointer = SmartPointer< const Self >
 
using InstanceIdentifier = typename Superclass::InstanceIdentifier
 
using InternalDataContainerType = std::vector< MeasurementVectorType >
 
using MeasurementType = typename Superclass::MeasurementType
 
using MeasurementVectorSizeType = typename Superclass::MeasurementVectorSizeType
 
using MeasurementVectorType = typename Superclass::MeasurementVectorType
 
using Pointer = SmartPointer< Self >
 
using Self = ListSample
 
using Superclass = Sample< TMeasurementVector >
 
using TotalAbsoluteFrequencyType = typename Superclass::TotalAbsoluteFrequencyType
 
using ValueType = MeasurementVectorType
 
- Public Types inherited from itk::Statistics::Sample< TMeasurementVector >
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

Iterator Begin ()
 
ConstIterator Begin () const
 
void Clear ()
 
virtual ::itk::LightObject::Pointer CreateAnother () const
 
Iterator End ()
 
ConstIterator End () const
 
AbsoluteFrequencyType GetFrequency (InstanceIdentifier instanceId) const override
 
const MeasurementVectorTypeGetMeasurementVector (InstanceIdentifier instanceId) const override
 
virtual const char * GetNameOfClass () const
 
TotalAbsoluteFrequencyType GetTotalFrequency () const override
 
void Graft (const DataObject *thatObject) override
 
void PushBack (const MeasurementVectorType &mv)
 
void Resize (InstanceIdentifier newsize)
 
void SetMeasurement (InstanceIdentifier instanceId, unsigned int dim, const MeasurementType &value)
 
void SetMeasurementVector (InstanceIdentifier instanceId, const MeasurementVectorType &mv)
 
InstanceIdentifier Size () const override
 
- Public Member Functions inherited from itk::Statistics::Sample< TMeasurementVector >
virtual AbsoluteFrequencyType GetFrequency (InstanceIdentifier id) const =0
 
virtual const MeasurementVectorTypeGetMeasurementVector (InstanceIdentifier id) const =0
 
virtual MeasurementVectorSizeType GetMeasurementVectorSize () const
 
void Graft (const DataObject *thatObject) override
 
virtual void SetMeasurementVectorSize (MeasurementVectorSizeType s)
 
- Public Member Functions inherited from itk::DataObject
void DisconnectPipeline ()
 
bool GetDataReleased () const
 
virtual const bool & GetReleaseDataFlag () const
 
SmartPointer< ProcessObjectGetSource () const
 
DataObjectPointerArraySizeType GetSourceOutputIndex () const
 
const DataObjectIdentifierTypeGetSourceOutputName () const
 
virtual void Initialize ()
 
virtual void PropagateRequestedRegion ()
 
void ReleaseData ()
 
virtual void ReleaseDataFlagOff ()
 
virtual void ReleaseDataFlagOn ()
 
virtual void ResetPipeline ()
 
void SetReleaseDataFlag (bool flag)
 
bool ShouldIReleaseData () const
 
virtual void Update ()
 
virtual void UpdateOutputData ()
 
virtual void UpdateOutputInformation ()
 
void SetPipelineMTime (ModifiedTimeType time)
 
virtual const ModifiedTimeTypeGetPipelineMTime () const
 
virtual ModifiedTimeType GetUpdateMTime () const
 
virtual void SetRealTimeStamp (RealTimeStamp _arg)
 
virtual const RealTimeStampGetRealTimeStamp () const
 
virtual void PrepareForNewData ()
 
virtual void DataHasBeenGenerated ()
 
virtual void SetRequestedRegionToLargestPossibleRegion ()
 
virtual bool RequestedRegionIsOutsideOfTheBufferedRegion ()
 
virtual bool VerifyRequestedRegion ()
 
virtual void CopyInformation (const DataObject *)
 
virtual void SetRequestedRegion (const DataObject *)
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
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)
 
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 void Delete ()
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static Pointer New ()
 
- 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 Member Functions

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

Private Attributes

InternalDataContainerType m_InternalContainer
 

Additional Inherited Members

- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

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
ITK Sphinx 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, SphinxExamples/src/Numerics/Statistics/2DGaussianMixtureModelExpectMax/Code.cxx, SphinxExamples/src/Numerics/Statistics/CreateHistogramFromListOfMeasurements/Code.cxx, SphinxExamples/src/Numerics/Statistics/CreateListOfSampleMeasurements/Code.cxx, SphinxExamples/src/Numerics/Statistics/CreateListOfSamplesWithIDs/Code.cxx, SphinxExamples/src/Numerics/Statistics/DistributeSamplingUsingGMM/Code.cxx, SphinxExamples/src/Numerics/Statistics/SpatialSearch/Code.cxx, and SphinxExamples/src/Segmentation/Classifiers/KMeansClusterOfPixelsInImage/Code.cxx.

Definition at line 51 of file itkListSample.h.

Member Typedef Documentation

◆ AbsoluteFrequencyType

template<typename TMeasurementVector>
using itk::Statistics::ListSample< TMeasurementVector >::AbsoluteFrequencyType = typename Superclass::AbsoluteFrequencyType

Definition at line 72 of file itkListSample.h.

◆ ConstPointer

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

Definition at line 60 of file itkListSample.h.

◆ InstanceIdentifier

template<typename TMeasurementVector>
using itk::Statistics::ListSample< TMeasurementVector >::InstanceIdentifier = typename Superclass::InstanceIdentifier

Definition at line 74 of file itkListSample.h.

◆ InternalDataContainerType

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

internal data container type

Definition at line 81 of file itkListSample.h.

◆ MeasurementType

template<typename TMeasurementVector>
using itk::Statistics::ListSample< TMeasurementVector >::MeasurementType = typename Superclass::MeasurementType

Definition at line 71 of file itkListSample.h.

◆ MeasurementVectorSizeType

template<typename TMeasurementVector>
using itk::Statistics::ListSample< TMeasurementVector >::MeasurementVectorSizeType = typename Superclass::MeasurementVectorSizeType

Definition at line 70 of file itkListSample.h.

◆ MeasurementVectorType

template<typename TMeasurementVector>
using itk::Statistics::ListSample< TMeasurementVector >::MeasurementVectorType = typename Superclass::MeasurementVectorType

Typedefs inherited from the superclass

Definition at line 69 of file itkListSample.h.

◆ Pointer

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

Definition at line 59 of file itkListSample.h.

◆ Self

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

Standard class type alias.

Definition at line 57 of file itkListSample.h.

◆ Superclass

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

Definition at line 58 of file itkListSample.h.

◆ TotalAbsoluteFrequencyType

template<typename TMeasurementVector>
using itk::Statistics::ListSample< TMeasurementVector >::TotalAbsoluteFrequencyType = typename Superclass::TotalAbsoluteFrequencyType

Definition at line 73 of file itkListSample.h.

◆ ValueType

template<typename TMeasurementVector>
using itk::Statistics::ListSample< TMeasurementVector >::ValueType = MeasurementVectorType

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

Definition at line 78 of file itkListSample.h.

Constructor & Destructor Documentation

◆ ListSample()

template<typename TMeasurementVector>
itk::Statistics::ListSample< TMeasurementVector >::ListSample ( )
protecteddefault

◆ ~ListSample()

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

Member Function Documentation

◆ Begin() [1/2]

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

returns an iterator that points to the beginning of the container

Definition at line 250 of file itkListSample.h.

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

◆ Begin() [2/2]

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 268 of file itkListSample.h.

◆ Clear()

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

Removes all the elements in the Sample

◆ CreateAnother()

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

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::Object.

◆ End() [1/2]

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

returns an iterator that points to the end of the container

Definition at line 259 of file itkListSample.h.

◆ End() [2/2]

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 277 of file itkListSample.h.

◆ GetFrequency()

template<typename TMeasurementVector>
AbsoluteFrequencyType itk::Statistics::ListSample< TMeasurementVector >::GetFrequency ( InstanceIdentifier  instanceId) const
override

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

◆ GetMeasurementVector()

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

Get the measurement associated with the specified InstanceIdentifier

◆ GetNameOfClass()

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

◆ GetTotalFrequency()

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

◆ Graft()

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

Method to graft another sample

Reimplemented from itk::DataObject.

◆ New()

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

Method for creation through the object factory.

◆ PrintSelf()

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

Who generated this data?

Reimplemented from itk::DataObject.

◆ PushBack()

template<typename TMeasurementVector>
void itk::Statistics::ListSample< TMeasurementVector >::PushBack ( const MeasurementVectorType mv)

Inserts a measurement at the end of the list

◆ Resize()

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.

◆ SetMeasurement()

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

Set a component a measurement to a particular value.

◆ SetMeasurementVector()

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

Replace a measurement with a different measurement

◆ Size()

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

◆ m_InternalContainer

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

Definition at line 291 of file itkListSample.h.


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