Woolz Image Processing  Version 1.8.3
WlzGreyInvertMinMax.c File Reference

Grey value inversion. More...

Functions

WlzErrorNum WlzGreyInvertMinMax (WlzObject *obj, WlzPixelV min, WlzPixelV max)
 Invert the Grey values of an object within a given
range. The supplied min and max values define the grey
transformation by:

\[ g' = g_{max} + g_{min} - g \]

which means that g=gmax gives g'=gmin and g=gmin gives
g'=gmax. This is a generalisation of the original invert and allows for the "normal" inversion of 255-g for byte images. The user must ensure the grey-value type of the given object can hold the result e.g. if the result is
negative. Note it is assumed that min and max have
a grey type which can be converted to the grey-type
of the given image. More...

 

Detailed Description

Grey value inversion.

Author
Margaret Stark
Date
September 2003
Version
Id
8d5cb1382d029722730883d5555826033caf7ad4
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.