Common (non-template) base class for all 1-D histograms. More...
#include <cmtkHistogramBase.h>
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. |
Common (non-template) base class for all 1-D histograms.
Definition at line 77 of file cmtkHistogramBase.h.
This class.
Reimplemented in cmtk::Histogram< T >, cmtk::LogHistogram< T >, and cmtk::Histogram< unsigned int >.
Definition at line 91 of file cmtkHistogramBase.h.
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.
virtual Types::DataItem cmtk::HistogramBase::BinToValue | ( | const size_t | bin ) | const [inline, virtual] |
Return center of values represented by a certain bin.
bin | Index of a bin from the distribution. |
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] |
Set data range corresponding to this histogram.
Definition at line 108 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::TypedArraySimilarity::GetCorrelationRatio(), cmtk::TemplateArray< T >::GetEntropy(), cmtk::TemplateArray< T >::GetHistogram(), cmtk::JointHistogram< T >::GetMarginalX(), cmtk::JointHistogram< T >::GetMarginalY(), cmtk::FilterVolume::RohlfingFilter(), and cmtk::SplineWarpMultiChannelRegistrationFunctional< TMetricFunctional >::UpdateTransformationFixedControlPoints().
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.
value | A value from the distribution. |
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.
value | A value from the distribution. |
Reimplemented in cmtk::LogHistogram< T >.
Definition at line 161 of file cmtkHistogramBase.h.
Referenced by cmtk::TemplateArray< T >::GetEntropy().
Types::DataItem cmtk::HistogramBase::m_BinsLowerBound [protected] |
Lower value bound of data bins.
Definition at line 84 of file cmtkHistogramBase.h.
Types::DataItem cmtk::HistogramBase::m_BinsUpperBound [protected] |
Upper value bound of data bins.
Definition at line 87 of file cmtkHistogramBase.h.
Types::DataItem cmtk::HistogramBase::m_BinWidth [protected] |
Width of data bins.
Definition at line 81 of file cmtkHistogramBase.h.