Public Types | Public Member Functions | Protected Attributes

cmtk::HistogramBase Class Reference
[cmtkBase Library]

Common (non-template) base class for all 1-D histograms. More...

#include <cmtkHistogramBase.h>

Inheritance diagram for cmtk::HistogramBase:
Inheritance graph
[legend]

List of all members.

Public Types

typedef HistogramBase Self
 This class.

Public Member Functions

 HistogramBase ()
 Default constructor.
virtual ~HistogramBase ()
 Virtual destructor.
virtual size_t GetNumBins () const =0
 Return number of histogram bins.
void SetRange (const Types::DataItemRange &range)
 Set data range corresponding to this histogram.
void SetRangeCentered (const Types::DataItemRange &range)
 Set data range corresponding to this histogram with upper and lower bound centered in first and last bin.
const Types::DataItemRange GetRange () const
 Get value range of the distribution.
virtual const Types::DataItemRange GetRangeBin (const size_t bin) const
 Get value range of a given bin.
Types::DataItem GetBinWidth () const
 Get bin width.
virtual size_t ValueToBin (const Types::DataItem value) const
 Return bin corresponding to a certain value of the distribution.
virtual Types::DataItem ValueToBinFractional (const Types::DataItem value) const
 Return fractional bin corresponding to a value of the distribution.
virtual Types::DataItem BinToValue (const size_t bin) const
 Return center of values represented by a certain bin.

Protected Attributes

Types::DataItem m_BinWidth
 Width of data bins.
Types::DataItem m_BinsLowerBound
 Lower value bound of data bins.
Types::DataItem m_BinsUpperBound
 Upper value bound of data bins.

Detailed Description

Common (non-template) base class for all 1-D histograms.

Definition at line 77 of file cmtkHistogramBase.h.


Member Typedef Documentation

This class.

Reimplemented in cmtk::Histogram< T >, cmtk::LogHistogram< T >, and cmtk::Histogram< unsigned int >.

Definition at line 91 of file cmtkHistogramBase.h.


Constructor & Destructor Documentation

cmtk::HistogramBase::HistogramBase (  ) [inline]

Default constructor.

Definition at line 94 of file cmtkHistogramBase.h.

virtual cmtk::HistogramBase::~HistogramBase (  ) [inline, virtual]

Virtual destructor.

Definition at line 101 of file cmtkHistogramBase.h.


Member Function Documentation

virtual Types::DataItem cmtk::HistogramBase::BinToValue ( const size_t  bin ) const [inline, virtual]

Return center of values represented by a certain bin.

Parameters:
binIndex of a bin from the distribution.
Returns:
Average of upper and lower margin values of the given bin.

Reimplemented in cmtk::LogHistogram< T >.

Definition at line 171 of file cmtkHistogramBase.h.

Referenced by cmtk::TypedArrayNoiseEstimatorBrummer::SijbersBiasHat(), cmtk::TypedArrayNoiseEstimatorBrummer::SijbersLogLikelihood(), cmtk::TypedArrayNoiseEstimatorBrummer::TypedArrayNoiseEstimatorBrummer(), and cmtk::TypedArrayNoiseEstimatorNaiveGaussian::TypedArrayNoiseEstimatorNaiveGaussian().

Types::DataItem cmtk::HistogramBase::GetBinWidth (  ) const [inline]

Get bin width.

Definition at line 140 of file cmtkHistogramBase.h.

virtual size_t cmtk::HistogramBase::GetNumBins (  ) const [pure virtual]

Return number of histogram bins.

Implemented in cmtk::Histogram< T >, and cmtk::Histogram< unsigned int >.

const Types::DataItemRange cmtk::HistogramBase::GetRange (  ) const [inline]

Get value range of the distribution.

Definition at line 126 of file cmtkHistogramBase.h.

virtual const Types::DataItemRange cmtk::HistogramBase::GetRangeBin ( const size_t  bin ) const [inline, virtual]

Get value range of a given bin.

Reimplemented in cmtk::LogHistogram< T >.

Definition at line 133 of file cmtkHistogramBase.h.

void cmtk::HistogramBase::SetRange ( const Types::DataItemRange range ) [inline]
void cmtk::HistogramBase::SetRangeCentered ( const Types::DataItemRange range ) [inline]

Set data range corresponding to this histogram with upper and lower bound centered in first and last bin.

Definition at line 117 of file cmtkHistogramBase.h.

References cmtk::Types::Range< T >::m_LowerBound, cmtk::Types::Range< T >::m_UpperBound, and cmtk::Types::Range< T >::Width().

Referenced by cmtk::TemplateArray< T >::GetHistogram().

virtual size_t cmtk::HistogramBase::ValueToBin ( const Types::DataItem  value ) const [inline, virtual]

Return bin corresponding to a certain value of the distribution.

Parameters:
valueA value from the distribution.
Returns:
The index of the bin corresponding to the given value.

Reimplemented in cmtk::LogHistogram< T >.

Definition at line 149 of file cmtkHistogramBase.h.

Referenced by cmtk::TypedArraySimilarity::GetCorrelationRatio(), cmtk::TemplateArray< T >::GetEntropy(), cmtk::TemplateArray< T >::GetHistogram(), cmtk::FilterVolume::RohlfingFilter(), and cmtk::SplineWarpMultiChannelRegistrationFunctional< TMetricFunctional >::UpdateTransformationFixedControlPoints().

virtual Types::DataItem cmtk::HistogramBase::ValueToBinFractional ( const Types::DataItem  value ) const [inline, virtual]

Return fractional bin corresponding to a value of the distribution.

Parameters:
valueA value from the distribution.
Returns:
The index of the fractional bin index corresponding to the given value. This value is an integer if and only if the given value is identical to the lower bound of a bin.

Reimplemented in cmtk::LogHistogram< T >.

Definition at line 161 of file cmtkHistogramBase.h.

Referenced by cmtk::TemplateArray< T >::GetEntropy().


Member Data Documentation

Lower value bound of data bins.

Definition at line 84 of file cmtkHistogramBase.h.

Upper value bound of data bins.

Definition at line 87 of file cmtkHistogramBase.h.

Width of data bins.

Definition at line 81 of file cmtkHistogramBase.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines