ITK  6.0.0
Insight Toolkit
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
itk::Statistics::Histogram< TMeasurement, TFrequencyContainer > Class Template Reference

#include <itkHistogram.h>

Detailed Description

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
class itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >

This class stores measurement vectors in the context of n-dimensional histogram.

Histogram represents an ND histogram. Histogram bins can be regularly or irregularly spaced. The storage for the histogram is managed via the FrequencyContainer specified by the template argument. The default frequency container is a DenseFrequencyContainer. A SparseFrequencyContainer can be used as an alternative.

Frequencies of a bin (SetFrequency(), IncreaseFrequency()) can be specified by measurement, index, or instance identifier.

Measurements can be queried by bin index or instance identifier. In this case, the measurement returned is the centroid of the histogram bin.

The Initialize() method is used to specify the number of bins for each dimension of the histogram. An overloaded version also allows for regularly spaced bins to defined. To define irregularly sized bins, use the SetBinMin()/SetBinMax() methods.

If you do not know the length of the measurement vector at compile time, you should use the VariableDimensionHistogram class, instead of the Histogram class.

If you know the length of the measurement vector at compile time, it can conveniently be obtained from MeasurementVectorTraits. For instance, instantiate a histogram as below:

using HistogramType = Histogram< THistogramMeasurement, typename TFrequencyContainer >;
See also
Sample, DenseFrequencyContainer, SparseFrequencyContainer, VariableDimensionHistogram
ITK Sphinx Examples:
Examples
Examples/Statistics/Histogram.cxx, Examples/Statistics/ImageHistogram1.cxx, Examples/Statistics/SampleToHistogramFilter.cxx, SphinxExamples/src/Numerics/Statistics/CreateHistogramFromListOfMeasurements/Code.cxx, and SphinxExamples/src/Numerics/Statistics/HistogramCreationAndBinAccess/Code.cxx.

Definition at line 77 of file itkHistogram.h.

+ Inheritance diagram for itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >:
+ Collaboration diagram for itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >:

Classes

class  ConstIterator
 
class  Iterator
 

Public Types

using AbsoluteFrequencyType = typename FrequencyContainerType::AbsoluteFrequencyType
 
using ArrayType = Array< TMeasurement >
 
using BinMaxContainerType = std::vector< BinMaxVectorType >
 
using BinMaxVectorType = std::vector< MeasurementType >
 
using BinMinContainerType = std::vector< BinMinVectorType >
 
using BinMinVectorType = std::vector< MeasurementType >
 
using ConstPointer = SmartPointer< const Self >
 
using FrequencyContainerPointer = typename FrequencyContainerType::Pointer
 
using FrequencyContainerType = TFrequencyContainer
 
using IndexType = Array< itk::IndexValueType >
 
using IndexValueType = typename IndexType::ValueType
 
using MeasurementType = TMeasurement
 
using Pointer = SmartPointer< Self >
 
using RelativeFrequencyType = typename FrequencyContainerType::RelativeFrequencyType
 
using Self = Histogram
 
using SizeType = Array< itk::SizeValueType >
 
using SizeValueType = typename SizeType::ValueType
 
using Superclass = Sample< ArrayType >
 
using TotalAbsoluteFrequencyType = typename FrequencyContainerType::TotalAbsoluteFrequencyType
 
using TotalRelativeFrequencyType = typename FrequencyContainerType::TotalRelativeFrequencyType
 
using ValueType = MeasurementVectorType
 
- Public Types inherited from itk::Statistics::Sample< Array< TMeasurement > >
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 = Array< TMeasurement >
 
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

const MeasurementTypeGetBinMax (unsigned int dimension, InstanceIdentifier nbin) const
 
const MeasurementTypeGetBinMaxFromValue (unsigned int dimension, float value) const
 
const MeasurementTypeGetBinMin (unsigned int dimension, InstanceIdentifier nbin) const
 
const MeasurementTypeGetBinMinFromValue (unsigned int dimension, float value) const
 
const BinMaxVectorTypeGetDimensionMaxs (unsigned int dimension) const
 
const BinMinVectorTypeGetDimensionMins (unsigned int dimension) const
 
AbsoluteFrequencyType GetFrequency (const IndexType &index) const
 
AbsoluteFrequencyType GetFrequency (InstanceIdentifier id) const override
 
AbsoluteFrequencyType GetFrequency (InstanceIdentifier n, unsigned int dimension) const
 
const MeasurementVectorTypeGetHistogramMaxFromIndex (const IndexType &index) const
 
const MeasurementVectorTypeGetHistogramMinFromIndex (const IndexType &index) const
 
bool GetIndex (const MeasurementVectorType &measurement, IndexType &index) const
 
const IndexTypeGetIndex (InstanceIdentifier id) const
 
InstanceIdentifier GetInstanceIdentifier (const IndexType &index) const
 
const BinMaxContainerTypeGetMaxs () const
 
MeasurementType GetMeasurement (InstanceIdentifier n, unsigned int dimension) const
 
const MeasurementVectorTypeGetMeasurementVector (const IndexType &index) const
 
const MeasurementVectorTypeGetMeasurementVector (InstanceIdentifier id) const override
 
const BinMinContainerTypeGetMins () const
 
const char * GetNameOfClass () const override
 
const SizeTypeGetSize () const
 
SizeValueType GetSize (unsigned int dimension) const
 
TotalAbsoluteFrequencyType GetTotalFrequency () const override
 
void Graft (const DataObject *) override
 
bool IncreaseFrequency (InstanceIdentifier id, AbsoluteFrequencyType value)
 
bool IncreaseFrequencyOfIndex (const IndexType &index, AbsoluteFrequencyType value)
 
bool IncreaseFrequencyOfMeasurement (const MeasurementVectorType &measurement, AbsoluteFrequencyType value)
 
void Initialize (const SizeType &size)
 
void Initialize (const SizeType &size, MeasurementVectorType &lowerBound, MeasurementVectorType &upperBound)
 
bool IsIndexOutOfBounds (const IndexType &index) const
 
double Mean (unsigned int dimension) const
 
void SetBinMax (unsigned int dimension, InstanceIdentifier nbin, MeasurementType max)
 
void SetBinMin (unsigned int dimension, InstanceIdentifier nbin, MeasurementType min)
 
void SetFrequency (AbsoluteFrequencyType value)
 
bool SetFrequency (InstanceIdentifier id, AbsoluteFrequencyType value)
 
bool SetFrequencyOfIndex (const IndexType &index, AbsoluteFrequencyType value)
 
bool SetFrequencyOfMeasurement (const MeasurementVectorType &measurement, AbsoluteFrequencyType value)
 
void SetToZero ()
 
InstanceIdentifier Size () const override
 
virtual bool GetClipBinsAtEnds () const
 
virtual void SetClipBinsAtEnds (bool _arg)
 
virtual void ClipBinsAtEndsOn ()
 
double Quantile (unsigned int dimension, double p) const
 
- Public Member Functions inherited from itk::Statistics::Sample< Array< TMeasurement > >
virtual MeasurementVectorSizeType GetMeasurementVectorSize () const
 
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 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::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

void PrintSelf (std::ostream &os, Indent indent) const override
 
- Protected Member Functions inherited from itk::Statistics::Sample< Array< TMeasurement > >
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 ()
 
using OffsetTableType = std::vector< InstanceIdentifier >
 
SizeType m_Size {}
 
OffsetTableType m_OffsetTable {}
 
FrequencyContainerPointer m_FrequencyContainer {}
 
unsigned int m_NumberOfInstances { 0 }
 
std::vector< std::vector< MeasurementType > > m_Min {}
 
std::vector< std::vector< MeasurementType > > m_Max {}
 
MeasurementVectorType m_TempMeasurementVector {}
 
IndexType m_TempIndex {}
 
bool m_ClipBinsAtEnds { true }
 
Iterator Begin ()
 
Iterator End ()
 
ConstIterator Begin () const
 
ConstIterator End () const
 
 Histogram ()
 
 ~Histogram () override=default
 
void Initialize () override
 

Additional Inherited Members

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

Member Typedef Documentation

◆ AbsoluteFrequencyType

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
using itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::AbsoluteFrequencyType = typename FrequencyContainerType::AbsoluteFrequencyType

Frequency and TotalFrequency value type from superclass

Definition at line 112 of file itkHistogram.h.

◆ ArrayType

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
using itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::ArrayType = Array<TMeasurement>

Definition at line 83 of file itkHistogram.h.

◆ BinMaxContainerType

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
using itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::BinMaxContainerType = std::vector<BinMaxVectorType>

Definition at line 129 of file itkHistogram.h.

◆ BinMaxVectorType

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
using itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::BinMaxVectorType = std::vector<MeasurementType>

Definition at line 127 of file itkHistogram.h.

◆ BinMinContainerType

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
using itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::BinMinContainerType = std::vector<BinMinVectorType>

Definition at line 128 of file itkHistogram.h.

◆ BinMinVectorType

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
using itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::BinMinVectorType = std::vector<MeasurementType>

bin min max value storage types

Definition at line 126 of file itkHistogram.h.

◆ ConstPointer

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
using itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::ConstPointer = SmartPointer<const Self>

Definition at line 89 of file itkHistogram.h.

◆ FrequencyContainerPointer

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
using itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::FrequencyContainerPointer = typename FrequencyContainerType::Pointer

Definition at line 109 of file itkHistogram.h.

◆ FrequencyContainerType

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
using itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::FrequencyContainerType = TFrequencyContainer

frequency container type alias

Definition at line 108 of file itkHistogram.h.

◆ IndexType

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
using itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::IndexType = Array<itk::IndexValueType>

Index type alias support An index is used to access pixel values.

Definition at line 118 of file itkHistogram.h.

◆ IndexValueType

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
using itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::IndexValueType = typename IndexType::ValueType

Definition at line 119 of file itkHistogram.h.

◆ MeasurementType

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
using itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::MeasurementType = TMeasurement

type of an element of a measurement vector

Definition at line 98 of file itkHistogram.h.

◆ OffsetTableType

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
using itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::OffsetTableType = std::vector<InstanceIdentifier>
private

Definition at line 507 of file itkHistogram.h.

◆ Pointer

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
using itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::Pointer = SmartPointer<Self>

Definition at line 88 of file itkHistogram.h.

◆ RelativeFrequencyType

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
using itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::RelativeFrequencyType = typename FrequencyContainerType::RelativeFrequencyType

Definition at line 114 of file itkHistogram.h.

◆ Self

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
using itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::Self = Histogram

Standard type alias

Definition at line 86 of file itkHistogram.h.

◆ SizeType

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
using itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::SizeType = Array<itk::SizeValueType>

size array type

Definition at line 122 of file itkHistogram.h.

◆ SizeValueType

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
using itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::SizeValueType = typename SizeType::ValueType

Definition at line 123 of file itkHistogram.h.

◆ Superclass

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
using itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::Superclass = Sample<ArrayType>

Definition at line 87 of file itkHistogram.h.

◆ TotalAbsoluteFrequencyType

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
using itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::TotalAbsoluteFrequencyType = typename FrequencyContainerType::TotalAbsoluteFrequencyType

Definition at line 113 of file itkHistogram.h.

◆ TotalRelativeFrequencyType

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
using itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::TotalRelativeFrequencyType = typename FrequencyContainerType::TotalRelativeFrequencyType

Definition at line 115 of file itkHistogram.h.

◆ ValueType

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
using itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::ValueType = MeasurementVectorType

Definition at line 105 of file itkHistogram.h.

Constructor & Destructor Documentation

◆ Histogram()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::Histogram ( )
protected

◆ ~Histogram()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::~Histogram ( )
overrideprotecteddefault

Member Function Documentation

◆ Begin() [1/2]

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
Iterator itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::Begin ( )
inline

Definition at line 472 of file itkHistogram.h.

◆ Begin() [2/2]

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
ConstIterator itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::Begin ( ) const
inline

Definition at line 486 of file itkHistogram.h.

◆ ClipBinsAtEndsOn()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
virtual void itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::ClipBinsAtEndsOn ( )
virtual

Set/Get whether the bins at the edges of the histogram extend to +/- infinity.

◆ End() [1/2]

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
Iterator itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::End ( )
inline

Definition at line 480 of file itkHistogram.h.

◆ End() [2/2]

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
ConstIterator itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::End ( ) const
inline

Definition at line 494 of file itkHistogram.h.

◆ GetBinMax()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
const MeasurementType& itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::GetBinMax ( unsigned int  dimension,
InstanceIdentifier  nbin 
) const

Get the maximum value of nth bin of dimension d

◆ GetBinMaxFromValue()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
const MeasurementType& itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::GetBinMaxFromValue ( unsigned int  dimension,
float  value 
) const

Get the maximum of the bin along dimension d corresponding to a particular measurement.

◆ GetBinMin()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
const MeasurementType& itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::GetBinMin ( unsigned int  dimension,
InstanceIdentifier  nbin 
) const

Get the minimum value of nth bin of dimension d

◆ GetBinMinFromValue()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
const MeasurementType& itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::GetBinMinFromValue ( unsigned int  dimension,
float  value 
) const

Get the minimum of the bin along dimension d corresponding to a particular measurement.

◆ GetClipBinsAtEnds()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
virtual bool itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::GetClipBinsAtEnds ( ) const
virtual

Set/Get whether the bins at the edges of the histogram extend to +/- infinity.

◆ GetDimensionMaxs()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
const BinMaxVectorType& itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::GetDimensionMaxs ( unsigned int  dimension) const

Get the vector of maximums along a dimension

◆ GetDimensionMins()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
const BinMinVectorType& itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::GetDimensionMins ( unsigned int  dimension) const

Get the vector of bin minimums along a dimension

◆ GetFrequency() [1/3]

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
AbsoluteFrequencyType itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::GetFrequency ( const IndexType index) const

Get the frequency of an index

◆ GetFrequency() [2/3]

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
AbsoluteFrequencyType itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::GetFrequency ( InstanceIdentifier  id) const
overridevirtual

Get the frequency of an instance identifier

Implements itk::Statistics::Sample< Array< TMeasurement > >.

◆ GetFrequency() [3/3]

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
AbsoluteFrequencyType itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::GetFrequency ( InstanceIdentifier  n,
unsigned int  dimension 
) const

Get the frequency of a dimension's nth element.

◆ GetHistogramMaxFromIndex()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
const MeasurementVectorType& itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::GetHistogramMaxFromIndex ( const IndexType index) const

Get the maximums of the bin corresponding to a particular index

◆ GetHistogramMinFromIndex()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
const MeasurementVectorType& itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::GetHistogramMinFromIndex ( const IndexType index) const

Get the minimums of the bin corresponding to a particular index

◆ GetIndex() [1/2]

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
bool itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::GetIndex ( const MeasurementVectorType measurement,
IndexType index 
) const

Get the index of histogram corresponding to the specified measurement value. Returns true if index is valid and false if the measurement is outside the histogram

◆ GetIndex() [2/2]

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
const IndexType& itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::GetIndex ( InstanceIdentifier  id) const

Get the index that is uniquely labelled by an instance identifier The corresponding id is the offset of the index This method uses ImageBase::ComputeIndex() method

◆ GetInstanceIdentifier()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
InstanceIdentifier itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::GetInstanceIdentifier ( const IndexType index) const

Get the instance identifier of the bin that is indexed by the index. The corresponding instance identifier is the offset of the index This method uses ImageBase::ComputeIndex() method

◆ GetMaxs()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
const BinMaxContainerType& itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::GetMaxs ( ) const

Method the maximums of the bins

◆ GetMeasurement()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
MeasurementType itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::GetMeasurement ( InstanceIdentifier  n,
unsigned int  dimension 
) const

Get the measurement a bin along a specified dimension. This is the midpoint of the bin along that dimension.

◆ GetMeasurementVector() [1/2]

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
const MeasurementVectorType& itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::GetMeasurementVector ( const IndexType index) const

Get the measurement of an index. This is the centroid of the bin.

◆ GetMeasurementVector() [2/2]

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
const MeasurementVectorType& itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::GetMeasurementVector ( InstanceIdentifier  id) const
overridevirtual

Get the measurement of an instance identifier. This is the centroid of the bin.

Implements itk::Statistics::Sample< Array< TMeasurement > >.

◆ GetMins()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
const BinMinContainerType& itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::GetMins ( ) const

Get the minimums of the bins

◆ GetNameOfClass()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
const char* itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::GetNameOfClass ( ) const
overridevirtual
See also
LightObject::GetNameOfClass()

Reimplemented from itk::DataObject.

◆ GetSize() [1/2]

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
const SizeType& itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::GetSize ( ) const

Get the size (N-dimensional) of the histogram

◆ GetSize() [2/2]

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
SizeValueType itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::GetSize ( unsigned int  dimension) const

Get the size of histogram along a specified dimension

◆ GetTotalFrequency()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
TotalAbsoluteFrequencyType itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::GetTotalFrequency ( ) const
overridevirtual

Get the total frequency in the histogram

Implements itk::Statistics::Sample< Array< TMeasurement > >.

◆ Graft()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
void itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::Graft ( const DataObject )
overridevirtual

Method to graft another histogram's output

Reimplemented from itk::DataObject.

◆ IncreaseFrequency()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
bool itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::IncreaseFrequency ( InstanceIdentifier  id,
AbsoluteFrequencyType  value 
)

Increase the frequency of an instance identifier. Frequency is increased by the specified value. Returns false if the bin is out of bounds.

◆ IncreaseFrequencyOfIndex()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
bool itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::IncreaseFrequencyOfIndex ( const IndexType index,
AbsoluteFrequencyType  value 
)

Increase the frequency of an index. Frequency is increased by the specified value. Returns false if the bin is out of bounds.

◆ IncreaseFrequencyOfMeasurement()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
bool itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::IncreaseFrequencyOfMeasurement ( const MeasurementVectorType measurement,
AbsoluteFrequencyType  value 
)

Increase the frequency of a measurement. Frequency is increased by the specified value. Returns false if the measurement is outside the bounds of the histogram.

Warning
This function performs a dynamic allocation for the index length, and should not be used in tight per-pixel loops.

◆ Initialize() [1/3]

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
void itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::Initialize ( )
inlineoverrideprivatevirtual

Restore the data object to its initial state. This means releasing memory.

Reimplemented from itk::DataObject.

Definition at line 515 of file itkHistogram.h.

◆ Initialize() [2/3]

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
void itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::Initialize ( const SizeType size)

Initialize the histogram, generating the offset table and preparing the frequency container. Subclasses should call this method in their Initialize() method.

◆ Initialize() [3/3]

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
void itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::Initialize ( const SizeType size,
MeasurementVectorType lowerBound,
MeasurementVectorType upperBound 
)

Initialize the histogram using equal size bins. To assign bin's min and max values along each dimension use SetBinMin() and SetBinMax() functions.

◆ IsIndexOutOfBounds()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
bool itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::IsIndexOutOfBounds ( const IndexType index) const

Returns true if the given index is out of bound meaning one of index is not between [0, last index]

◆ Mean()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
double itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::Mean ( unsigned int  dimension) const

Get the mean value for a dimension

◆ New()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
static Pointer itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::New ( )
static

standard New() method support

◆ PrintSelf()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
void itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::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.

◆ Quantile()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
double itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::Quantile ( unsigned int  dimension,
double  p 
) const

Get the pth percentile value for a dimension.

Let assume n = the index of the bin where the p-th percentile value is,
min = min value of the dimension of the bin,
max = max value of the dimension of the bin,
interval = max - min ,
pp = accumulated proportion until n-1 bin;
and pb = frequency of the bin / total frequency of the dimension.

If p is less than 0.5,
the percentile value =
min + ((p - pp ) / pb) * interval
If p is greater than or equal to 0.5
the percentile value =
max - ((pp - p) / pb) * interval  

◆ SetBinMax()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
void itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::SetBinMax ( unsigned int  dimension,
InstanceIdentifier  nbin,
MeasurementType  max 
)

Set the maximum value of nth bin of dimension d

◆ SetBinMin()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
void itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::SetBinMin ( unsigned int  dimension,
InstanceIdentifier  nbin,
MeasurementType  min 
)

Set the minimum value of nth bin of dimension d

◆ SetClipBinsAtEnds()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
virtual void itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::SetClipBinsAtEnds ( bool  _arg)
virtual

Set/Get whether the bins at the edges of the histogram extend to +/- infinity.

◆ SetFrequency() [1/2]

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
void itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::SetFrequency ( AbsoluteFrequencyType  value)

Set all the bins in the histogram to a specified frequency

◆ SetFrequency() [2/2]

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
bool itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::SetFrequency ( InstanceIdentifier  id,
AbsoluteFrequencyType  value 
)

Set the frequency of an instance identifier. Returns false if the bin is out of bounds.

◆ SetFrequencyOfIndex()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
bool itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::SetFrequencyOfIndex ( const IndexType index,
AbsoluteFrequencyType  value 
)

Set the frequency of an index. Returns false if the bin is out of bounds.

◆ SetFrequencyOfMeasurement()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
bool itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::SetFrequencyOfMeasurement ( const MeasurementVectorType measurement,
AbsoluteFrequencyType  value 
)

Set the frequency of a measurement. Returns false if the bin is out of bounds.

◆ SetToZero()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
void itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::SetToZero ( )

Initialize the values of the histogram bins to zero

◆ Size()

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
InstanceIdentifier itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::Size ( ) const
overridevirtual

Returns the number of instances (bins or cells) in this container

Implements itk::Statistics::Sample< Array< TMeasurement > >.

Member Data Documentation

◆ m_ClipBinsAtEnds

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
bool itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::m_ClipBinsAtEnds { true }
private

Definition at line 527 of file itkHistogram.h.

◆ m_FrequencyContainer

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
FrequencyContainerPointer itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::m_FrequencyContainer {}
private

Definition at line 509 of file itkHistogram.h.

◆ m_Max

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
std::vector<std::vector<MeasurementType> > itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::m_Max {}
private

Definition at line 522 of file itkHistogram.h.

◆ m_Min

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
std::vector<std::vector<MeasurementType> > itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::m_Min {}
private

Definition at line 519 of file itkHistogram.h.

◆ m_NumberOfInstances

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
unsigned int itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::m_NumberOfInstances { 0 }
private

Definition at line 510 of file itkHistogram.h.

◆ m_OffsetTable

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
OffsetTableType itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::m_OffsetTable {}
private

Definition at line 508 of file itkHistogram.h.

◆ m_Size

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
SizeType itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::m_Size {}
protected

Definition at line 504 of file itkHistogram.h.

◆ m_TempIndex

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
IndexType itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::m_TempIndex {}
mutableprivate

Definition at line 525 of file itkHistogram.h.

◆ m_TempMeasurementVector

template<typename TMeasurement = float, typename TFrequencyContainer = DenseFrequencyContainer2>
MeasurementVectorType itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::m_TempMeasurementVector {}
mutableprivate

Definition at line 524 of file itkHistogram.h.


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