Woolz Image Processing  Version 1.7.5
WlzShadeCorrect.c File Reference

Shade correction. More...

Functions

WlzObjectWlzShadeCorrect (WlzObject *srcObj, WlzObject *shdObj, double nrmVal, int inPlace, WlzErrorNum *dstErr)
 Shade corrects the given domain object with grey values.

\[ p_i = \frac{n o_i}{s_i} \]

The shade corrected image P with values \(p_i\) is created by applying a correction factor to each image value of the given image O with values \(o_i\). More...

 
WlzObjectWlzShadeCorrectBFDF (WlzObject *srcObj, WlzObject *shdObj, WlzObject *shdDFObj, double nrmVal, int inPlace, WlzErrorNum *dstErr)
 Shade corrects the given domain object with grey values.

\[ p_i = n \frac{(o_i - d_i)}{(s_i - d_i} \]

The shade corrected image P with values \(p_i\) is created by applying a correction factor to each image value of the given image O with values \(o_i\). \(s_i\) and \(d_i\) are the bright and dark-field shade image values respectively. More...

 

Detailed Description

Shade correction.

Author
Bill Hill
Date
January 2001
Version
Id
7bf66f6c3b1fc402ab1846ce55d8355fa9bfd1f3
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

WlzObject* WlzShadeCorrect ( WlzObject srcObj,
WlzObject shdObj,
double  nrmVal,
int  inPlace,
WlzErrorNum dstErr 
)

Shade corrects the given domain object with grey values.

\[ p_i = \frac{n o_i}{s_i} \]

The shade corrected image P with values \(p_i\) is created by applying a correction factor to each image value of the given image O with values \(o_i\).

Returns
Shade corrected object or NULL on error.
Parameters
srcObjGiven object to be shade corrected.
shdObjGiven bright field object.
nrmValNormalization value.
inPlaceModify the grey values of the given object in place if non-zero.
dstErrDestination error pointer, may be null.

References WlzShadeCorrectBFDF().

WlzObject* WlzShadeCorrectBFDF ( WlzObject srcObj,
WlzObject shdObj,
WlzObject shdDFObj,
double  nrmVal,
int  inPlace,
WlzErrorNum dstErr 
)

Shade corrects the given domain object with grey values.

\[ p_i = n \frac{(o_i - d_i)}{(s_i - d_i} \]

The shade corrected image P with values \(p_i\) is created by applying a correction factor to each image value of the given image O with values \(o_i\). \(s_i\) and \(d_i\) are the bright and dark-field shade image values respectively.

Returns
Shade corrected object or NULL on error.
Parameters
srcObjGiven object to be shade corrected.
shdObjGiven bright field object.
shdDFObjGiven dark field object (may be NULL).
nrmValNormalization value.
inPlaceModify the grey values of the given object in place if non-zero.
dstErrDestination error pointer, may be null.

References AlcCalloc(), AlcFree(), _WlzValues::core, _WlzDomain::core, _WlzGreyP::dbp, _WlzObject::domain, _WlzGreyP::flp, _WlzGreyP::inp, _WlzIntervalWSpace::lftpos, _WlzCompoundArray::n, _WlzCompoundArray::o, _WlzValues::obj, _WlzGreyWSpace::pixeltype, _WlzGreyP::rgbp, _WlzIntervalWSpace::rgtpos, _WlzGreyP::shp, _WlzObject::type, _WlzCoreValues::type, _WlzRagRValues::type, _WlzGreyWSpace::u_grintptr, _WlzGreyP::ubp, _WlzValues::v, _WlzObject::values, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_BO_SUBTRACT, WLZ_CLAMP, WLZ_COMPOUND_ARR_1, WLZ_COMPOUND_ARR_2, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_EOO, WLZ_ERR_GREY_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_DATA, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_UNIMPLEMENTED, WLZ_ERR_VALUES_NULL, WLZ_ERR_VALUES_TYPE, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, WLZ_NINT, WLZ_RGBA_BLUE_GET, WLZ_RGBA_GREEN_GET, WLZ_RGBA_RED_GET, WLZ_RGBA_RGBA_SET, WLZ_TRANS_OBJ, WlzFreeObj(), WlzFreeValueTb(), WlzGetBackground(), WlzGreyTableIsTiled(), WlzGreyTableTypeToGreyType(), WlzGreyTypeFromObj(), WlzImageArithmetic(), WlzInitGreyScan(), WlzIntersect2(), WlzMakeCompoundArray(), WlzMakeEmpty(), WlzMakeMain(), WlzNewValueTb(), WlzNextGreyInterval(), and WlzRGBAImageArithmetic().

Referenced by WlzShadeCorrect().