Class MarkerControlledWatershed3DPlugin

java.lang.Object
inra.ijpb.plugins.MarkerControlledWatershed3DPlugin
All Implemented Interfaces:
ij.plugin.PlugIn

public class MarkerControlledWatershed3DPlugin
extends java.lang.Object
implements ij.plugin.PlugIn
A plugin to perform marker-controlled watershed on a 2D or 3D image. References: [1] Fernand Meyer and Serge Beucher. "Morphological segmentation." Journal of visual communication and image representation 1.1 (1990): 21-46. [2] Peer Neubert and Peter Protzel. "Compact Watershed and Preemptive SLIC: On improving trade-offs of superpixel segmentation algorithms." 22nd international conference on pattern recognition. IEEE, 2014.
Author:
Ignacio Arganda-Carreras
  • Field Summary

    Fields
    Modifier and Type Field Description
    static boolean binaryMarkers
    flag set to TRUE if markers are binary, to FALSE if markers are labels
    static double compactness
    compactness constraint, c parameter in compact watershed algorithm [2]
    static boolean getDams
    flag to calculate watershed dams
    static boolean use26neighbors
    flag to use 26-connectivity
  • Constructor Summary

    Constructors
    Constructor Description
    MarkerControlledWatershed3DPlugin()  
  • Method Summary

    Modifier and Type Method Description
    ij.ImagePlus process​(ij.ImagePlus input, ij.ImagePlus marker, ij.ImagePlus mask, int connectivity)
    Apply marker-controlled watershed to a grayscale 2D or 3D image.
    ij.ImagePlus process​(ij.ImagePlus input, ij.ImagePlus marker, ij.ImagePlus mask, int connectivity, double compactness)
    Apply marker-controlled watershed to a grayscale 2D or 3D image.
    void run​(java.lang.String arg)
    Plugin run method to be called from ImageJ

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • binaryMarkers

      public static boolean binaryMarkers
      flag set to TRUE if markers are binary, to FALSE if markers are labels
    • getDams

      public static boolean getDams
      flag to calculate watershed dams
    • use26neighbors

      public static boolean use26neighbors
      flag to use 26-connectivity
    • compactness

      public static double compactness
      compactness constraint, c parameter in compact watershed algorithm [2]
  • Constructor Details

    • MarkerControlledWatershed3DPlugin

      public MarkerControlledWatershed3DPlugin()
  • Method Details

    • process

      public ij.ImagePlus process​(ij.ImagePlus input, ij.ImagePlus marker, ij.ImagePlus mask, int connectivity)
      Apply marker-controlled watershed to a grayscale 2D or 3D image.
      Parameters:
      input - grayscale 2D or 3D image (in principle a "gradient" image)
      marker - the labeled marker image
      mask - binary mask to restrict region of interest
      connectivity - 6 or 26 voxel connectivity
      Returns:
      the resulting watershed
    • process

      public ij.ImagePlus process​(ij.ImagePlus input, ij.ImagePlus marker, ij.ImagePlus mask, int connectivity, double compactness)
      Apply marker-controlled watershed to a grayscale 2D or 3D image.
      Parameters:
      input - grayscale 2D or 3D image (in principle a "gradient" image)
      marker - the labeled marker image
      mask - binary mask to restrict region of interest
      connectivity - 6 or 26 voxel connectivity
      compactness - compactness constraint for compact watershed (set to 0 for classical watershed)
      Returns:
      the resulting watershed
    • run

      public void run​(java.lang.String arg)
      Plugin run method to be called from ImageJ
      Specified by:
      run in interface ij.plugin.PlugIn