regionNeighbor
[ XITE Reference Manual | XITE home ]
Name
regionNeighbor - are two regions neighbors?
Syntax
#include <xite/region.h>
int regionNeighbor( region* reg1, region* reg2,
int* overlap, int* adjacent, int nc );
Description
Returns overlap=TRUE if reg1 and reg2 overlaps,
adjacent=TRUE if the two regions are adjacent
but do not overlap. If the two regions are not
neighbors, both overlap and adjacent are FALSE.
nc, neighborhood connectedness, may be one of:
1 : use the nc value found in reg1
2 : use the nc value found in reg2
4 : use 4-neighbours
8 : use 8-neighbours
Return value
0 => ok
1 => reg1 or reg2 are nil
2 => bad nc value
Diagnostics
Warning 2 : region argument nil
Error 3 : bad nc argument
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),
regionUnion(3), regionOverlap(3), regionVolume(3),
regionYline(3)
Author
Tor L|nnestad, BLAB, ifi, UiO
New algorithm by Otto Milvang
Example
region *reg1, *reg2;
int overlap, adjacent;
..create reg1 and reg2..
regionNeighbor(reg1, reg2, &overlap, &adjacent, 4);
Id
$Id: regionUnion.c,v 1.20 1997/01/29 10:45:15 svein Exp $