Package qupath.imagej.processing
Class MorphologicalReconstruction
java.lang.Object
qupath.imagej.processing.MorphologicalReconstruction
Implementation of morphological reconstruction for ImageJ.
- Author:
- Pete Bankhead
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ByteProcessor
binaryReconstruction
(ByteProcessor bpMarker, ByteProcessor bpMask, boolean permitMaskChanges) Alternative morphological reconstruction (based on ImageJ's FloodFiller) suitable for binary images only.static ImageProcessor
closingByReconstruction
(ImageProcessor ip, double radius) Apply a morphological closing by reconstruction.static ImageProcessor
findRegionalMaxima
(ImageProcessor ip, float threshold, boolean outputBinary) Find regional maxima using morphological reconstruction.static void
imposeMaxima
(FloatProcessor fp, Roi roi) Ensure that a FloatProcessor only has region maxima within a specified Roi, using morphological reconstruction.static void
imposeMaxima
(FloatProcessor fp, ImageProcessor ipMask) Ensure that a FloatProcessor only has region maxima within a specified mask, using morphological reconstruction.static void
imposeMinima
(FloatProcessor fp, Roi roi) Ensure that a FloatProcessor only has region minima within a specified Roi, using morphological reconstruction.static boolean
morphologicalReconstruction
(ImageProcessor ipMarker, ImageProcessor ipMask) Apply morphological operation using marker and mask images.static ImageProcessor
openingByReconstruction
(ImageProcessor ip, double radius) Apply opening by reconstruction, with the specified minimum filter radius.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.
-
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
Apply morphological operation using marker and mask images. The marker image is changed.- Parameters:
ipMarker
-ipMask
-- Returns:
-
validateMarkerMask
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
Apply opening by reconstruction, with the specified minimum filter radius.- Parameters:
ip
-radius
-- Returns:
-
closingByReconstruction
Apply a morphological closing by reconstruction.- Parameters:
ip
-ImageProcessor
to processradius
- minimum filter radius- Returns:
- processed image
-
imposeMinima
Ensure that a FloatProcessor only has region minima within a specified Roi, using morphological reconstruction.- Parameters:
fp
-roi
-
-
imposeMaxima
Ensure that a FloatProcessor only has region maxima within a specified Roi, using morphological reconstruction.- Parameters:
fp
-roi
-
-
imposeMaxima
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 imagethreshold
- the extent to which a maximum must be greater than its surroundingsoutputBinary
- if true, the output is a binary image- Returns:
-