Package qupath.imagej.processing
Class Watershed
java.lang.Object
qupath.imagej.processing.Watershed
Implementation of 2D watershed transform for ImageJ.
- Author:
- Pete Bankhead
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
doWatershed
(ImageProcessor ip, ImageProcessor ipLabels, boolean conn8) Apply a watershed transform.static void
doWatershed
(ImageProcessor ip, ImageProcessor ipLabels, double minThreshold, boolean conn8) Apply an intensity-constrained watershed transform, preventing regions from expanding to pixels below a specified minimum thresholdstatic void
watershedExpandLabels
(ImageProcessor ipLabels, double maxDistance, boolean conn8) Expand non-zero regions in a labeled image up to a maximum distance, using a watershed transform to prevent region merging.
-
Constructor Details
-
Watershed
public Watershed()
-
-
Method Details
-
watershedExpandLabels
public static void watershedExpandLabels(ImageProcessor ipLabels, double maxDistance, boolean conn8) Expand non-zero regions in a labeled image up to a maximum distance, using a watershed transform to prevent region merging. The expansion is performed in-place.- Parameters:
ipLabels
- labeled image, where values ≤ 0 represent the backgroundmaxDistance
- maximum expansion distance, in pixelsconn8
- if true, use 8-connectivity
-
doWatershed
Apply a watershed transform.- Parameters:
ip
- intensity imageipLabels
- starting locationsconn8
- if true, use 8-connectivity rather than 4-connectivity
-
doWatershed
public static void doWatershed(ImageProcessor ip, ImageProcessor ipLabels, double minThreshold, boolean conn8) Apply an intensity-constrained watershed transform, preventing regions from expanding to pixels below a specified minimum threshold- Parameters:
ip
- intensity imageipLabels
- starting locationsminThreshold
- minimum thresholdconn8
- if true, use 8-connectivity rather than 4-connectivity
-