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::ImageToListSampleAdaptor< TImage > Class Template Reference

#include <itkImageToListSampleAdaptor.h>

Detailed Description

template<typename TImage>
class itk::Statistics::ImageToListSampleAdaptor< TImage >

This class provides ListSample interface to ITK Image.

After calling SetImage( const Image * ) method to plug in the image object, users can use Sample interfaces to access Image data. The resulting data are a list of measurement vectors.

The measurement vector type is determined from the image pixel type. This class handles images with scalar, fixed array or variable length vector pixel types.

See also
Sample, ListSample
ITK Sphinx Examples:
Examples
Examples/Statistics/ImageHistogram1.cxx, Examples/Statistics/ImageToListSampleAdaptor.cxx, Examples/Statistics/ScalarImageKmeansModelEstimator.cxx, SphinxExamples/src/Numerics/Statistics/CreateListOfSamplesFromImageWithoutDuplication/Code.cxx, and SphinxExamples/src/Segmentation/Classifiers/KMeansClusterOfPixelsInImage/Code.cxx.

Definition at line 54 of file itkImageToListSampleAdaptor.h.

+ Inheritance diagram for itk::Statistics::ImageToListSampleAdaptor< TImage >:
+ Collaboration diagram for itk::Statistics::ImageToListSampleAdaptor< TImage >:

Classes

class  ConstIterator
 
class  Iterator
 

Public Types

using ConstPointer = SmartPointer< const Self >
 
using ImageConstIteratorType = ImageRegionConstIterator< ImageType >
 
using ImageConstPointer = typename ImageType::ConstPointer
 
using ImageIteratorType = ImageRegionIterator< ImageType >
 
using ImagePointer = typename ImageType::Pointer
 
using ImageType = TImage
 
using IndexType = typename ImageType::IndexType
 
using MeasurementPixelTraitsType = MeasurementVectorPixelTraits< PixelType >
 
using MeasurementType = typename MeasurementVectorTraitsType::ValueType
 
using MeasurementVectorTraitsType = MeasurementVectorTraitsTypes< MeasurementVectorType >
 
using MeasurementVectorType = typename MeasurementPixelTraitsType::MeasurementVectorType
 
using PixelContainerConstPointer = typename ImageType::PixelContainerConstPointer
 
using PixelTraitsType = PixelTraits< typename TImage::PixelType >
 
using PixelType = typename ImageType::PixelType
 
using Pointer = SmartPointer< Self >
 
using Self = ImageToListSampleAdaptor
 
using Superclass = ListSample< typename MeasurementVectorPixelTraits< typename TImage::PixelType >::MeasurementVectorType >
 
using ValueType = MeasurementVectorType
 
- Public Types inherited from itk::Statistics::ListSample< MeasurementVectorPixelTraits< TImage::PixelType >::MeasurementVectorType >
using ConstPointer = SmartPointer< const Self >
 
using InternalDataContainerType = std::vector< MeasurementVectorType >
 
using Pointer = SmartPointer< Self >
 
using Self = ListSample
 
using Superclass = Sample< MeasurementVectorPixelTraits< TImage::PixelType >::MeasurementVectorType >
 
using ValueType = MeasurementVectorType
 
- Public Types inherited from itk::Statistics::Sample< MeasurementVectorPixelTraits< TImage::PixelType >::MeasurementVectorType >
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 = MeasurementVectorPixelTraits< TImage::PixelType >::MeasurementVectorType
 
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

AbsoluteFrequencyType GetFrequency (InstanceIdentifier id) const override
 
const TImage * GetImage () const
 
const MeasurementVectorTypeGetMeasurementVector (InstanceIdentifier id) const override
 
MeasurementVectorSizeType GetMeasurementVectorSize () const override
 
const char * GetNameOfClass () const override
 
TotalAbsoluteFrequencyType GetTotalFrequency () const override
 
void SetImage (const TImage *image)
 
InstanceIdentifier Size () const override
 
Iterator Begin ()
 
Iterator End ()
 
ConstIterator Begin () const
 
ConstIterator End () const
 
- Public Member Functions inherited from itk::Statistics::ListSample< MeasurementVectorPixelTraits< TImage::PixelType >::MeasurementVectorType >
Iterator Begin ()
 
ConstIterator Begin () const
 
void Clear ()
 
Iterator End ()
 
ConstIterator End () const
 
AbsoluteFrequencyType GetFrequency (InstanceIdentifier instanceId) const override
 
const MeasurementVectorTypeGetMeasurementVector (InstanceIdentifier instanceId) const override
 
const char * GetNameOfClass () const override
 
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< MeasurementVectorPixelTraits< TImage::PixelType >::MeasurementVectorType >
const char * GetNameOfClass () const override
 
void Graft (const DataObject *thatObject) override
 
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
 
virtual const bool & GetReleaseDataFlag () const
 
SmartPointer< ProcessObjectGetSource () const
 
DataObjectPointerArraySizeType GetSourceOutputIndex () const
 
const DataObjectIdentifierTypeGetSourceOutputName () const
 
virtual ModifiedTimeType GetUpdateMTime () const
 
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
 
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 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::Statistics::ListSample< MeasurementVectorPixelTraits< TImage::PixelType >::MeasurementVectorType >
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

 ImageToListSampleAdaptor ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 ~ImageToListSampleAdaptor () override=default
 
- Protected Member Functions inherited from itk::Statistics::ListSample< MeasurementVectorPixelTraits< TImage::PixelType >::MeasurementVectorType >
 ListSample ()=default
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 ~ListSample () override=default
 
- Protected Member Functions inherited from itk::Statistics::Sample< MeasurementVectorPixelTraits< TImage::PixelType >::MeasurementVectorType >
void PrintSelf (std::ostream &os, Indent indent) const override
 
 Sample ()
 
 ~Sample () override=default
 
- Protected Member Functions inherited from itk::DataObject
 DataObject ()
 
virtual void PropagateResetPipeline ()
 
 ~DataObject () override
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
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 PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Private Attributes

ImageConstPointer m_Image {}
 
MeasurementVectorType m_MeasurementVectorInternal {}
 

Additional Inherited Members

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

Member Typedef Documentation

◆ ConstPointer

template<typename TImage >
using itk::Statistics::ImageToListSampleAdaptor< TImage >::ConstPointer = SmartPointer<const Self>

Definition at line 67 of file itkImageToListSampleAdaptor.h.

◆ ImageConstIteratorType

Definition at line 85 of file itkImageToListSampleAdaptor.h.

◆ ImageConstPointer

template<typename TImage >
using itk::Statistics::ImageToListSampleAdaptor< TImage >::ImageConstPointer = typename ImageType::ConstPointer

Definition at line 78 of file itkImageToListSampleAdaptor.h.

◆ ImageIteratorType

Image Iterator type alias support

Definition at line 84 of file itkImageToListSampleAdaptor.h.

◆ ImagePointer

template<typename TImage >
using itk::Statistics::ImageToListSampleAdaptor< TImage >::ImagePointer = typename ImageType::Pointer

Definition at line 77 of file itkImageToListSampleAdaptor.h.

◆ ImageType

template<typename TImage >
using itk::Statistics::ImageToListSampleAdaptor< TImage >::ImageType = TImage

Image type alias

Definition at line 76 of file itkImageToListSampleAdaptor.h.

◆ IndexType

template<typename TImage >
using itk::Statistics::ImageToListSampleAdaptor< TImage >::IndexType = typename ImageType::IndexType

Definition at line 79 of file itkImageToListSampleAdaptor.h.

◆ MeasurementPixelTraitsType

Superclass type alias for Measurement vector, measurement, Instance Identifier, frequency, size, size element value

Definition at line 91 of file itkImageToListSampleAdaptor.h.

◆ MeasurementType

Definition at line 95 of file itkImageToListSampleAdaptor.h.

◆ MeasurementVectorTraitsType

Definition at line 94 of file itkImageToListSampleAdaptor.h.

◆ MeasurementVectorType

Definition at line 92 of file itkImageToListSampleAdaptor.h.

◆ PixelContainerConstPointer

template<typename TImage >
using itk::Statistics::ImageToListSampleAdaptor< TImage >::PixelContainerConstPointer = typename ImageType::PixelContainerConstPointer

Definition at line 81 of file itkImageToListSampleAdaptor.h.

◆ PixelTraitsType

template<typename TImage >
using itk::Statistics::ImageToListSampleAdaptor< TImage >::PixelTraitsType = PixelTraits<typename TImage::PixelType>

Definition at line 86 of file itkImageToListSampleAdaptor.h.

◆ PixelType

template<typename TImage >
using itk::Statistics::ImageToListSampleAdaptor< TImage >::PixelType = typename ImageType::PixelType

Definition at line 80 of file itkImageToListSampleAdaptor.h.

◆ Pointer

template<typename TImage >
using itk::Statistics::ImageToListSampleAdaptor< TImage >::Pointer = SmartPointer<Self>

Definition at line 66 of file itkImageToListSampleAdaptor.h.

◆ Self

template<typename TImage >
using itk::Statistics::ImageToListSampleAdaptor< TImage >::Self = ImageToListSampleAdaptor

Standard class type aliases

Definition at line 61 of file itkImageToListSampleAdaptor.h.

◆ Superclass

template<typename TImage >
using itk::Statistics::ImageToListSampleAdaptor< TImage >::Superclass = ListSample<typename MeasurementVectorPixelTraits<typename TImage::PixelType>::MeasurementVectorType>

Definition at line 64 of file itkImageToListSampleAdaptor.h.

◆ ValueType

template<typename TImage >
using itk::Statistics::ImageToListSampleAdaptor< TImage >::ValueType = MeasurementVectorType

Definition at line 102 of file itkImageToListSampleAdaptor.h.

Constructor & Destructor Documentation

◆ ImageToListSampleAdaptor()

template<typename TImage >
itk::Statistics::ImageToListSampleAdaptor< TImage >::ImageToListSampleAdaptor ( )
protected

◆ ~ImageToListSampleAdaptor()

template<typename TImage >
itk::Statistics::ImageToListSampleAdaptor< TImage >::~ImageToListSampleAdaptor ( )
overrideprotecteddefault

Member Function Documentation

◆ Begin() [1/2]

template<typename TImage >
Iterator itk::Statistics::ImageToListSampleAdaptor< TImage >::Begin ( )
inline

returns an iterator that points to the beginning of the container

Definition at line 257 of file itkImageToListSampleAdaptor.h.

References itk::ImageRegionConstIterator< TImage >::GoToBegin().

Referenced by itk::Statistics::ImageToListSampleAdaptor< TImage >::ConstIterator::ConstIterator().

◆ Begin() [2/2]

template<typename TImage >
ConstIterator itk::Statistics::ImageToListSampleAdaptor< TImage >::Begin ( ) const
inline

returns an iterator that points to the beginning of the container

Definition at line 283 of file itkImageToListSampleAdaptor.h.

References itk::ImageRegionConstIterator< TImage >::GoToBegin().

◆ End() [1/2]

template<typename TImage >
Iterator itk::Statistics::ImageToListSampleAdaptor< TImage >::End ( )
inline

returns an iterator that points to the end of the container

Definition at line 269 of file itkImageToListSampleAdaptor.h.

References itk::ImageRegionConstIterator< TImage >::GoToEnd().

◆ End() [2/2]

template<typename TImage >
ConstIterator itk::Statistics::ImageToListSampleAdaptor< TImage >::End ( ) const
inline

returns an iterator that points to the end of the container

Definition at line 295 of file itkImageToListSampleAdaptor.h.

References itk::ImageRegionConstIterator< TImage >::GoToEnd().

◆ GetFrequency()

template<typename TImage >
AbsoluteFrequencyType itk::Statistics::ImageToListSampleAdaptor< TImage >::GetFrequency ( InstanceIdentifier  id) const
overridevirtual

◆ GetImage()

template<typename TImage >
const TImage* itk::Statistics::ImageToListSampleAdaptor< TImage >::GetImage ( ) const

Method to get the image

◆ GetMeasurementVector()

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

method to return measurement vector for a specified id

Implements itk::Statistics::Sample< MeasurementVectorPixelTraits< TImage::PixelType >::MeasurementVectorType >.

◆ GetMeasurementVectorSize()

template<typename TImage >
MeasurementVectorSizeType itk::Statistics::ImageToListSampleAdaptor< TImage >::GetMeasurementVectorSize ( ) const
inlineoverridevirtual

Get method for the length of the measurement vector

Reimplemented from itk::Statistics::Sample< MeasurementVectorPixelTraits< TImage::PixelType >::MeasurementVectorType >.

Definition at line 121 of file itkImageToListSampleAdaptor.h.

◆ GetNameOfClass()

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

Reimplemented from itk::DataObject.

◆ GetTotalFrequency()

template<typename TImage >
TotalAbsoluteFrequencyType itk::Statistics::ImageToListSampleAdaptor< TImage >::GetTotalFrequency ( ) const
overridevirtual

◆ New()

template<typename TImage >
static Pointer itk::Statistics::ImageToListSampleAdaptor< TImage >::New ( )
static

Method for creation through the object factory.

◆ PrintSelf()

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

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.

◆ SetImage()

template<typename TImage >
void itk::Statistics::ImageToListSampleAdaptor< TImage >::SetImage ( const TImage *  image)

Method to set the image

◆ Size()

template<typename TImage >
InstanceIdentifier itk::Statistics::ImageToListSampleAdaptor< TImage >::Size ( ) const
overridevirtual

returns the number of measurement vectors in this container

Implements itk::Statistics::Sample< MeasurementVectorPixelTraits< TImage::PixelType >::MeasurementVectorType >.

Member Data Documentation

◆ m_Image

template<typename TImage >
ImageConstPointer itk::Statistics::ImageToListSampleAdaptor< TImage >::m_Image {}
private

Definition at line 313 of file itkImageToListSampleAdaptor.h.

◆ m_MeasurementVectorInternal

template<typename TImage >
MeasurementVectorType itk::Statistics::ImageToListSampleAdaptor< TImage >::m_MeasurementVectorInternal {}
mutableprivate

Definition at line 314 of file itkImageToListSampleAdaptor.h.


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