Woolz Image Processing  Version 1.8.3
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
ed367f669cbaed69beb12a8f8c9167588cbaf407
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

◆ WlzShadeCorrect()

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().

◆ 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 _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzObject::type, _WlzCoreValues::type, _WlzObject::values, WLZ_2D_DOMAINOBJ, WLZ_BO_SUBTRACT, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_VALUES_NULL, WLZ_ERR_VALUES_TYPE, WLZ_GREY_RGBA, WlzGreyTableIsTiled(), WlzGreyTypeFromObj(), WlzImageArithmetic(), and WlzRGBAImageArithmetic().

Referenced by WlzShadeCorrect().