DIPlib Documentation - ©1995-2017 Quantitative Imaging Group, Delft University of Technology.

ExponentialFitCorrection

Exponential fit based attenuation correction

SYNOPSIS

#include "dip_microscopy.h"

dip_Error dip_ExponentialFitCorrection ( in, out, method, percentile, fromWhere, hysteresis, varWeighted )

DATA TYPES

binary, integer, float

FUNCTION

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.

ARGUMENTS

Data typeNameDescription
dip_ImageinInput image
dip_ImageoutOutput image
dipf_ExpFitDatamethodData statistic to fit on
dip_floatpercentilePercentile
dipf_ExpFitStartfromWhereFrom where to start the fit
dip_floathysteresisFirst maximum hysteresis
dip_BooleanvarWeightedFit with variance weights

The dipf_ExpFitData enumaration consists of the following flags:

NameDescription
DIP_ATTENUATION_EXP_FIT_DATA_MEANFit on the mean values
DIP_ATTENUATION_EXP_FIT_DATA_PERCENTILEFit on the specified percentile of the data

The dipf_ExpFitStart enumaration consists of the following flags:

NameDescription
DIP_ATTENUATION_EXP_FIT_START_FIRST_PIXELStart fit on first pixel
DIP_ATTENUATION_EXP_FIT_START_GLOBAL_MAXIMUMStart fit on global maximum
DIP_ATTENUATION_EXP_FIT_START_FIRST_MAXIMUMStart fit on first maximum

LITERATURE

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.

AUTHOR

Karel Strasters, adapted to DIPlib by Geert van Kempen.

SEE ALSO

AttenuationCorrection, SimulatedAttenuation