Package inra.ijpb.morphology
Class MinimaAndMaxima
java.lang.Object
inra.ijpb.morphology.MinimaAndMaxima
public class MinimaAndMaxima
extends java.lang.Object
A collection of static methods for computing regional and extended minima
and maxima.
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.
Example of use:
// Get current image processor
ImageProcessor image = IJ.getImage().getProcessor();
// Computes extended minima with a dynamic of 15, using the 4-connectivity
ImageProcessor minima = MinimaAndMaxima.extendedMinima(image, 15, 4);
// Display result in a new imagePlus
ImagePlus res = new ImagePlus("Minima", minima);
res.show();
- Author:
- David Legland
- See Also:
GeodesicReconstruction
-
Method Summary
Modifier and Type Method Description static ij.process.ImageProcessorextendedMaxima(ij.process.ImageProcessor image, double dynamic)Computes the extended maxima in grayscale imageimage, keeping maxima with the specified dynamic, and using the default connectivity.static ij.process.ImageProcessorextendedMaxima(ij.process.ImageProcessor image, double dynamic, int conn)Computes the extended maxima in grayscale imageimage, keeping maxima with the specified dynamic, and using the specified connectivity.static ij.process.ImageProcessorextendedMinima(ij.process.ImageProcessor image, double dynamic)Computes the extended minima in grayscale imageimage, keeping minima with the specified dynamic, and using the default connectivity.static ij.process.ImageProcessorextendedMinima(ij.process.ImageProcessor image, double dynamic, int conn)Computes the extended minima in grayscale imageimage, keeping minima with the specified dynamic, and using the specified connectivity.static ij.process.ImageProcessorimposeMaxima(ij.process.ImageProcessor image, ij.process.ImageProcessor maxima)Imposes the maxima given by marker image into the input image, using the default connectivity.static ij.process.ImageProcessorimposeMaxima(ij.process.ImageProcessor image, ij.process.ImageProcessor maxima, int conn)Imposes the maxima given by marker image into the input image, using the specified connectivity.static ij.process.ImageProcessorimposeMinima(ij.process.ImageProcessor image, ij.process.ImageProcessor minima)Imposes the minima given by marker image into the input image, using the default connectivity.static ij.process.ImageProcessorimposeMinima(ij.process.ImageProcessor image, ij.process.ImageProcessor minima, int conn)Imposes the minima given by marker image into the input image, using the specified connectivity.static ij.process.ImageProcessorregionalMaxima(ij.process.ImageProcessor image)Computes the regional maxima in grayscale imageimage, using the default connectivity.static ij.process.ImageProcessorregionalMaxima(ij.process.ImageProcessor image, int conn)Computes the regional maxima in grayscale imageimage, using the specified connectivity.static ij.process.ImageProcessorregionalMaximaByReconstruction(ij.process.ImageProcessor image, int conn)Computes the regional maxima in grayscale imageimage, using the specified connectivity, and a slower algorithm (used for testing).static ij.process.ImageProcessorregionalMinima(ij.process.ImageProcessor image)Computes the regional minima in grayscale imageimage, using the default connectivity.static ij.process.ImageProcessorregionalMinima(ij.process.ImageProcessor image, int conn)Computes the regional minima in grayscale imageimage, using the specified connectivity.static ij.process.ImageProcessorregionalMinimaByReconstruction(ij.process.ImageProcessor image, int conn)Computes the regional minima in grayscale imageimage, 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.process.ImageProcessor regionalMaxima(ij.process.ImageProcessor image)Computes the regional maxima in grayscale imageimage, using the default connectivity.- Parameters:
image- the image to process- Returns:
- the regional maxima of input image
-
regionalMaxima
public static final ij.process.ImageProcessor regionalMaxima(ij.process.ImageProcessor image, int conn)Computes the regional maxima in grayscale imageimage, using the specified connectivity.- Parameters:
image- the image to processconn- the connectivity for maxima, that should be either 4 or 8- Returns:
- the regional maxima of input image
-
regionalMaximaByReconstruction
public static final ij.process.ImageProcessor regionalMaximaByReconstruction(ij.process.ImageProcessor image, int conn)Computes the regional maxima in grayscale imageimage, using the specified connectivity, and a slower algorithm (used for testing).- Parameters:
image- the image to processconn- the connectivity for maxima, that should be either 4 or 8- Returns:
- the regional maxima of input image
-
regionalMinima
public static final ij.process.ImageProcessor regionalMinima(ij.process.ImageProcessor image)Computes the regional minima in grayscale imageimage, using the default connectivity.- Parameters:
image- the image to process- Returns:
- the regional minima of input image
-
regionalMinima
public static final ij.process.ImageProcessor regionalMinima(ij.process.ImageProcessor image, int conn)Computes the regional minima in grayscale imageimage, using the specified connectivity.- Parameters:
image- the image to processconn- the connectivity for minima, that should be either 4 or 8- Returns:
- the regional minima of input image
-
regionalMinimaByReconstruction
public static final ij.process.ImageProcessor regionalMinimaByReconstruction(ij.process.ImageProcessor image, int conn)Computes the regional minima in grayscale imageimage, using the specified connectivity, and a slower algorithm (used for testing).- Parameters:
image- the image to processconn- the connectivity for minima, that should be either 4 or 8- Returns:
- the regional minima of input image
-
extendedMaxima
public static final ij.process.ImageProcessor extendedMaxima(ij.process.ImageProcessor image, double dynamic)Computes the extended maxima in grayscale imageimage, keeping maxima with the specified dynamic, and using the default connectivity.- Parameters:
image- the image to processdynamic- the minimal difference between a maxima and its boundary- Returns:
- the extended maxima of input image
-
extendedMaxima
public static final ij.process.ImageProcessor extendedMaxima(ij.process.ImageProcessor image, double dynamic, int conn)Computes the extended maxima in grayscale imageimage, keeping maxima with the specified dynamic, and using the specified connectivity.- Parameters:
image- the image to processdynamic- the minimal difference between a maxima and its boundaryconn- the connectivity for maxima, that should be either 4 or 8- Returns:
- the extended maxima of input image
-
extendedMinima
public static final ij.process.ImageProcessor extendedMinima(ij.process.ImageProcessor image, double dynamic)Computes the extended minima in grayscale imageimage, keeping minima with the specified dynamic, and using the default connectivity.- Parameters:
image- the image to processdynamic- the minimal difference between a minima and its boundary- Returns:
- the extended minima of input image
-
extendedMinima
public static final ij.process.ImageProcessor extendedMinima(ij.process.ImageProcessor image, double dynamic, int conn)Computes the extended minima in grayscale imageimage, keeping minima with the specified dynamic, and using the specified connectivity.- Parameters:
image- the image to processdynamic- the minimal difference between a minima and its boundaryconn- the connectivity for minima, that should be either 4 or 8- Returns:
- the extended minima of input image
-
imposeMaxima
public static final ij.process.ImageProcessor imposeMaxima(ij.process.ImageProcessor image, ij.process.ImageProcessor maxima)Imposes the maxima given by marker image into the input image, using the default connectivity.- Parameters:
image- the image to processmaxima- a binary image of maxima- Returns:
- the result of maxima imposition
-
imposeMaxima
public static final ij.process.ImageProcessor imposeMaxima(ij.process.ImageProcessor image, ij.process.ImageProcessor maxima, int conn)Imposes the maxima given by marker image into the input image, using the specified connectivity.- Parameters:
image- the image to processmaxima- a binary image of maximaconn- the connectivity for maxima, that should be either 4 or 8- Returns:
- the result of maxima imposition
-
imposeMinima
public static final ij.process.ImageProcessor imposeMinima(ij.process.ImageProcessor image, ij.process.ImageProcessor minima)Imposes the minima given by marker image into the input image, using the default connectivity.- Parameters:
image- the image to processminima- a binary image of minima- Returns:
- the result of minima imposition
-
imposeMinima
public static final ij.process.ImageProcessor imposeMinima(ij.process.ImageProcessor image, ij.process.ImageProcessor minima, int conn)Imposes the minima given by marker image into the input image, using the specified connectivity.- Parameters:
image- the image to processminima- a binary image of minimaconn- the connectivity for minima, that should be either 4 or 8- Returns:
- the result of minima imposition
-