Class MinimaAndMaxima3D

java.lang.Object
inra.ijpb.morphology.MinimaAndMaxima3D

public class MinimaAndMaxima3D
extends java.lang.Object

A collection of static methods for computing regional and extended minima and maxima on 3D stacks. Supports integer and floating-point stacks, in 6 and 26 connectivities.

Regional extrema algorithms are based on flood-filling-like algorithms, whereas extended extrema and extrema imposition algorithms use geodesic reconstruction algorithm.

See the books of Serra and Soille for further details.

Author:
David Legland
See Also:
MinimaAndMaxima, Reconstruction3D, FloodFill
  • Method Summary

    Modifier and Type Method Description
    static ij.ImageStack extendedMaxima​(ij.ImageStack image, double dynamic)
    Computes the extended maxima in grayscale image image, keeping maxima with the specified dynamic, and using the default connectivity.
    static ij.ImageStack extendedMaxima​(ij.ImageStack image, double dynamic, int conn)
    Computes the extended maxima in grayscale image image, keeping maxima with the specified dynamic, and using the specified connectivity.
    static ij.ImageStack extendedMaxima​(ij.ImageStack image, double dynamic, int conn, ij.ImageStack binaryMask)
    Computes the extended maxima in the grayscale image image, keeping maxima with the specified dynamic, restricted to the non-zero voxels of the binary mask, and using the specified connectivity.
    static ij.ImageStack extendedMaxima​(ij.ImageStack image, double dynamic, ij.ImageStack binaryMask)
    Computes the extended maxima in the grayscale image image, keeping maxima with the specified dynamic, restricted to the non-zero voxels of the binary mask, and using the default connectivity.
    static ij.ImageStack extendedMinima​(ij.ImageStack image, double dynamic)
    Computes the extended minima in grayscale image image, keeping minima with the specified dynamic, and using the default connectivity.
    static ij.ImageStack extendedMinima​(ij.ImageStack image, double dynamic, int conn)
    Computes the extended minima in grayscale image image, keeping minima with the specified dynamic, and using the specified connectivity.
    static ij.ImageStack imposeMaxima​(ij.ImageStack image, ij.ImageStack maxima)
    Imposes the maxima given by marker image into the input image, using the default connectivity.
    static ij.ImageStack imposeMaxima​(ij.ImageStack image, ij.ImageStack maxima, int conn)
    Imposes the maxima given by marker image into the input image, using the specified connectivity.
    static ij.ImageStack imposeMinima​(ij.ImageStack image, ij.ImageStack minima)
    Imposes the minima given by marker image into the input image, using the default connectivity.
    static ij.ImageStack imposeMinima​(ij.ImageStack image, ij.ImageStack minima, int conn)
    Imposes the minima given by marker image into the input image, using the specified connectivity.
    static ij.ImageStack regionalMaxima​(ij.ImageStack image)
    Computes the regional maxima in 3D stack image, using the default connectivity.
    static ij.ImageStack regionalMaxima​(ij.ImageStack image, int conn)
    Computes the regional maxima in grayscale image stack, using the specified connectivity.
    static ij.ImageStack regionalMaxima​(ij.ImageStack image, int conn, ij.ImageStack mask)
    Computes the regional maxima in grayscale image stack, using the specified connectivity and binary mask.
    static ij.ImageStack regionalMaximaByReconstruction​(ij.ImageStack image, int conn)
    Computes the regional maxima in 3D image stack, using the specified connectivity, and a slower algorithm (used for testing).
    static ij.ImageStack regionalMinima​(ij.ImageStack image)
    Computes the regional minima in 3D image stack, using the default connectivity.
    static ij.ImageStack regionalMinima​(ij.ImageStack image, int conn)
    Computes the regional minima in 3D stack image, using the specified connectivity.
    static ij.ImageStack regionalMinima​(ij.ImageStack image, int conn, ij.ImageStack mask)
    Computes the regional minima in 3D image stack, using the specified connectivity.
    static ij.ImageStack regionalMinimaByReconstruction​(ij.ImageStack image, int conn)
    Computes the regional minima in grayscale image image, using the specified connectivity, and a slower algorithm (used for testing).

    Methods inherited from class java.lang.Object

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

    • regionalMaxima

      public static final ij.ImageStack regionalMaxima​(ij.ImageStack image)
      Computes the regional maxima in 3D stack image, using the default connectivity.
      Parameters:
      image - the 3D image to process
      Returns:
      the regional maxima of input image
    • regionalMaxima

      public static final ij.ImageStack regionalMaxima​(ij.ImageStack image, int conn)
      Computes the regional maxima in grayscale image stack, using the specified connectivity.
      Parameters:
      image - the 3D image to process
      conn - the connectivity for maxima, that should be either 6 or 26
      Returns:
      the regional maxima of input image
    • regionalMaximaByReconstruction

      public static final ij.ImageStack regionalMaximaByReconstruction​(ij.ImageStack image, int conn)
      Computes the regional maxima in 3D image stack, using the specified connectivity, and a slower algorithm (used for testing).
      Parameters:
      image - the 3D image to process
      conn - the connectivity for maxima, that should be either 6 or 26
      Returns:
      the regional maxima of input image
    • regionalMaxima

      public static final ij.ImageStack regionalMaxima​(ij.ImageStack image, int conn, ij.ImageStack mask)
      Computes the regional maxima in grayscale image stack, using the specified connectivity and binary mask.
      Parameters:
      image - the 3D image to process
      conn - the connectivity for maxima, that should be either 6 or 26
      mask - the binary mask that restricts the processing
      Returns:
      the regional maxima of input image
    • regionalMinima

      public static final ij.ImageStack regionalMinima​(ij.ImageStack image)
      Computes the regional minima in 3D image stack, using the default connectivity.
      Parameters:
      image - the 3D image to process
      Returns:
      the regional minima of input image
    • regionalMinima

      public static final ij.ImageStack regionalMinima​(ij.ImageStack image, int conn)
      Computes the regional minima in 3D stack image, using the specified connectivity.
      Parameters:
      image - the 3D image to process
      conn - the connectivity for minima, that should be either 6 or 26
      Returns:
      the regional minima of input image
    • regionalMinimaByReconstruction

      public static final ij.ImageStack regionalMinimaByReconstruction​(ij.ImageStack image, int conn)
      Computes the regional minima in grayscale image image, using the specified connectivity, and a slower algorithm (used for testing).
      Parameters:
      image - the 3D image to process
      conn - the connectivity for minima, that should be either 6 or 26
      Returns:
      the regional minima of input image
    • regionalMinima

      public static final ij.ImageStack regionalMinima​(ij.ImageStack image, int conn, ij.ImageStack mask)
      Computes the regional minima in 3D image stack, using the specified connectivity.
      Parameters:
      image - the 3D image to process
      conn - the connectivity for minima, that should be either 6 or 26
      mask - the binary mask that restricts processing
      Returns:
      the regional minima of input image
    • extendedMaxima

      public static final ij.ImageStack extendedMaxima​(ij.ImageStack image, double dynamic)
      Computes the extended maxima in grayscale image image, keeping maxima with the specified dynamic, and using the default connectivity.
      Parameters:
      image - the 3D image to process
      dynamic - the difference between maxima and maxima boundary
      Returns:
      the extended maxima of input image
    • extendedMaxima

      public static final ij.ImageStack extendedMaxima​(ij.ImageStack image, double dynamic, int conn)
      Computes the extended maxima in grayscale image image, keeping maxima with the specified dynamic, and using the specified connectivity.
      Parameters:
      image - the 3D image to process
      dynamic - the difference between maxima and maxima boundary
      conn - the connectivity for maxima, that should be either 6 or 26
      Returns:
      the extended maxima of input image
    • extendedMaxima

      public static final ij.ImageStack extendedMaxima​(ij.ImageStack image, double dynamic, ij.ImageStack binaryMask)
      Computes the extended maxima in the grayscale image image, keeping maxima with the specified dynamic, restricted to the non-zero voxels of the binary mask, and using the default connectivity.
      Parameters:
      image - the 3D image to process
      dynamic - the difference between maxima and maxima boundary
      binaryMask - binary mask image to restrict region of application
      Returns:
      the extended maxima of input image
    • extendedMaxima

      public static final ij.ImageStack extendedMaxima​(ij.ImageStack image, double dynamic, int conn, ij.ImageStack binaryMask)
      Computes the extended maxima in the grayscale image image, keeping maxima with the specified dynamic, restricted to the non-zero voxels of the binary mask, and using the specified connectivity.
      Parameters:
      image - input grayscale image
      dynamic - nonnegative scalar defining the depth threshold of maxima removal ("h" value in Soile, 1999)
      conn - connectivity value (6 or 26)
      binaryMask - binary mask image to restrict region of application
      Returns:
      the extended maxima of input image
    • extendedMinima

      public static final ij.ImageStack extendedMinima​(ij.ImageStack image, double dynamic)
      Computes the extended minima in grayscale image image, keeping minima with the specified dynamic, and using the default connectivity.
      Parameters:
      image - the 3D image to process
      dynamic - the difference between minima and minima boundary
      Returns:
      the extended minima of input image
    • extendedMinima

      public static final ij.ImageStack extendedMinima​(ij.ImageStack image, double dynamic, int conn)
      Computes the extended minima in grayscale image image, keeping minima with the specified dynamic, and using the specified connectivity.
      Parameters:
      image - the 3D image to process
      dynamic - the difference between minima and minima boundary
      conn - the connectivity for minima, that should be either 6 or 26
      Returns:
      the extended minima of input image
    • imposeMaxima

      public static final ij.ImageStack imposeMaxima​(ij.ImageStack image, ij.ImageStack maxima)
      Imposes the maxima given by marker image into the input image, using the default connectivity.
      Parameters:
      image - the 3D image to process
      maxima - a 3D binary image of maxima
      Returns:
      the result of maxima imposition
    • imposeMaxima

      public static final ij.ImageStack imposeMaxima​(ij.ImageStack image, ij.ImageStack maxima, int conn)
      Imposes the maxima given by marker image into the input image, using the specified connectivity.
      Parameters:
      image - the 3D image to process
      maxima - a 3D binary image of maxima
      conn - the connectivity for maxima, that should be either 6 or 26
      Returns:
      the result of maxima imposition
    • imposeMinima

      public static final ij.ImageStack imposeMinima​(ij.ImageStack image, ij.ImageStack minima)
      Imposes the minima given by marker image into the input image, using the default connectivity.
      Parameters:
      image - the 3D image to process
      minima - a 3D binary image of minima
      Returns:
      the result of minima imposition
    • imposeMinima

      public static final ij.ImageStack imposeMinima​(ij.ImageStack image, ij.ImageStack minima, int conn)
      Imposes the minima given by marker image into the input image, using the specified connectivity.
      Parameters:
      image - the 3D image to process
      minima - a 3D binary image of minima
      conn - the connectivity for minima, that should be either 6 or 26
      Returns:
      the result of minima imposition