Package qupath.lib.analysis
Class DelaunayTools.Builder
java.lang.Object
qupath.lib.analysis.DelaunayTools.Builder
- Enclosing class:
DelaunayTools
Builder class to create a
DelaunayTools.Subdivision
based on Delaunay triangulation.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build theDelaunayTools.Subdivision
with the current parameters.Specify pixel calibration, which is used to calibrate the x and y coordinates.Specify that the triangulation should be based on ROI centroids.coordinateExtractor
(Function<PathObject, Collection<Coordinate>> coordinateExtractor) Specify a default method of extracting coordinates for triangulation from an object, rather than centroids or the ROI boundary.preferNucleus
(boolean prefer) Specify that the triangulation should be based on nucleus ROIs where possible (only affects cell objects).Specify that the triangulation should be based on ROI boundary coordinates with the default densify factor.roiBounds
(double densify, double erosion) Specify that the triangulation should be based on ROI boundary coordinates with a specified densify factor.
-
Method Details
-
calibration
Specify pixel calibration, which is used to calibrate the x and y coordinates.- Parameters:
cal
- the calibration to use- Returns:
- this builder
-
centroids
Specify that the triangulation should be based on ROI centroids.- Returns:
- this builder
-
roiBounds
Specify that the triangulation should be based on ROI boundary coordinates with the default densify factor.- Returns:
- this builder
-
roiBounds
Specify that the triangulation should be based on ROI boundary coordinates with a specified densify factor.- Parameters:
densify
- how much to 'densify' the coordinates; recommended default value is 4.0 (assuming uncalibrated pixels). Decreasing the value will give a denser (and slower) triangulation; this can achieve more accuracy but also lead to numerical problems. Try adjusting this value only if the default results in errors.erosion
- amount to erode eachGeometry
in pixels. If non-zero, this can fix artifacts occurring at shared boundaries.- Returns:
- this builder
-
preferNucleus
Specify that the triangulation should be based on nucleus ROIs where possible (only affects cell objects).- Parameters:
prefer
- if true, use the nucleus ROI for cell objects where possible- Returns:
- this builder
-
coordinateExtractor
public DelaunayTools.Builder coordinateExtractor(Function<PathObject, Collection<Coordinate>> coordinateExtractor) Specify a default method of extracting coordinates for triangulation from an object, rather than centroids or the ROI boundary.- Parameters:
coordinateExtractor
- the custom coordinate extractor- Returns:
- this builder
-
build
Build theDelaunayTools.Subdivision
with the current parameters.- Returns:
-