Class MorphologicalReconstruction

java.lang.Object
qupath.imagej.processing.MorphologicalReconstruction

public class MorphologicalReconstruction extends Object
Implementation of morphological reconstruction for ImageJ.
Author:
Pete Bankhead
  • Constructor Details

    • MorphologicalReconstruction

      public MorphologicalReconstruction()
  • Method Details

    • binaryReconstruction

      public static ByteProcessor binaryReconstruction(ByteProcessor bpMarker, ByteProcessor bpMask, boolean permitMaskChanges)
      Alternative morphological reconstruction (based on ImageJ's FloodFiller) suitable for binary images only.
      Parameters:
      bpMarker -
      bpMask -
      permitMaskChanges -
      Returns:
    • morphologicalReconstruction

      public static boolean morphologicalReconstruction(ImageProcessor ipMarker, ImageProcessor ipMask)
      Apply morphological operation using marker and mask images. The marker image is changed.
      Parameters:
      ipMarker -
      ipMask -
      Returns:
    • validateMarkerMask

      public static boolean validateMarkerMask(ImageProcessor ipMarker, ImageProcessor ipMask)
      Check that marker and mask images have the same size, and ensure that marker pixels are <= mask pixels, making this if necessary.
      Parameters:
      ipMarker -
      ipMask -
      Returns:
    • openingByReconstruction

      public static ImageProcessor openingByReconstruction(ImageProcessor ip, double radius)
      Apply opening by reconstruction, with the specified minimum filter radius.
      Parameters:
      ip -
      radius -
      Returns:
    • closingByReconstruction

      public static ImageProcessor closingByReconstruction(ImageProcessor ip, double radius)
      Apply a morphological closing by reconstruction.
      Parameters:
      ip - ImageProcessor to process
      radius - minimum filter radius
      Returns:
      processed image
    • imposeMinima

      public static void imposeMinima(FloatProcessor fp, Roi roi)
      Ensure that a FloatProcessor only has region minima within a specified Roi, using morphological reconstruction.
      Parameters:
      fp -
      roi -
    • imposeMaxima

      public static void imposeMaxima(FloatProcessor fp, Roi roi)
      Ensure that a FloatProcessor only has region maxima within a specified Roi, using morphological reconstruction.
      Parameters:
      fp -
      roi -
    • imposeMaxima

      public static void imposeMaxima(FloatProcessor fp, ImageProcessor ipMask)
      Ensure that a FloatProcessor only has region maxima within a specified mask, using morphological reconstruction.
      Parameters:
      fp -
      ipMask -
    • findRegionalMaxima

      public static ImageProcessor findRegionalMaxima(ImageProcessor ip, float threshold, boolean outputBinary)
      Find regional maxima using morphological reconstruction.
      Parameters:
      ip - input image
      threshold - the extent to which a maximum must be greater than its surroundings
      outputBinary - if true, the output is a binary image
      Returns: