Woolz Image Processing  Version 1.8.3
WlzImageArithmetic.c File Reference

Functions for performing arithmetic on a pair of domain objects with grey values. More...

Typedefs

typedef void(* WlzBinaryOperatorFn) (WlzGreyP, WlzGreyP, int)
 

Functions

WlzObjectWlzImageArithmetic (WlzObject *obj0, WlzObject *obj1, WlzBinaryOperatorType op, int overwrite, WlzErrorNum *dstErr)
 Performs arithmetic on a pair of domain objects. If the overwrite flag is set and the grey values of the object to be overwritten are of the wrong type then the returned object has new values as though the overwrite flag was not set. More...
 

Detailed Description

Functions for performing arithmetic on a pair of domain objects with grey values.

Author
Bill Hill
Date
March 1999
Version
Id
de3451cfdaaff8b21cbcc779152497112616ae24
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.

Typedef Documentation

◆ WlzBinaryOperatorFn

typedef void(* WlzBinaryOperatorFn) (WlzGreyP, WlzGreyP, int)

Function Documentation

◆ WlzImageArithmetic()

WlzObject* WlzImageArithmetic ( WlzObject obj0,
WlzObject obj1,
WlzBinaryOperatorType  op,
int  overwrite,
WlzErrorNum dstErr 
)

Performs arithmetic on a pair of domain objects. If the overwrite flag is set and the grey values of the object to be overwritten are of the wrong type then the returned object has new values as though the overwrite flag was not set.

Returns
New object or NULL on error.
Parameters
obj0First object.
obj1Second object.
opBinary operator.
overwriteAllow the destination object to share values with one of the given objects if non zero.
  • 0: No values shared.
  • 1: Values shared with obj0.
  • 2: Values shared with obj1.
  • < 0 || > 2: Error condition.
dstErrDestination error pointer, may be NULL.

References _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzObject::type, _WlzCoreValues::type, _WlzObject::values, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_DATA, WLZ_ERR_VALUES_NULL, WLZ_ERR_VALUES_TYPE, WlzAssignObject(), WlzGreyTableIsTiled(), WlzIntersect2(), and WlzMakeEmpty().

Referenced by WlzOffsetDist(), WlzRGBAImageArithmetic(), WlzShadeCorrectBFDF(), and WlzSobel().