ITK  4.4.0
Insight Segmentation and Registration Toolkit
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
itk::Statistics::Histogram< TMeasurement, TFrequencyContainer > Class Template Reference

#include <itkHistogram.h>

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

Detailed Description

template<class TMeasurement = float, class 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 in the centroid of the histogram bin.

The Initialize() method is used to specified 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 measuremen vector at compile time, you can conveniently be obtained from MeasurementVectorTraits. For instance, instantiate a histogram as below:

typedef Histogram< THistogramMeasurement, typename TFrequencyContainer > HistogramType;
See Also
Sample, DenseFrequencyContainer, SparseFrequencyContainer, VariableDimensionHistogram
Wiki Examples:

Definition at line 77 of file itkHistogram.h.

Classes

class  ConstIterator
 
class  Iterator
 

Public Types

typedef
FrequencyContainerType::AbsoluteFrequencyType 
AbsoluteFrequencyType
 
typedef Array< TMeasurement > ArrayType
 
typedef std::vector
< BinMaxVectorType
BinMaxContainerType
 
typedef std::vector
< MeasurementType
BinMaxVectorType
 
typedef std::vector
< BinMinVectorType
BinMinContainerType
 
typedef std::vector
< MeasurementType
BinMinVectorType
 
typedef SmartPointer< const SelfConstPointer
 
typedef
FrequencyContainerType::Pointer 
FrequencyContainerPointer
 
typedef TFrequencyContainer FrequencyContainerType
 
typedef Array
< ::itk::IndexValueType
IndexType
 
typedef IndexType::ValueType IndexValueType
 
typedef
Superclass::InstanceIdentifier 
InstanceIdentifier
 
typedef TMeasurement MeasurementType
 
typedef
Superclass::MeasurementVectorSizeType 
MeasurementVectorSizeType
 
typedef
Superclass::MeasurementVectorType 
MeasurementVectorType
 
typedef SmartPointer< SelfPointer
 
typedef
FrequencyContainerType::RelativeFrequencyType 
RelativeFrequencyType
 
typedef Histogram Self
 
typedef Array
< ::itk::SizeValueType
SizeType
 
typedef SizeType::ValueType SizeValueType
 
typedef Sample< ArrayTypeSuperclass
 
typedef
FrequencyContainerType::TotalAbsoluteFrequencyType 
TotalAbsoluteFrequencyType
 
typedef
FrequencyContainerType::TotalRelativeFrequencyType 
TotalRelativeFrequencyType
 
typedef MeasurementVectorType ValueType
 
- Public Types inherited from itk::Statistics::Sample< Array< TMeasurement > >
typedef
MeasurementVectorTraits::AbsoluteFrequencyType 
AbsoluteFrequencyType
 
typedef SmartPointer< const SelfConstPointer
 
typedef
MeasurementVectorTraits::InstanceIdentifier 
InstanceIdentifier
 
typedef
MeasurementVectorTraitsTypes
< MeasurementVectorType >
::ValueType 
MeasurementType
 
typedef unsigned int MeasurementVectorSizeType
 
typedef Array< TMeasurement > MeasurementVectorType
 
typedef SmartPointer< SelfPointer
 
typedef Sample Self
 
typedef DataObject Superclass
 
typedef NumericTraits
< AbsoluteFrequencyType >
::AccumulateType 
TotalAbsoluteFrequencyType
 
- Public Types inherited from itk::DataObject
typedef SmartPointer< const SelfConstPointer
 
typedef std::string DataObjectIdentifierType
 
typedef std::vector< Pointer >
::size_type 
DataObjectPointerArraySizeType
 
typedef SmartPointer< SelfPointer
 
typedef DataObject Self
 
typedef Object Superclass
 
- Public Types inherited from itk::Object
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef Object Self
 
typedef LightObject Superclass
 
- Public Types inherited from itk::LightObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightObject Self
 

Public Member Functions

Iterator Begin ()
 
ConstIterator Begin () const
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
Iterator End ()
 
ConstIterator End () const
 
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
 
virtual bool GetClipBinsAtEnds () const
 
const BinMaxVectorTypeGetDimensionMaxs (unsigned int dimension) const
 
const BinMinVectorTypeGetDimensionMins (unsigned int dimension) const
 
AbsoluteFrequencyType GetFrequency (InstanceIdentifier id) const
 
AbsoluteFrequencyType GetFrequency (const IndexType &index) 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
 
const BinMinContainerTypeGetMins () const
 
virtual const char * GetNameOfClass () const
 
const SizeTypeGetSize () const
 
SizeValueType GetSize (unsigned int dimension) const
 
virtual void Graft (const DataObject *)
 
bool IncreaseFrequency (InstanceIdentifier id, AbsoluteFrequencyType value)
 
bool IncreaseFrequencyOfIndex (const IndexType &index, AbsoluteFrequencyType value)
 
void Initialize (const SizeType &size)
 
void Initialize (const SizeType &size, MeasurementVectorType &lowerBound, MeasurementVectorType &upperBound)
 
bool IsIndexOutOfBounds (const IndexType &index) const
 
 itkLegacyMacro (const IndexType &GetIndex(const MeasurementVectorType &measurement) 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)
 
virtual void SetClipBinsAtEnds (bool _arg)
 
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
 
bool IncreaseFrequencyOfMeasurement (const MeasurementVectorType &measurement, AbsoluteFrequencyType value)
 
const MeasurementVectorTypeGetMeasurementVector (InstanceIdentifier id) const
 
const MeasurementVectorTypeGetMeasurementVector (const IndexType &index) const
 
MeasurementType GetMeasurement (InstanceIdentifier n, unsigned int dimension) const
 
TotalAbsoluteFrequencyType GetTotalFrequency () const
 
AbsoluteFrequencyType GetFrequency (InstanceIdentifier n, unsigned int dimension) const
 
double Quantile (unsigned int dimension, double p) const
 
- Public Member Functions inherited from itk::Statistics::Sample< Array< TMeasurement > >
virtual AbsoluteFrequencyType GetFrequency (InstanceIdentifier id) const =0
 
virtual const
MeasurementVectorType
GetMeasurementVector (InstanceIdentifier id) const =0
 
virtual MeasurementVectorSizeType GetMeasurementVectorSize () const
 
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 ()
 
SmartPointerForwardReference
< ProcessObject
GetSource () const
 
DataObjectPointerArraySizeType GetSourceOutputIndex () const
 
const DataObjectIdentifierTypeGetSourceOutputName () const
 
virtual ModifiedTimeType GetUpdateMTime () const
 
virtual void PrepareForNewData ()
 
virtual void PropagateRequestedRegion ()
 
void ReleaseData ()
 
virtual void ReleaseDataFlagOff ()
 
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 ()
 
virtual bool VerifyRequestedRegion ()
 
void SetPipelineMTime (ModifiedTimeType time)
 
virtual const ModifiedTimeTypeGetPipelineMTime ()
 
virtual void SetRealTimeStamp (RealTimeStamp _arg)
 
virtual const RealTimeStampGetRealTimeStamp ()
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary (void)
 
const MetaDataDictionaryGetMetaDataDictionary (void) 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
 
virtual void Register () const
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
virtual void SetReferenceCount (int)
 
virtual void UnRegister () const
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 Histogram ()
 
void PrintSelf (std::ostream &os, Indent indent) const
 
virtual ~Histogram ()
 
- Protected Member Functions inherited from itk::Statistics::Sample< Array< TMeasurement > >
void PrintSelf (std::ostream &os, Indent indent) const
 
 Sample ()
 
virtual ~Sample ()
 
- Protected Member Functions inherited from itk::DataObject
 DataObject ()
 
virtual void PropagateResetPipeline ()
 
 ~DataObject ()
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
virtual ~Object ()
 
- 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 ()
 

Protected Attributes

SizeType m_Size
 

Private Types

typedef std::vector
< InstanceIdentifier
OffsetTableType
 

Private Member Functions

 Histogram (const Self &)
 
virtual void Initialize ()
 
void operator= (const Self &)
 

Private Attributes

bool m_ClipBinsAtEnds
 
FrequencyContainerPointer m_FrequencyContainer
 
std::vector< std::vector
< MeasurementType > > 
m_Max
 
std::vector< std::vector
< MeasurementType > > 
m_Min
 
unsigned int m_NumberOfInstances
 
OffsetTableType m_OffsetTable
 
IndexType m_TempIndex
 
MeasurementVectorType m_TempMeasurementVector
 

Additional Inherited Members

- Protected Types inherited from itk::LightObject
typedef int InternalReferenceCountType
 

Member Typedef Documentation

template<class TMeasurement = float, class TFrequencyContainer = DenseFrequencyContainer2>
typedef FrequencyContainerType::AbsoluteFrequencyType itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::AbsoluteFrequencyType

Frequency and TotalFrequency value type from superclass

Definition at line 112 of file itkHistogram.h.

template<class TMeasurement = float, class TFrequencyContainer = DenseFrequencyContainer2>
typedef Array< TMeasurement > itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::ArrayType

Definition at line 83 of file itkHistogram.h.

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

Definition at line 129 of file itkHistogram.h.

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

Definition at line 127 of file itkHistogram.h.

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

Definition at line 128 of file itkHistogram.h.

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

bin min max value storage types

Definition at line 126 of file itkHistogram.h.

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

Definition at line 89 of file itkHistogram.h.

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

Definition at line 109 of file itkHistogram.h.

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

frequency container typedef

Definition at line 108 of file itkHistogram.h.

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

Index typedef support. An index is used to access pixel values.

Definition at line 118 of file itkHistogram.h.

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

Definition at line 119 of file itkHistogram.h.

template<class TMeasurement = float, class TFrequencyContainer = DenseFrequencyContainer2>
typedef Superclass::InstanceIdentifier itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::InstanceIdentifier

Definition at line 102 of file itkHistogram.h.

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

type of an element of a measurement vector

Definition at line 95 of file itkHistogram.h.

template<class TMeasurement = float, class TFrequencyContainer = DenseFrequencyContainer2>
typedef Superclass::MeasurementVectorSizeType itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::MeasurementVectorSizeType

Definition at line 103 of file itkHistogram.h.

template<class TMeasurement = float, class TFrequencyContainer = DenseFrequencyContainer2>
typedef Superclass::MeasurementVectorType itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::MeasurementVectorType

Common sample class typedefs

Definition at line 101 of file itkHistogram.h.

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

Definition at line 498 of file itkHistogram.h.

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

Definition at line 88 of file itkHistogram.h.

template<class TMeasurement = float, class TFrequencyContainer = DenseFrequencyContainer2>
typedef FrequencyContainerType::RelativeFrequencyType itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::RelativeFrequencyType

Definition at line 114 of file itkHistogram.h.

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

Standard typedefs

Definition at line 86 of file itkHistogram.h.

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

size array type

Definition at line 122 of file itkHistogram.h.

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

Definition at line 123 of file itkHistogram.h.

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

Definition at line 87 of file itkHistogram.h.

template<class TMeasurement = float, class TFrequencyContainer = DenseFrequencyContainer2>
typedef FrequencyContainerType::TotalAbsoluteFrequencyType itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::TotalAbsoluteFrequencyType

Definition at line 113 of file itkHistogram.h.

template<class TMeasurement = float, class TFrequencyContainer = DenseFrequencyContainer2>
typedef FrequencyContainerType::TotalRelativeFrequencyType itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::TotalRelativeFrequencyType

Definition at line 115 of file itkHistogram.h.

template<class TMeasurement = float, class TFrequencyContainer = DenseFrequencyContainer2>
typedef MeasurementVectorType itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::ValueType

Definition at line 105 of file itkHistogram.h.

Constructor & Destructor Documentation

template<class TMeasurement = float, class TFrequencyContainer = DenseFrequencyContainer2>
itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::Histogram ( )
protected
template<class TMeasurement = float, class TFrequencyContainer = DenseFrequencyContainer2>
virtual itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::~Histogram ( )
inlineprotectedvirtual

Definition at line 489 of file itkHistogram.h.

template<class TMeasurement = float, class TFrequencyContainer = DenseFrequencyContainer2>
itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::Histogram ( const Self )
private

Member Function Documentation

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

Definition at line 463 of file itkHistogram.h.

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

Definition at line 475 of file itkHistogram.h.

template<class TMeasurement = float, class TFrequencyContainer = DenseFrequencyContainer2>
virtual::itk::LightObject::Pointer itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::CreateAnother ( void  ) 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.

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

Definition at line 470 of file itkHistogram.h.

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

Definition at line 482 of file itkHistogram.h.

template<class TMeasurement = float, class 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

template<class TMeasurement = float, class 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.

template<class TMeasurement = float, class 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

template<class TMeasurement = float, class 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.

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

Is set to false if the bins at edges of the histogram extend to +/- infinity.

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

Get the vector of maximums along a dimension

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

Get the vector of bin minimums along a dimension

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

Get the frequency of an instance identifier

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

Get the frequency of an index

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

Get the frequency of a dimension's nth element.

template<class TMeasurement = float, class 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

template<class TMeasurement = float, class 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

template<class TMeasurement = float, class 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

template<class TMeasurement = float, class 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

template<class TMeasurement = float, class 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

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

Method the maximums of the bins

template<class TMeasurement = float, class 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.

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

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

template<class TMeasurement = float, class 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.

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

Get the minimums of the bins

template<class TMeasurement = float, class TFrequencyContainer = DenseFrequencyContainer2>
virtual const char* itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::Statistics::Sample< Array< TMeasurement > >.

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

Get the size (N-dimensional) of the histogram

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

Get the size of histogram along a specified dimension

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

Get the total frequency in the histogram

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

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

Method to graft another histogram's output

Reimplemented from itk::Statistics::Sample< Array< TMeasurement > >.

template<class TMeasurement = float, class 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.

template<class TMeasurement = float, class 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.

template<class TMeasurement = float, class 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.

template<class TMeasurement = float, class 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.

template<class TMeasurement = float, class 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.

template<class TMeasurement = float, class TFrequencyContainer = DenseFrequencyContainer2>
virtual void itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::Initialize ( )
inlineprivatevirtual

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

Reimplemented from itk::DataObject.

Definition at line 505 of file itkHistogram.h.

template<class TMeasurement = float, class 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]

template<class TMeasurement = float, class TFrequencyContainer = DenseFrequencyContainer2>
itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::itkLegacyMacro ( const IndexType &GetIndex(const MeasurementVectorType &measurement)  const)

Get the index of a measurement value from the histogram.

Deprecated:
Use GetIndex(const MeasurementVectorType & measurement, IndexType & index ) const instead.
template<class TMeasurement = float, class TFrequencyContainer = DenseFrequencyContainer2>
double itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::Mean ( unsigned int  dimension) const

Get the mean value for a dimension

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

standard New() method support

template<class TMeasurement = float, class TFrequencyContainer = DenseFrequencyContainer2>
void itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::operator= ( const Self )
private
template<class TMeasurement = float, class TFrequencyContainer = DenseFrequencyContainer2>
void itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
protectedvirtual

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.

template<class TMeasurement = float, class 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 = cumlated 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   
template<class TMeasurement = float, class 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

template<class TMeasurement = float, class 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

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

Set to false to have the bins at edges of the histogram extend to +/- infinity.

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

Set all the bins in the histogram to a specified frequency

template<class TMeasurement = float, class 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.

template<class TMeasurement = float, class 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.

template<class TMeasurement = float, class 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.

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

Initialize the values of the histogram bins to zero

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

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

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

Member Data Documentation

template<class TMeasurement = float, class TFrequencyContainer = DenseFrequencyContainer2>
bool itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::m_ClipBinsAtEnds
private

Definition at line 516 of file itkHistogram.h.

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

Definition at line 500 of file itkHistogram.h.

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

Definition at line 511 of file itkHistogram.h.

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

Definition at line 508 of file itkHistogram.h.

template<class TMeasurement = float, class TFrequencyContainer = DenseFrequencyContainer2>
unsigned int itk::Statistics::Histogram< TMeasurement, TFrequencyContainer >::m_NumberOfInstances
private

Definition at line 501 of file itkHistogram.h.

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

Definition at line 499 of file itkHistogram.h.

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

Definition at line 492 of file itkHistogram.h.

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

Definition at line 514 of file itkHistogram.h.

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

Definition at line 513 of file itkHistogram.h.


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