Package qupath.imagej.processing
Class MorphologicalReconstruction
java.lang.Object
qupath.imagej.processing.MorphologicalReconstruction
Implementation of morphological reconstruction for ImageJ.
- Author:
- Pete Bankhead
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ByteProcessorbinaryReconstruction(ByteProcessor bpMarker, ByteProcessor bpMask, boolean permitMaskChanges) Alternative morphological reconstruction (based on ImageJ's FloodFiller) suitable for binary images only.static ImageProcessorclosingByReconstruction(ImageProcessor ip, double radius) Apply a morphological closing by reconstruction.static ImageProcessorfindRegionalMaxima(ImageProcessor ip, float threshold, boolean outputBinary) Find regional maxima using morphological reconstruction.static voidimposeMaxima(FloatProcessor fp, Roi roi) Ensure that a FloatProcessor only has region maxima within a specified Roi, using morphological reconstruction.static voidimposeMaxima(FloatProcessor fp, ImageProcessor ipMask) Ensure that a FloatProcessor only has region maxima within a specified mask, using morphological reconstruction.static voidimposeMinima(FloatProcessor fp, Roi roi) Ensure that a FloatProcessor only has region minima within a specified Roi, using morphological reconstruction.static booleanmorphologicalReconstruction(ImageProcessor ipMarker, ImageProcessor ipMask) Apply morphological operation using marker and mask images.static ImageProcessoropeningByReconstruction(ImageProcessor ip, double radius) Apply opening by reconstruction, with the specified minimum filter radius.static booleanvalidateMarkerMask(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-ImageProcessorto 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:
-