Woolz Image Processing  Version 1.8.3
WlzHistogram.c File Reference

Functions for computing and transforming Woolz histograms domains. More...

Functions

WlzObjectWlzHistogramObj (WlzObject *srcObj, int nBins, double binOrigin, double binSize, WlzErrorNum *dstErrNum)
 Creates a woolz histogram object (with an int histogram domain) using the given 2D or 3D woolz domain object and histogram parameters. If the requested number of bins is zero then the number of bins, the origin and the bin size will be computed as follows: More...
 
WlzObjectWlzHistogramCopy (WlzObject *srcHistObj, WlzObjectType dstType, WlzErrorNum *dstErrNum)
 Copies the given Woolz histogram object to a new one of the required type. More...
 
WlzObjectWlzHistogramRebin (WlzObject *srcHistObj, WlzObjectType dstType, int dstMaxBins, int dstNBins, double dstOrigin, double dstBinSize, WlzErrorNum *dstErrNum)
 Re-bins the given Woolz histogram object to a new one of the required type, number of bins, origin and bin size. More...
 
WlzErrorNum WlzHistogramRsvFilter (WlzObject *histObj, WlzRsvFilter *flt)
 Applies an infinite impulse response (IIR) filter to the histogram object'c bin values. More...
 
WlzErrorNum WlzHistogramConvolve (WlzObject *histObj, int krnSz, double *krn)
 Convolves the given Woolz histogram object's histogram bin values with the given convolution kernel. More...
 
WlzErrorNum WlzHistogramCnvGauss (WlzObject *histObj, double sigma, int deriv)
 Convolves the given Woolz histogram object's histogram bin values with a Gaussian, 1st derivative of Gaussian or 2nd derivative of Gaussian convolution kernel. More...
 
WlzErrorNum WlzHistogramRsvGauss (WlzObject *histObj, double sigma, int deriv)
 Uses an infinite impulse response (IIR) filter to convolve the given Woolz histogram object's bin values with a Gaussian, 1st derivative of Gaussian or 2nd derivative of Gaussian. More...
 
WlzErrorNum WlzHistogramSmooth (WlzObject *histObj, int width)
 Low pass filters the given Woolz histogram object's histogram bin values by convolving them in the space domain with a Gaussian kernel of the given half height full width. More...
 
WlzErrorNum WlzHistogramCummulative (WlzObject *srcHist)
 Modifies the given histogram so that its values are cummulative. More...
 
WlzErrorNum WlzHistogramMapValues (WlzObject *srcObj, WlzObject *mapHistObj, int dither)
 Uses the given mapping histogram with integral bin values to remap the grey values of the given 2D or 3D domain object. The mapping histogram MUST have integral bin values and bins appropriate for all domain object values. More...
 
WlzErrorNum WlzHistogramFindPeaks (WlzObject *histObj, double sigma, double thresh, int *dstFeatSz, int **dstFeat, WlzHistFeature feat)
 Find the peaks and/or troughs of the given histogram. Peaks are found by searching through the 1st derivative (h') of the histogram bin values (h). For a peak. More...
 
WlzErrorNum WlzHistogramFitPeaks (WlzObject *histObj, int numDbn, double smooth, double thresh, double tol, int *dstNumMu, double **dstMu, int *dstNumSigma, double **dstSigma, int *dstNumAlpha, double **dstAlpha, double *dstLL)
 Fit the given Woolz histogram object's histogram bin values using a mixture of Gaussian distributions. More...
 
WlzErrorNum WlzHistogramNorm (WlzObject *histObj, double maxVal)
 Normalise the given Woolz histogram object's histogram bin values to the given range [0-maxVal]. If the given maximum value is 0.0 then the histogram bin values are normalised so that maxVal is equal to the number of bins. More...
 
double WlzHistogramBinSum (WlzHistogramDomain *histDom)
 Computes the sum of the histogram domain's bin values. More...
 
int WlzHistogramBinMax (WlzHistogramDomain *histDom)
 Finds the bin of the histogram domain which has the greatest occupancy. More...
 
double WlzHistogramDistance (WlzObject *histObj0, WlzObject *histObj1, WlzErrorNum *dstErrNum)
 Calculates a distance measure for comparing two histograms. The histogram distance is in the range [0.0 - 1.0] with 1.0 being a perfect match between histograms. The given histograms are not modified. More...
 
WlzErrorNum WlzHistogramMatchObj (WlzObject *srcObj, WlzObject *targetHist, int independentPlanes, int smoothing, double minDist, double maxDist, int dither)
 Modifies the grey values of the given Woolz 2D or 3D domain object so that the resulting object's histogram matches the target histogram object. More...
 
WlzErrorNum WlzHistogramEqualiseObj (WlzObject *srcObj, int smoothing, int dither)
 Modifies the grey values of the given Woolz 2D or 3D domain object so that the resulting object's histogram approximates a uniform histogram. If the specified smoothing is non-zero then the objects histogram is smoothed by WlzHistogramSmooth(). More...
 

Detailed Description

Functions for computing and transforming Woolz histograms domains.

Author
Bill Hill
Date
March 1999
Version
Id
443732a000cee46d25a82dae59e20ba6963bb3ee
Address: MRC Human Genetics Unit, MRC Institute of Genetics and Molecular Medicine, University of Edinburgh, Western General Hospital, Edinburgh, EH4 2XU, UK.
Copyright (C), [2012], The University Court of the University of Edinburgh, Old College, Edinburgh, UK.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Function Documentation

◆ WlzHistogramBinSum()

double WlzHistogramBinSum ( WlzHistogramDomain histDom)

Computes the sum of the histogram domain's bin values.

Returns
Woolz error code.
Parameters
histDomGiven histogram domain.

References _WlzHistogramDomain::binValues, _WlzGreyP::dbp, _WlzGreyP::inp, _WlzHistogramDomain::nBins, _WlzHistogramDomain::type, WLZ_HISTOGRAMDOMAIN_FLOAT, and WLZ_HISTOGRAMDOMAIN_INT.