Skip to content

Voronoi

The Voronoi command constructs a Voronoi diagram from the centroid positions of a set of input objects. Each Voronoi cell is the region of the image closest to one particular centre point. The resulting cells are stored as objects of the configured output class.

A common use case is approximating cell boundaries from known nucleus positions when no cell-surface stain is available.

Every pixel is assigned to whichever seed's centroid it's closest to, tiling the image into cells

ParameterDescription
CentersObject class whose centroids are used as Voronoi seeds
Center filter classesAdditional classes used to refine which centres are included
MaskAn optional object class used to clip (intersect) the Voronoi cells
Mask filter classesAdditional classes used to refine the clipping mask
Output classObject class assigned to the constructed Voronoi cells
Max radiusMaximum radius of a Voronoi cell (disabled if –1)
UnitSize unit for max radius (px, µm, …)
Exclude areas at edgesDiscard Voronoi cells that touch the image border
Exclude areas without centreDiscard cells that do not contain a seed point after masking

In sparse samples, Voronoi cells can grow arbitrarily large. Setting a Max radius limits cell size to a biologically meaningful maximum. Cells that would exceed the radius are truncated.

When a Mask class is provided (e.g. a cell-area segmentation), Voronoi cells are intersected with the mask. Any cell area outside the mask is discarded.

The Voronoi diagram is named after Georgy Voronoy, “Nouvelles applications des paramètres continus à la théorie des formes quadratiques,” Journal für die reine und angewandte Mathematik, vol. 133, pp. 97-178, 1908, though the concept dates back to Descartes and Dirichlet - it remains one of the most widely used constructions in computational geometry for exactly this kind of “nearest region” partitioning.