Public Member Functions | List of all members
mirtk::Histogram2D< HistogramType > Class Template Reference

#include <Histogram2D.h>

Inheritance diagram for mirtk::Histogram2D< HistogramType >:
Inheritance graph
Collaboration diagram for mirtk::Histogram2D< HistogramType >:
Collaboration graph

Public Member Functions

void Add (int, int, HistogramType=1)
 Add counts to bins.
 
void AddSample (double, double, HistogramType=1)
 Add samples.
 
double BinToValX (int bin) const
 Convert bin index to sample value.
 
double BinToValY (int bin) const
 Convert bin index sample value.
 
double ConditionalMeanXY (int) const
 Calculate conditional mean.
 
double ConditionalMeanYX (int) const
 Calculate conditional mean.
 
double ConditionalProbabilityXY (int, int) const
 Calculate conditional probability p(x|y)
 
double ConditionalProbabilityYX (int, int) const
 Calculate conditional probability p(y|x)
 
double ConditionalVarianceXY (int) const
 Calculate conditional variance.
 
double ConditionalVarianceYX (int) const
 Calculate conditional variance.
 
double CorrelationRatioXY () const
 Calculate correlation ratio.
 
double CorrelationRatioYX () const
 Calculate correlation ratio.
 
double Covariance () const
 Calculate covariance.
 
double CrossCorrelation () const
 Calculate cross correlation.
 
void Delete (int, int, HistogramType=1)
 Delete counts from bins.
 
void DelSample (double, double, HistogramType=1)
 Delete samples.
 
double EntropyX () const
 Calculate marginal entropy.
 
double EntropyY () const
 Calculate marginal entropy.
 
void GetMax (double *, double *) const
 Get maximum value in histogram.
 
void GetMax (double &, double &) const
 Get maximum value in histogram.
 
void GetMin (double *, double *) const
 Get minimum value in histogram.
 
void GetMin (double &, double &) const
 Get minimum value in histogram.
 
void GetNumberOfBins (int *, int *) const
 Get number of bins in x- and y-direction.
 
void GetNumberOfBins (int &, int &) const
 Get number of bins in x- and y-direction.
 
void GetWidth (double *, double *) const
 Get width of bins in histogram.
 
void GetWidth (double &, double &) const
 Get width of bins in histogram.
 
 Histogram2D (const Histogram2D &)
 Construct a histogram from another histogram.
 
 Histogram2D (int nbins_x=256, int nbins_y=256)
 Construct a histogram with 256 bins and samples ranging from 0 to 255.
 
 Histogram2D (double min_x, double max_x, double width_x, double min_y, double max_y, double width_y)
 Construct a histogram for samples ranging from min to max and width.
 
void HistogramX (Histogram1D< HistogramType > &) const
 Compute marginal histogram of X.
 
Histogram1D< HistogramType > HistogramX () const
 Compute marginal histogram of X.
 
void HistogramY (Histogram1D< HistogramType > &) const
 Compute marginal histogram of Y.
 
Histogram1D< HistogramType > HistogramY () const
 Compute marginal histogram of Y.
 
void Initialize (double min_x, double max_x, double width_x, double min_y, double max_y, double width_y)
 Construct a histogram for samples ranging from min to max and width.
 
double JointEntropy () const
 Calculate joint entropy.
 
double JointProbability (int, int) const
 Calculate joint probability p(x, y)
 
double Kappa () const
 Calcualate kappa statistic.
 
double LabelConsistency () const
 Calcualate label consistency.
 
void Log ()
 Log transform histogram.
 
double MarginalProbabilityX (int) const
 Calculate marginal probability p(x)
 
double MarginalProbabilityY (int) const
 Calculate marginal probability p(y)
 
double MaxX () const
 Get maximum value in histogram in x-direction.
 
double MaxY () const
 Get maximum value in histogram in y-direction.
 
double MeanX () const
 Calculate mean.
 
double MeanY () const
 Calculate mean.
 
double MinX () const
 Get minimum value in histogram in x-direction.
 
double MinY () const
 Get minimum value in histogram in y-direction.
 
double MutualInformation () const
 Calculate mutual information.
 
double NormalizedMutualInformation () const
 Calculate normalized mutual information.
 
int NumberOfBins () const
 Get total number of bins.
 
int NumberOfBinsX () const
 Get number of bins in x-direction.
 
int NumberOfBinsY () const
 Get number of bins in x-direction.
 
HistogramType NumberOfSamples () const
 Get number of samples in histogram.
 
void NumberOfSamples (HistogramType)
 Set number of samples in histogram.
 
HistogramType & operator() (int, int)
 Get number of samples in bin(i, j)
 
const HistogramType & operator() (int, int) const
 Get number of samples in bin(i, j)
 
Histogram2Doperator= (const Histogram2D &)
 Assignment operator.
 
void Print () const
 Print histogram.
 
void PutMax (double, double)
 Put maximum value in histogram.
 
void PutMin (double, double)
 Put minimum value in histogram.
 
void PutNumberOfBins (int, int)
 Put number of bins in x- and y-direction.
 
void PutNumberOfBinsX (int)
 Put number of bins in x-direction.
 
void PutNumberOfBinsY (int)
 Put number of bins in x-direction.
 
void PutWidth (double, double)
 Put width of bins in histogram.
 
HistogramType * RawPointer ()
 Get raw pointer to histogram bins.
 
const HistogramType * RawPointer () const
 Get raw pointer to histogram bins.
 
void Read (const char *)
 Read histogram.
 
void Reset ()
 Clear and reset histogram.
 
void Reset (const Histogram2D &)
 Clear and copy histogram.
 
void Smooth ()
 Smooth histogram.
 
Histogram2D< HistogramType > Smoothed (bool=false)
 Get smoothed histogram, optionally with padded boundaries.
 
double StandardDeviationX () const
 Calculate standard deviation.
 
double StandardDeviationY () const
 Calculate standard deviation.
 
double SumsOfSquaredDifferences () const
 Calculate sums of squared differences.
 
Histogram2D< HistogramType > & Transpose ()
 Transpose histogram in place with x and y direction exchanged.
 
Histogram2D< HistogramType > Transposed () const
 Get transposed histogram with x and y direction exchanged.
 
int ValToBinX (double val) const
 Convert sample value to bin index.
 
int ValToBinY (double val) const
 Convert sample value to bin index.
 
double VarianceX () const
 Calculate variance.
 
double VarianceY () const
 Calculate variance.
 
double WidthX () const
 Get width of bins in histogram in x-direction.
 
double WidthY () const
 Get width of bins in histogram in y-direction.
 
void Write (const char *) const
 Write histogram.
 
void WriteAsImage (const char *) const
 Write histogram as 2D image.
 
 ~Histogram2D ()
 Destructor.
 
- Public Member Functions inherited from mirtk::Object
virtual const char * NameOfClass () const =0
 Get name of class, which this object is an instance of.
 
virtual ParameterList Parameter () const
 Get parameter name/value pairs.
 
bool Parameter (const ParameterList &)
 Set parameters from name/value pairs.
 
virtual bool Set (const char *name, const char *value)
 
virtual ~Object ()
 Destructor.
 

Additional Inherited Members

- Static Public Member Functions inherited from mirtk::Object
static const char * NameOfType ()
 Get name of this class type.
 
- Protected Member Functions inherited from mirtk::Object
template<typename... Args>
void Throw (ErrorType err, const char *func, Args... args) const
 
- Static Protected Member Functions inherited from mirtk::Object
template<typename... Args>
static void ThrowStatic (ErrorType err, const char *cls, const char *func, Args... args)
 

Detailed Description

template<class HistogramType>
class mirtk::Histogram2D< HistogramType >

Class for 2D histograms.

Definition at line 36 of file Histogram2D.h.


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