Exponential fit based attenuation correction
dip_Error dip_ExponentialFitCorrection ( in, out, method, percentile, fromWhere, hysteresis, varWeighted )
binary, integer, float
This routine implements a simple absorption, reflection and bleaching correction based upon the assumption that the sum of these effects result in a exponential extinction of the signal as a function of depth. Only pixels that are non-zero are taken into account. Depending upon the chosen method, the mean or a percentile of all the non-zero pixels are calculated as a function of the slice number (depth). Then an exponential function is fitted through these slice-representing values. The starting point of the fit is determined by fromWhere. The first maximum is found with point[z+1] > hysteresis * point[z]. If the mean variant is chosen one can chose to apply a variance weighting to the fit.
|Data statistic to fit on
|From where to start the fit
|First maximum hysteresis
|Fit with variance weights
The dipf_ExpFitData enumaration consists of the following flags:
|Fit on the mean values
|Fit on the specified percentile of the data
The dipf_ExpFitStart enumaration consists of the following flags:
|Start fit on first pixel
|Start fit on global maximum
|Start fit on first maximum
K.C. Strasters, H.T.M. van der Voort, J.M. Geusebroek, and A.W.M. Smeulders, "Fast attenuation correction in fluorescence confocal imaging: a recursive approach", BioImaging, vol. 2, no. 2, 1994, 78-92.
Karel Strasters, adapted to DIPlib by Geert van Kempen.