regionUnion
[ XITE Reference Manual | XITE home ]
Name
regionUnion - calculate the union of two regions
Syntax
#include <xite/region.h>
region *regionUnion( region* reg1,
region* reg2, int nc );
Description
regionUnion creates and returns the union of the
two input regions reg1 and reg2. nc specifies
the neighborhood connectedness of the new region:
nc=1 => use reg1->nc
nc=2 => use reg2->nc
nc=4 => use nc = 4-neighbor
nc=8 => use nc = 8-neighbor
If the two regions are not connected, they are simply
copied individually, and connected by setting
copy(reg1)->next = copy(reg2)
- and a pointer to the copy of reg1 is returned.
Return value
The region union,
0 => an error occurred
See also
regionAnalyse(1), regionArea(3),
regionConvexHull(3), regionCreate(3), regionDraw(3),
regionFree(3), regionHisto(3), regionHistoUpdate(3),
regionImoment(3), regionInsertYline(3), regionDeleteYline(3)
regionEndInsert(3), regionXmean(3), regionYmean(3),
regionMean(3), regionXmin(3), regionXmax(3), regionYmin(3),
regionYmax(3), regionMinMax(3), regionCMoment(3),
regionPMoment(3), regionMoment(3),
regionPerform(3), regionPerimeter(3), regionIsPoint(3),
regionPoint(3), regionSearch(3), regionSort(3), regionCopy(3),
regionOverlap(3), regionNeighbor(3), regionVolume(3),
regionYline(3)
Diagnostics
Warning 2 : region argument nil
Error 3 : bad nc argument
Error 4 : malloc failed
Author
Tor L|nnestad, BLAB, ifi, UiO
Example
region *reg1, *reg2, *reg3;
..create reg1 and reg2..
reg3 = regionUnion(reg1, reg2, 4);
Id
$Id: regionUnion.c,v 1.20 1997/01/29 10:45:15 svein Exp $