Class RegionalExtremaAlgo

java.lang.Object
inra.ijpb.morphology.extrema.RegionalExtremaAlgo
Direct Known Subclasses:
RegionalExtremaByFlooding

public abstract class RegionalExtremaAlgo
extends java.lang.Object
Interface for appying regional extrema (regional minima and maxima). Example of use:

 ImageProcessor image = IJ.getImage().getProcessor();
 RegionalExtremaAlgo algo = new RegionalExtremaByFlooding(); 
 algo.setConnectivity(4);
 algo.setExtremaType(ExtremaType.MAXIMA);
 ImageProcessor result = algo.applyTo(image);
 ImagePlus resPlus = new ImagePlus("Regional Extrema", result); 
 resPlus.show(); 
 
Author:
David Legland
  • Constructor Summary

    Constructors
    Constructor Description
    RegionalExtremaAlgo()
    Creates a new algorithm for computing regional extrema, that computes regional minima with connectivity 4.
    RegionalExtremaAlgo​(ExtremaType extremaType, int connectivity)
    Creates a new algorithm for computing regional extrema, by choosing type of minima and connectivity.
  • Method Summary

    Modifier and Type Method Description
    abstract ij.process.ImageProcessor applyTo​(ij.process.ImageProcessor inputImage)
    Applies this regional extrema algorithm on the image given as argument, and returns the result as a binary image.
    int getConnectivity()
    Returns the connectivity value.
    ExtremaType getExtremaType()
    Returns the type of extrema.
    boolean isProgressVisible()
    Returns the value of progress visibility option.
    void setConnectivity​(int conn)
    Sets the connectivity value.
    void setExtremaType​(ExtremaType extremaType)
    Sets the type of extrema.
    void setProgressVisible​(boolean progressVisible)
    Sets the value of progress visibility option.

    Methods inherited from class java.lang.Object

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

    • RegionalExtremaAlgo

      public RegionalExtremaAlgo()
      Creates a new algorithm for computing regional extrema, that computes regional minima with connectivity 4.
    • RegionalExtremaAlgo

      public RegionalExtremaAlgo​(ExtremaType extremaType, int connectivity)
      Creates a new algorithm for computing regional extrema, by choosing type of minima and connectivity.
      Parameters:
      extremaType - the type of extrema (minima or maxima)
      connectivity - should be 4 or 8
  • Method Details

    • getConnectivity

      public int getConnectivity()
      Returns the connectivity value.
      Returns:
      the connectivity value.
    • setConnectivity

      public void setConnectivity​(int conn)
      Sets the connectivity value.
      Parameters:
      conn - the connectivity value (either 4 or 8).
    • getExtremaType

      public ExtremaType getExtremaType()
      Returns the type of extrema.
      Returns:
      the type of extrema.
    • setExtremaType

      public void setExtremaType​(ExtremaType extremaType)
      Sets the type of extrema.
      Parameters:
      extremaType - the type of extrema.
    • isProgressVisible

      public boolean isProgressVisible()
      Returns the value of progress visibility option.
      Returns:
      the value of progress visibility option.
    • setProgressVisible

      public void setProgressVisible​(boolean progressVisible)
      Sets the value of progress visibility option.
      Parameters:
      progressVisible - the new value of progress visibility option.
    • applyTo

      public abstract ij.process.ImageProcessor applyTo​(ij.process.ImageProcessor inputImage)
      Applies this regional extrema algorithm on the image given as argument, and returns the result as a binary image.
      Parameters:
      inputImage - the image to process
      Returns:
      the result of regional extrema detection