OEMakeConnectedSurfaceCliques¶
unsigned int OEMakeConnectedSurfaceCliques(OESurface &surf)
Assigns a different clique value, starting at 1, to each connected
component of the surface. The number of connected components is
returned. Listing
2
demonstrates
cropping a surface to its largest component.
Listing 2: Extracting the largest portion of the surface
uint nclqs = OESpicoli.OEMakeConnectedSurfaceCliques(surf);
uint maxclq = 0;
float maxarea = 0.0f;
for (uint i = 1; i <= nclqs; i++)
{
float area = OESpicoli.OESurfaceCliqueArea(surf, i);
if (maxarea < area)
{
maxarea = area;
maxclq = i;
}
}
OESpicoli.OESurfaceCropToClique(surf, maxclq);