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

int nclqs = oespicoli.OEMakeConnectedSurfaceCliques(surf);

int maxclq=0;
float maxarea=0.0f;
for (int i=1; i <= nclqs; i++)
{
float area = oespicoli.OESurfaceCliqueArea(surf, i);
if (maxarea < area)
{
maxarea = area;
maxclq = i;
}
}
oespicoli.OESurfaceCropToClique(surf, maxclq);