ITK  6.0.0
Insight Toolkit
Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
itk::Statistics::SparseFrequencyContainer2 Class Reference

#include <itkSparseFrequencyContainer2.h>

Detailed Description

his class is a container for an histogram.

This class uses an map to store histogram. If your histogram is dense use DenseHistogram. You should access each bin by (InstanceIdentifier)index or measurement vector.

Definition at line 42 of file itkSparseFrequencyContainer2.h.

+ Inheritance diagram for itk::Statistics::SparseFrequencyContainer2:
+ Collaboration diagram for itk::Statistics::SparseFrequencyContainer2:

Public Types

using AbsoluteFrequencyType = MeasurementVectorTraits::AbsoluteFrequencyType
 
using ConstPointer = SmartPointer< const Self >
 
using FrequencyContainerConstIterator = FrequencyContainerType::const_iterator
 
using FrequencyContainerType = std::map< InstanceIdentifier, AbsoluteFrequencyType >
 
using InstanceIdentifier = MeasurementVectorTraits::InstanceIdentifier
 
using Pointer = SmartPointer< Self >
 
using RelativeFrequencyType = MeasurementVectorTraits::RelativeFrequencyType
 
using Self = SparseFrequencyContainer2
 
using Superclass = Object
 
using TotalAbsoluteFrequencyType = MeasurementVectorTraits::TotalAbsoluteFrequencyType
 
using TotalRelativeFrequencyType = MeasurementVectorTraits::TotalRelativeFrequencyType
 
- 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 (const InstanceIdentifier id) const
 
TotalAbsoluteFrequencyType GetTotalFrequency () const
 
bool IncreaseFrequency (const InstanceIdentifier id, const AbsoluteFrequencyType value)
 
void Initialize (SizeValueType length)
 
bool SetFrequency (const InstanceIdentifier id, const AbsoluteFrequencyType value)
 
void SetToZero ()
 
- 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
 
 SparseFrequencyContainer2 ()
 
 ~SparseFrequencyContainer2 () override=default
 
- 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

FrequencyContainerType m_FrequencyContainer {}
 
TotalAbsoluteFrequencyType m_TotalFrequency {}
 
const char * GetNameOfClass () const override
 
static Pointer New ()
 

Additional Inherited Members

- 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

Absolute frequency type alias

Definition at line 62 of file itkSparseFrequencyContainer2.h.

◆ ConstPointer

Definition at line 51 of file itkSparseFrequencyContainer2.h.

◆ FrequencyContainerConstIterator

Definition at line 75 of file itkSparseFrequencyContainer2.h.

◆ FrequencyContainerType

Histogram type alias support

Definition at line 74 of file itkSparseFrequencyContainer2.h.

◆ InstanceIdentifier

instance identifier alias

Definition at line 59 of file itkSparseFrequencyContainer2.h.

◆ Pointer

Definition at line 50 of file itkSparseFrequencyContainer2.h.

◆ RelativeFrequencyType

Relative frequency type alias

Definition at line 68 of file itkSparseFrequencyContainer2.h.

◆ Self

Standard class type aliases.

Definition at line 48 of file itkSparseFrequencyContainer2.h.

◆ Superclass

Definition at line 49 of file itkSparseFrequencyContainer2.h.

◆ TotalAbsoluteFrequencyType

Absolute Total frequency type

Definition at line 65 of file itkSparseFrequencyContainer2.h.

◆ TotalRelativeFrequencyType

Relative Relative frequency type

Definition at line 71 of file itkSparseFrequencyContainer2.h.

Constructor & Destructor Documentation

◆ SparseFrequencyContainer2()

itk::Statistics::SparseFrequencyContainer2::SparseFrequencyContainer2 ( )
protected

◆ ~SparseFrequencyContainer2()

itk::Statistics::SparseFrequencyContainer2::~SparseFrequencyContainer2 ( )
overrideprotecteddefault

Member Function Documentation

◆ GetFrequency()

AbsoluteFrequencyType itk::Statistics::SparseFrequencyContainer2::GetFrequency ( const InstanceIdentifier  id) const

Method to get the frequency of a bin from the histogram. It will return zero when the Id is out of bounds.

◆ GetNameOfClass()

const char * itk::Statistics::SparseFrequencyContainer2::GetNameOfClass ( ) const
overridevirtual
See also
LightObject::GetNameOfClass()

Reimplemented from itk::Object.

◆ GetTotalFrequency()

TotalAbsoluteFrequencyType itk::Statistics::SparseFrequencyContainer2::GetTotalFrequency ( ) const
inline

Definition at line 102 of file itkSparseFrequencyContainer2.h.

◆ IncreaseFrequency()

bool itk::Statistics::SparseFrequencyContainer2::IncreaseFrequency ( const InstanceIdentifier  id,
const AbsoluteFrequencyType  value 
)

Method to increase the frequency by one. This function is convenient to create a histogram. It returns false when the id is out of bounds.

◆ Initialize()

void itk::Statistics::SparseFrequencyContainer2::Initialize ( SizeValueType  length)

prepares the frequency container

◆ New()

static Pointer itk::Statistics::SparseFrequencyContainer2::New ( )
static

◆ PrintSelf()

void itk::Statistics::SparseFrequencyContainer2::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::Object.

◆ SetFrequency()

bool itk::Statistics::SparseFrequencyContainer2::SetFrequency ( const InstanceIdentifier  id,
const AbsoluteFrequencyType  value 
)

Method to set the frequency of histogram using instance identifier. It returns false when the Id is out of bounds

◆ SetToZero()

void itk::Statistics::SparseFrequencyContainer2::SetToZero ( )

Calls the SetToZero method of superclass to initialize all the bins to Zero. This should be done before starting to call the IncreaseFrequency method.

Member Data Documentation

◆ m_FrequencyContainer

FrequencyContainerType itk::Statistics::SparseFrequencyContainer2::m_FrequencyContainer {}
private

Definition at line 115 of file itkSparseFrequencyContainer2.h.

◆ m_TotalFrequency

TotalAbsoluteFrequencyType itk::Statistics::SparseFrequencyContainer2::m_TotalFrequency {}
private

Definition at line 116 of file itkSparseFrequencyContainer2.h.


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