Class Watershed

java.lang.Object
qupath.imagej.processing.Watershed

public class Watershed extends Object
Implementation of 2D watershed transform for ImageJ.
Author:
Pete Bankhead
  • 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 background
      maxDistance - maximum expansion distance, in pixels
      conn8 - if true, use 8-connectivity
    • doWatershed

      public static void doWatershed(ImageProcessor ip, ImageProcessor ipLabels, boolean conn8)
      Apply a watershed transform.
      Parameters:
      ip - intensity image
      ipLabels - starting locations
      conn8 - 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 image
      ipLabels - starting locations
      minThreshold - minimum threshold
      conn8 - if true, use 8-connectivity rather than 4-connectivity