Woolz Image Processing Version 1.4.0
WlzBinaryOps

Modules

 WlzScalarBinaryOp

Files

file  Wlz2DContains.c
 

Takes a WLZ_2D_DOMAINOBJ, calls WlzLabel to split the domain and returns the one containing point(x,y).


file  WlzIntersect2.c
 

Calculates the intersection between two domain objects.


file  WlzIntersect3d.c
 

Intersection (set intersection) routines for domain objects.


file  WlzIntersectN.c
 

Intersection of N woolz domain objects.


file  WlzLabel.c
 

Segments a domain object into disconnected regions.


file  WlzLabel3d.c
 

Segments a 3D object, called from WlzLabel().


file  WlzRegConCalc.c
 

Computes region connected calculus spatial classifications.


file  WlzSplitObj.c
 

Functions to split a single object into component objects.


file  WlzUnion2.c
 

Convenience function to calculate the union of two domain objects.


file  WlzUnion3d.c
 

Computes the set union of 3D objects.


file  WlzUnionN.c
 

Computes the set union of N objects.


Functions

WlzObjectWlz2DContains (WlzObject *obj, double x, double y, WlzErrorNum *dstErr)
 Takes a WLZ_2D_DOMAINOBJ, calls WlzLabel to split the domain and returns the one containing point(x,y).
WlzObjectWlzIntersect2 (WlzObject *obj1, WlzObject *obj2, WlzErrorNum *dstErr)
 Calculate the set intersection between two domain objects. This is a convenience routine calling WlzIntersectN with uvt=0. Input objects must be domain objects of the same type (2D or 3D) and non-NULL. Type WLZ_EMPTY_OBJ is legal, clearly an empty domain will be returned.
WlzObjectWlzIntersect3d (WlzObject **objs, int n, int uvt, WlzErrorNum *wlzErr)
 Calculate the intersection betweena a list of 3D objects. Should not be used directly but is intended as a static procedure called from WlzIntersectN().
WlzObjectWlzIntersectN (int n, WlzObject **objs, int uvt, WlzErrorNum *dstErr)
 Calculate the intersection of a set of objects. If uvt=0 calculate domain only, uvt=1 calculate the mmean grey-value at each point. Input objects must be all non-NULL and domain objects of the same type i.e. either 2D or 3D otherwise an error is returned.
WlzErrorNum WlzLabel (WlzObject *obj, int *mm, WlzObject ***dstArrayObjs, int maxNumObjs, int ignlns, WlzConnectType connect)
 Segment a domain into connected parts. Connectivity is defined by the connect parameter and can be 4- or 8-connected for 2D objects and 6-, 18- or 26-connected for 3D objects. Note this version requires that there is sufficient space in the objects array defined by maxNumObjs and this is not extended. This should be changed in future so that the array is extended as required.
WlzErrorNum WlzLabel3d (WlzObject *obj, int *numobj, WlzObject **objlist, int nobj, int ignlns, WlzConnectType connect)
 Segment a 3D object. This is a private routine for WlzLabel() and should not be called directly.
WlzRegConRCC8 WlzRegConCalcRCC8 (WlzObject *obj0, WlzObject *obj1, double *dstNrmVol, WlzErrorNum *dstErr)
 The given pair of spatial domain objects are classified using the RCC8. For an explanation of RCC8 classifications see the type definition WlzRegConRCC8 and the paper: D.A. Randell, etal, "Discrete Mereotopology for Spatial Reasoning in Automated Histological Image Analysis", PAMI 35(3) 2013. The classification is performed using simple combinations of the Woolz union, intersection and difference morphological operators:

\begin{eqnarray*} C_0 &=& O_0 \cap O_1 \\ C_1 &=& O_0^+ \cap O_1 \\ C_2 &=& (O_0 \cup O_1) \oplus o_0 \\ C_3 &=& (O_0 \cup O_1) \oplus o_1 \\ C_4 &=& (O_0^+ \cup O_1) \oplus o_0 \\ C_5 &=& (O_0 \cup O_1^+) \oplus o_1 \end{eqnarray*}

where $O^+$ indicates the dilation of $O$.

WlzErrorNum WlzSplitObj (WlzObject *refObj, WlzObject *ppObj, int bWidth, double bgdFrac, double sigma, WlzCompThreshType compThrMethod, int nReqComp, int *dstNComp, WlzObject ***dstComp)
 Splits the reference object into component objects cliped from the reference object, with the bounding box of each of the component objects determined using the pre-processed object. The component objects are returned in size order.
WlzErrorNum WlzSplitMontageObj (WlzObject *mObj, WlzPixelV gapV, double tol, int bWidth, WlzLong minArea, int maxComp, int *dstNComp, WlzObject ***dstComp)
 Splits the given montage object into component objects clipped from the montage object. The montage object must be composed of component images embedded in a background, with little variation in the background values.
WlzObjectWlzUnion2 (WlzObject *obj1, WlzObject *obj2, WlzErrorNum *dstErr)
 Convenience procedure to calculate the union of two woolz domain objects. This calls WlzUnnionN() with uvt=0. Objects must be of the same type.
WlzObjectWlzUnion3d (int n, WlzObject **objs, int uvt, WlzErrorNum *dstErr)
 Private routine used by WlzUnionN() for 3D objects.
WlzObjectWlzUnionN (int n, WlzObject **objs, int uvt, WlzErrorNum *dstErr)
 Calculate the set union of an array of domain objects. Domians only unless uvt non-zero in which case make an average grey table. Note background values are used in the averaging process. All objects must be domain objects of the same type (2D or 3D) unless WLZ_EMPTY_OBJ, NULL input objects are an error.

Function Documentation

WlzObject* Wlz2DContains ( WlzObject obj,
double  x,
double  y,
WlzErrorNum dstErr 
)

Takes a WLZ_2D_DOMAINOBJ, calls WlzLabel to split the domain and returns the one containing point(x,y).

Returns:
Object containing the point (x,y).
Parameters:
objGiven WLZ_2D_DOMAINOBJ object.
xColumn coordinate.
yLine coordinate.
dstErrDestination error code pointer, may be NULL.

References _WlzObject::type, WLZ_2D_DOMAINOBJ, WLZ_8_CONNECTED, WLZ_ERR_NONE, WlzCopyObject(), WlzFreeObj(), WlzInsideDomain(), and WlzLabel().

WlzObject* WlzIntersect2 ( WlzObject obj1,
WlzObject obj2,
WlzErrorNum dstErr 
)

Calculate the set intersection between two domain objects. This is a convenience routine calling WlzIntersectN with uvt=0. Input objects must be domain objects of the same type (2D or 3D) and non-NULL. Type WLZ_EMPTY_OBJ is legal, clearly an empty domain will be returned.

Returns:
Intersection object with NULL value table
Parameters:
obj1first input object
obj2second input object
dstErrerror return.
Source:
WlzIntersect2.c

References WlzIntersectN().

Referenced by WlzCCorS2D(), WlzDistanceTransform(), WlzEMAPDomainTransform(), WlzGreyMask(), WlzGreyMeanDifference(), WlzGreyTemplate(), WlzGreyTransfer(), WlzHyThreshold(), WlzImageArithmetic(), WlzPatchTreeToObject(), WlzProj3DToSection(), WlzRegConCalcRCC8(), and WlzRGBAMultiThreshold().

WlzObject* WlzIntersect3d ( WlzObject **  objs,
int  n,
int  uvt,
WlzErrorNum wlzErr 
)

Calculate the intersection betweena a list of 3D objects. Should not be used directly but is intended as a static procedure called from WlzIntersectN().

Returns:
The intersection object with new value table as required. Empty intersection is returned as a WLZ_EMPTY_OBJ, NULL on error
Parameters:
objslist of objects to be included in the intersection
nnumber of input objects
uvtcopy grey values flag, 0 do not copy, 1 copy.
wlzErrerror return.
Source:
WlzIntersect3d.c

References AlcFree(), AlcMalloc(), _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzDomain::i, _WlzGreyV::inv, _WlzPlaneDomain::lastpl, _WlzDomain::p, _WlzVoxelValues::plane1, _WlzPlaneDomain::plane1, _WlzObject::type, _WlzPixelV::type, _WlzPlaneDomain::type, _WlzPixelV::v, _WlzValues::v, _WlzObject::values, _WlzVoxelValues::values, _WlzValues::vox, _WlzPlaneDomain::voxel_size, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_TYPE, WLZ_GREY_INT, WLZ_PLANEDOMAIN_DOMAIN, WlzAssignDomain(), WlzAssignValues(), WlzFreeObj(), WlzIntersectN(), WlzIsEmpty(), WlzMakeEmpty(), WlzMakeMain(), WlzMakePlaneDomain(), WlzMakeVoxelValueTb(), and WlzStandardPlaneDomain().

Referenced by WlzIntersectN().

WlzObject* WlzIntersectN ( int  n,
WlzObject **  objs,
int  uvt,
WlzErrorNum dstErr 
)

Calculate the intersection of a set of objects. If uvt=0 calculate domain only, uvt=1 calculate the mmean grey-value at each point. Input objects must be all non-NULL and domain objects of the same type i.e. either 2D or 3D otherwise an error is returned.

Returns:
Intersection object with grey-table as required, if the intersection is empty returns WLZ_EMPTY_OBJ, NULL on error.
Parameters:
nnumber of input objects
objsinput object array
uvtgrey-table copy flag (1 - copy, 0 - no copy)
dstErrerror return.
Source:
WlzIntersectN.c

References AlcFree(), AlcFreeStackPush(), AlcMalloc(), _WlzValues::core, _WlzGreyP::dbp, _WlzGreyV::dbv, _WlzObject::domain, _WlzGreyP::flp, _WlzGreyV::flv, _WlzIntervalDomain::freeptr, _WlzDomain::i, _WlzGreyP::inp, _WlzGreyV::inv, _WlzIntervalDomain::kol1, _WlzIntervalDomain::lastkl, _WlzIntervalDomain::lastln, _WlzIntervalWSpace::lftpos, _WlzIntervalDomain::line1, _WlzIntervalWSpace::linpos, _WlzIntervalWSpace::linrmn, _WlzGreyWSpace::pixeltype, _WlzGreyP::rgbp, _WlzGreyV::rgbv, _WlzIntervalWSpace::rgtpos, _WlzGreyP::shp, _WlzGreyV::shv, _WlzCoreValues::type, _WlzGreyWSpace::u_grintptr, _WlzGreyP::ubp, _WlzGreyV::ubv, _WlzValues::v, _WlzObject::values, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_EMPTY_OBJ, WLZ_ERR_EOO, WLZ_ERR_GREY_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_TAB_RAGR, WLZ_GREY_UBYTE, WLZ_INTERVALDOMAIN_INTVL, WLZ_RASTERDIR_ILIC, WlzAssignValues(), WlzFreeIntervalDomain(), WlzFreeObj(), WlzGetBackground(), WlzGreyTableType(), WlzGreyTableTypeToGreyType(), WlzInitGreyScan(), WlzInitRasterScan(), WlzIntersect3d(), WlzIntervalCount(), WlzIsEmpty(), WlzMakeEmpty(), WlzMakeInterval(), WlzMakeIntervalDomain(), WlzMakeMain(), WlzNewValueTb(), WlzNextGreyInterval(), WlzNextInterval(), and WlzStandardIntervalDomain().

Referenced by WlzCompoundArrayToScalar(), WlzDistanceTransform(), WlzIntersect2(), WlzIntersect3d(), WlzNMSuppress(), and WlzNObjGreyStats().

WlzErrorNum WlzLabel ( WlzObject obj,
int *  mm,
WlzObject ***  dstArrayObjs,
int  maxNumObjs,
int  ignlns,
WlzConnectType  connect 
)

Segment a domain into connected parts. Connectivity is defined by the connect parameter and can be 4- or 8-connected for 2D objects and 6-, 18- or 26-connected for 3D objects. Note this version requires that there is sufficient space in the objects array defined by maxNumObjs and this is not extended. This should be changed in future so that the array is extended as required.

Returns:
Error number.
Parameters:
objinput object to be segmented
mmnumber of objects return
dstArrayObjsobject array return, allocated in the procedure.
maxNumObjsmaximum number of object to return (determines the size of the array)
ignlnsignore objects with num lines <= ignlns
connectconnectivity to determine connected regions
Source:
WlzLabel.c

References WlzLAllocBuf::a_int, WlzLAllocBuf::a_link, AlcCalloc(), AlcFree(), AlcFreeStackPush(), AlcMalloc(), _WlzDomain::core, _WlzObject::domain, _WlzIntervalDomain::freeptr, _WlzDomain::i, _WlzInterval::ileft, _WlzLLink::intv, _WlzInterval::iright, _WlzLLink::l_link, _WlzLLink::l_u, _WlzIntervalDomain::lastln, _WlzIntervalWSpace::lftpos, _WlzLLink::line, _WlzIntervalDomain::line1, _WlzIntervalWSpace::linpos, _WlzIntervalWSpace::rgtpos, _WlzCoreDomain::type, _WlzObject::type, _WlzLLink::u_link, _WlzValues::v, _WlzObject::values, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_4_CONNECTED, WLZ_8_CONNECTED, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_INT_DATA, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_INTERVALDOMAIN_INTVL, WLZ_INTERVALDOMAIN_RECT, WLZ_RASTERDIR_ILIC, WLZ_TRANS_OBJ, WlzAssignObject(), WlzInitRasterScan(), WlzLabel3d(), WlzMakeInterval(), WlzMakeIntervalDomain(), WlzMakeMain(), and WlzNextInterval().

Referenced by Wlz2DContains(), WlzLabel3d(), WlzPolyToObj(), WlzSplitMontageObj(), and WlzSplitObj().

WlzErrorNum WlzLabel3d ( WlzObject obj,
int *  numobj,
WlzObject **  objlist,
int  nobj,
int  ignlns,
WlzConnectType  connect 
)

Segment a 3D object. This is a private routine for WlzLabel() and should not be called directly.

Returns:
Error number.
Parameters:
objInput object to be segmented.
numobjNumber of objects found.
objlistArray of object pointers.
nobjMaximum number of objects in array.
ignlnsignore objects with num. line <= ignlns.
connectConnectivity of segmented objects.
Source:
WlzLabel3d.c

References AlcFree(), AlcMalloc(), _WlzDomain::core, _WlzValues::core, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzPlaneDomain::lastpl, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzPlaneDomain::type, _WlzVoxelValues::values, _WlzObject::values, _WlzValues::vox, WLZ_18_CONNECTED, WLZ_26_CONNECTED, WLZ_2D_DOMAINOBJ, WLZ_4_CONNECTED, WLZ_6_CONNECTED, WLZ_8_CONNECTED, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PLANEDOMAIN_TYPE, WLZ_PLANEDOMAIN_DOMAIN, WlzAssignObject(), WlzFreeObj(), WlzLabel(), and WlzMakeMain().

Referenced by WlzLabel().

WlzRegConRCC8 WlzRegConCalcRCC8 ( WlzObject obj0,
WlzObject obj1,
double *  dstNrmVol,
WlzErrorNum dstErr 
)

The given pair of spatial domain objects are classified using the RCC8. For an explanation of RCC8 classifications see the type definition WlzRegConRCC8 and the paper: D.A. Randell, etal, "Discrete Mereotopology for Spatial Reasoning in Automated Histological Image Analysis", PAMI 35(3) 2013. The classification is performed using simple combinations of the Woolz union, intersection and difference morphological operators:

\begin{eqnarray*} C_0 &=& O_0 \cap O_1 \\ C_1 &=& O_0^+ \cap O_1 \\ C_2 &=& (O_0 \cup O_1) \oplus o_0 \\ C_3 &=& (O_0 \cup O_1) \oplus o_1 \\ C_4 &=& (O_0^+ \cup O_1) \oplus o_0 \\ C_5 &=& (O_0 \cup O_1^+) \oplus o_1 \end{eqnarray*}

where $O^+$ indicates the dilation of $O$.

Returns:
RCC8 classification of the given objects.
Basic Morphological Operations for RCC8 Spatial Relationships
RCC8 $C_0$ $C_1$ $C_2$ $C_3$ $C_4$ $C_5$ Normalised Volume
$DC(O_0,O_1)$ 0 0 - - - - 0.0
$EC(O_0,O_1)$ 0 1 - - - - 0.0
$EQ(O_0,O_1)$ 1 - 0 0 - - 1.0
$PO(O_0,O_1)$ 1 - 1 1 - - $V(O_0 \cap O_1)/V(O_0 \cup O_1)$
$TPP(O_0,O_1)$ 1 - 1 0 - 1 $V(O_0)/V(O_0 \cup O_1)$
$NTPP(O_0,O_1)$ 1 - 1 0 - 0 $V(O_0)/V(O_0 \cup O_1)$
$TPPI(O_0,O_1)$ 1 - 0 1 1 - $V(O_1)/V(O_0 \cup O_1)$
$NTPPI(O_0,O_1)$ 1 - 0 1 0 - $V(O_1)/V(O_0 \cup O_1)$
Parameters:
obj0First given spatial domain object.
obj1Second given spatial domain object.
dstNrmVolDestination pointer for the normalized volume (see above), may be NULL.
dstErrDestination error pointer, may be NULL.

References _WlzDomain::core, _WlzObject::domain, _WlzObject::type, WLZ_8_CONNECTED, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_DATA, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_REGCON_RCC8_DC, WLZ_REGCON_RCC8_EC, WLZ_REGCON_RCC8_EQ, WLZ_REGCON_RCC8_NTPP, WLZ_REGCON_RCC8_PO, WLZ_REGCON_RCC8_TPP, WlzDiffDomain(), WlzDilation(), WlzFreeObj(), WlzIntersect2(), WlzIsEmpty(), WlzUnion2(), and WlzVolume().

WlzErrorNum WlzSplitObj ( WlzObject refObj,
WlzObject ppObj,
int  bWidth,
double  bgdFrac,
double  sigma,
WlzCompThreshType  compThrMethod,
int  nReqComp,
int *  dstNComp,
WlzObject ***  dstComp 
)

Splits the reference object into component objects cliped from the reference object, with the bounding box of each of the component objects determined using the pre-processed object. The component objects are returned in size order.

Returns:
Woolz error code.
Parameters:
refObjReference object.
ppObjPre-processed object which is normalised to values in the range 0 - 255 as WlzUByte greys.
bWidthBorder width.
bgdFracMinimum fraction of values which are background values, with range [0.0+ - 1.0-].
sigmaHistogram smoothing parameter used by WlzHistogramCnvGauss().
compThrMethodMethod for computing threshold, used in call to WlzCompThresholdVT().
nReqCompNumber of required components.
dstNCompDestination pointer for the number of components extracted, must not be NULL.
dstCompDestination pointer for the extracted components, must not be NULL.

References AlcCalloc(), AlcFree(), AlcMalloc(), AlgQSort(), _WlzSplitObjData::compI, _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzBox::i2, _WlzBox::i3, _WlzSplitObjData::lComp, _WlzSplitObjData::lCompSz, _WlzSplitObjData::nLComp, _WlzObject::type, _WlzObject::values, WLZ_0_CONNECTED, WLZ_26_CONNECTED, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_8_CONNECTED, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_DATA, WLZ_ERR_PARAM_NULL, WLZ_ERR_VALUES_NULL, WlzArea(), WlzAssignObject(), WlzBoundingBox2I(), WlzBoundingBox3I(), WlzClipObjToBox2D(), WlzClipObjToBox3D(), WlzCompThresholdVT(), WlzFreeObj(), WlzHistogramCnvGauss(), WlzHistogramObj(), WlzLabel(), WlzThreshold(), WlzVolume(), _WlzIBox3::xMax, _WlzIBox2::xMax, _WlzIBox3::xMin, _WlzIBox2::xMin, _WlzIBox3::yMax, _WlzIBox2::yMax, _WlzIBox3::yMin, _WlzIBox2::yMin, _WlzIBox3::zMax, and _WlzIBox3::zMin.

WlzErrorNum WlzSplitMontageObj ( WlzObject mObj,
WlzPixelV  gapV,
double  tol,
int  bWidth,
WlzLong  minArea,
int  maxComp,
int *  dstNComp,
WlzObject ***  dstComp 
)

Splits the given montage object into component objects clipped from the montage object. The montage object must be composed of component images embedded in a background, with little variation in the background values.

Returns:
Woolz error code.
Parameters:
mObjMontage object, which must be either a WLZ_2D_DOMAINOBJ or a WLZ_3D_DOMAINOBJ with values.
gapVValue for the uniform background. Must be either WLZ_GREY_INT or WLZ_GREY_RGBA.
tolTolerance (fraction) for the variation in background values.
bWidthAdditional boundary width added to detected images before they are clipped.
minAreaMinimum area for a valid component image, must be greater than zero.
maxCompMaximum number of components.
dstNCompDestination pointer for the number of components extracted, must not be NULL.
dstCompDestination pointer for the extracted components, must not be NULL.

References _WlzBox::i2, _WlzBox::i3, _WlzGreyV::inv, _WlzGreyV::rgbv, _WlzPixelV::type, _WlzObject::type, _WlzPixelV::v, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_4_CONNECTED, WLZ_6_CONNECTED, WLZ_CLAMP, WLZ_ERR_GREY_TYPE, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_DATA, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_RGBA_BLUE_GET, WLZ_RGBA_GREEN_GET, WLZ_RGBA_RED_GET, WLZ_RGBA_RGBA_SET, WLZ_THRESH_HIGH, WLZ_THRESH_LOW, WlzArea(), WlzBoundingBox2I(), WlzBoundingBox3I(), WlzClipObjToBox2D(), WlzClipObjToBox3D(), WlzDiffDomain(), WlzFreeObj(), WlzGreyTypeFromObj(), WlzLabel(), WlzRGBABoxThreshold(), WlzThreshold(), WlzValueConvertPixel(), WlzVolume(), _WlzIBox3::xMax, _WlzIBox2::xMax, _WlzIBox3::xMin, _WlzIBox2::xMin, _WlzIBox3::yMax, _WlzIBox2::yMax, _WlzIBox3::yMin, _WlzIBox2::yMin, _WlzIBox3::zMax, and _WlzIBox3::zMin.

WlzObject* WlzUnion2 ( WlzObject obj1,
WlzObject obj2,
WlzErrorNum dstErr 
)

Convenience procedure to calculate the union of two woolz domain objects. This calls WlzUnnionN() with uvt=0. Objects must be of the same type.

Returns:
Union object pointer.
Source:
WlzUnion2.c
Parameters:
obj1First inout object.
obj2Second input object.
dstErrerrro return.

References WlzUnionN().

Referenced by WlzBoundToObj(), WlzCCorS2D(), WlzEMAPDomainTransform(), WlzFillBlankPlanes(), WlzHyThreshold(), WlzMakeMarkers(), WlzPointsToDomObj(), WlzProj3DToSection(), WlzRegConCalcRCC8(), and WlzRGBAMultiThreshold().

WlzObject* WlzUnionN ( int  n,
WlzObject **  objs,
int  uvt,
WlzErrorNum dstErr 
)

Calculate the set union of an array of domain objects. Domians only unless uvt non-zero in which case make an average grey table. Note background values are used in the averaging process. All objects must be domain objects of the same type (2D or 3D) unless WLZ_EMPTY_OBJ, NULL input objects are an error.

This function may modify the order of the objects in the array it is passed if the array contains empty objects.

Returns:
Union of the array of object.
Parameters:
nnumber of input objects
objsinput object array
uvtgrey-table copy flag, copy if non-zero.
dstErrerror return.
Source:
WlzUnionN.c

References AlcFree(), AlcFreeStackPush(), AlcMalloc(), _WlzValues::core, _WlzGreyP::dbp, _WlzGreyV::dbv, _WlzObject::domain, _WlzGreyP::flp, _WlzGreyV::flv, _WlzIntervalDomain::freeptr, _WlzDomain::i, _WlzInterval::ileft, _WlzGreyP::inp, _WlzGreyV::inv, _WlzInterval::iright, _WlzIntervalDomain::kol1, _WlzIntervalDomain::lastkl, _WlzIntervalDomain::lastln, _WlzIntervalWSpace::lftpos, _WlzIntervalDomain::line1, _WlzIntervalWSpace::linpos, _WlzIntervalWSpace::linrmn, _WlzGreyWSpace::pixeltype, _WlzGreyP::rgbp, _WlzGreyV::rgbv, _WlzIntervalWSpace::rgtpos, _WlzGreyP::shp, _WlzGreyV::shv, _WlzCoreValues::type, _WlzKrigModelFn::type, _WlzGreyWSpace::u_grintptr, _WlzGreyP::ubp, _WlzValues::v, _WlzObject::values, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_EMPTY_OBJ, WLZ_ERR_GREY_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_DATA, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_TAB_RAGR, WLZ_GREY_UBYTE, WLZ_INTERVALDOMAIN_INTVL, WLZ_RASTERDIR_ILIC, WLZ_TRANS_OBJ, WlzAssignValues(), WlzFreeIntervalDomain(), WlzFreeObj(), WlzGetBackground(), WlzGreyTableType(), WlzGreyTableTypeToGreyType(), WlzInitGreyScan(), WlzInitRasterScan(), WlzIntervalCount(), WlzIsEmpty(), WlzMakeEmpty(), WlzMakeInterval(), WlzMakeIntervalDomain(), WlzMakeMain(), WlzNewValueTb(), WlzNextGreyInterval(), WlzNextInterval(), and WlzUnion3d().

Referenced by Wlz3DSectionOcc(), WlzDomainOccupancy(), WlzIndexObjFromCompound(), WlzPatchTreeToObject(), WlzPolyToObj(), WlzRegisterPatchTreeBF(), WlzUnion2(), and WlzUnion3d().