Package qupath.lib.roi
Class FastPolygonUnion
java.lang.Object
qupath.lib.roi.FastPolygonUnion
Compute a faster union of large numbers of polygons.
 
This is a sufficiently common requirement, especially with pixel classification, to require its own method.
The algorithm is:
- Extract all polygons from the input.
- Identify intersecting and non-intersecting polygons
- Group all polygons that should potentially be merged, because they intersect (directly or indirectly) with other polygons in the group; each polygon should be represented in only one group
- Union all the polygon groups
- Combine all resulting polygons into a single polygon or multipolygon
- 
Constructor SummaryConstructors
- 
Method Summary
- 
Constructor Details- 
FastPolygonUnionpublic FastPolygonUnion()
 
- 
- 
Method Details- 
unionCompute a union of all polygons contained in an array of geometries. Non-polygon geometries will be ignored.- Parameters:
- geoms-
- Returns:
- the union of polygons, or an empty polygon if no geometries are provided
 
- 
unionCompute a union of all polygons contained in a collection of geometries. Non-polygon geometries will be ignored.- Parameters:
- geoms-
- Returns:
- the union of polygons, or an empty polygon if no geometries are provided
 
 
-