public class Morphology extends Object
Collection of static methods for morphological filters, as well as an enumeration of available methods.
Example of use:
ImageProcessor image = IJ.getImage().getProcessor();
Strel se = SquareStrel.fromDiameter(5);
ImageProcessor grad = Morphology.gradient(image, se);
ImagePlus res = new ImagePlus("Gradient", grad);
res.show();
Example of use with 3D image (stack):
ImageStack image = IJ.getImage().getStack();
Strel3D se = CubeStrel.fromDiameter(3);
ImageStack grad = Morphology.gradient(image, se);
ImagePlus res = new ImagePlus("Gradient3D", grad);
res.show();
Or directly with an instance of ImagePlus:
ImagePlus image = IJ.getImage();
Strel se = SquareStrel.fromDiameter(5);
ImagePlus res = Morphology.gradient(image, se);
res.show();
Modifier and Type | Class and Description |
---|---|
static class |
Morphology.Operation
A pre-defined set of basis morphological operations, that can be easily
used with a GenericDialog.
|
Modifier and Type | Method and Description |
---|---|
static ij.ImagePlus |
blackTopHat(ij.ImagePlus imagePlus,
Strel3D strel)
Computes black top hat (or "bottom hat") of the original image.
|
static ij.process.ImageProcessor |
blackTopHat(ij.process.ImageProcessor image,
Strel strel)
Computes black top hat (or "bottom hat") of the original image.
|
static ij.ImageStack |
blackTopHat(ij.ImageStack image,
Strel3D strel)
Computes black top hat (or "bottom hat") of the original image.
|
static ij.ImagePlus |
closing(ij.ImagePlus imagePlus,
Strel3D strel)
Performs morphological closing on the input image.
|
static ij.process.ImageProcessor |
closing(ij.process.ImageProcessor image,
Strel strel)
Performs closing on the input image.
|
static ij.ImageStack |
closing(ij.ImageStack image,
Strel3D strel)
Performs morphological closing on the input 3D image.
|
static ij.ImagePlus |
dilation(ij.ImagePlus imagePlus,
Strel3D strel)
Performs morphological dilation on the input image.
|
static ij.process.ImageProcessor |
dilation(ij.process.ImageProcessor image,
Strel strel)
Performs morphological dilation on the input image.
|
static ij.ImageStack |
dilation(ij.ImageStack image,
Strel3D strel)
Performs morphological dilation on the input 3D image.
|
static ij.ImagePlus |
erosion(ij.ImagePlus imagePlus,
Strel3D strel)
Performs morphological erosion on the input image.
|
static ij.process.ImageProcessor |
erosion(ij.process.ImageProcessor image,
Strel strel)
Performs morphological erosion on the input image.
|
static ij.ImageStack |
erosion(ij.ImageStack image,
Strel3D strel)
Performs morphological erosion on the input 3D image.
|
static ij.ImagePlus |
externalGradient(ij.ImagePlus imagePlus,
Strel3D strel)
Computes the morphological external gradient of the input image.
|
static ij.process.ImageProcessor |
externalGradient(ij.process.ImageProcessor image,
Strel strel)
Computes the morphological external gradient of the input image.
|
static ij.ImageStack |
externalGradient(ij.ImageStack image,
Strel3D strel)
Computes the morphological external gradient of the input 3D image.
|
static ij.ImagePlus |
gradient(ij.ImagePlus imagePlus,
Strel3D strel)
Computes the morphological gradient of the input image.
|
static ij.process.ImageProcessor |
gradient(ij.process.ImageProcessor image,
Strel strel)
Computes the morphological gradient of the input image.
|
static ij.ImageStack |
gradient(ij.ImageStack image,
Strel3D strel)
Computes the morphological gradient of the input 3D image.
|
static ij.ImagePlus |
internalGradient(ij.ImagePlus imagePlus,
Strel3D strel)
Computes the morphological internal gradient of the input image.
|
static ij.process.ImageProcessor |
internalGradient(ij.process.ImageProcessor image,
Strel strel)
Computes the morphological internal gradient of the input image.
|
static ij.ImageStack |
internalGradient(ij.ImageStack image,
Strel3D strel)
Computes the morphological internal gradient of the 3D input image.
|
static ij.ImagePlus |
laplacian(ij.ImagePlus imagePlus,
Strel3D strel)
Computes the morphological Laplacian of the 3D input image.
|
static ij.process.ImageProcessor |
laplacian(ij.process.ImageProcessor image,
Strel strel)
Computes the morphological Laplacian of the input image.
|
static ij.ImageStack |
laplacian(ij.ImageStack image,
Strel3D strel)
Computes the morphological Laplacian of the 3D input image.
|
static ij.ImagePlus |
opening(ij.ImagePlus imagePlus,
Strel3D strel)
Performs morphological opening on the input image.
|
static ij.process.ImageProcessor |
opening(ij.process.ImageProcessor image,
Strel strel)
Performs morphological opening on the input image.
|
static ij.ImageStack |
opening(ij.ImageStack image,
Strel3D strel)
Performs morphological opening on the input 3D image.
|
static ij.ImagePlus |
whiteTopHat(ij.ImagePlus imagePlus,
Strel3D strel)
Computes white top hat of the original image.
|
static ij.process.ImageProcessor |
whiteTopHat(ij.process.ImageProcessor image,
Strel strel)
Computes white top hat of the original image.
|
static ij.ImageStack |
whiteTopHat(ij.ImageStack image,
Strel3D strel)
Computes 3D white top hat of the original image.
|
public static ij.ImagePlus dilation(ij.ImagePlus imagePlus, Strel3D strel)
imagePlus
- the input image to processstrel
- the structuring element used for dilationdilation(ImageProcessor, Strel)
,
dilation(ImageStack, Strel3D)
,
erosion(ImagePlus, Strel3D)
public static ij.process.ImageProcessor dilation(ij.process.ImageProcessor image, Strel strel)
image
- the input image to process (grayscale or RGB)strel
- the structuring element used for dilationerosion(ImageProcessor, Strel)
,
Strel.dilation(ImageProcessor)
public static ij.ImageStack dilation(ij.ImageStack image, Strel3D strel)
image
- the input 3D image to process (grayscale or RGB)strel
- the structuring element used for dilationpublic static ij.ImagePlus erosion(ij.ImagePlus imagePlus, Strel3D strel)
imagePlus
- the input image to processstrel
- the structuring element used for erosionerosion(ImageProcessor, Strel)
,
erosion(ImageStack, Strel3D)
,
dilation(ImagePlus, Strel3D)
public static ij.process.ImageProcessor erosion(ij.process.ImageProcessor image, Strel strel)
image
- the input image to process (grayscale or RGB)strel
- the structuring element used for erosiondilation(ImageProcessor, Strel)
,
Strel.erosion(ImageProcessor)
public static ij.ImageStack erosion(ij.ImageStack image, Strel3D strel)
image
- the input image to process (grayscale or RGB)strel
- the structuring element used for erosionpublic static ij.ImagePlus opening(ij.ImagePlus imagePlus, Strel3D strel)
imagePlus
- the input image to processstrel
- the structuring element used for erosionopening(ImageProcessor, Strel)
,
opening(ImageStack, Strel3D)
,
closing(ImagePlus, Strel3D)
public static ij.process.ImageProcessor opening(ij.process.ImageProcessor image, Strel strel)
image
- the input image to process (grayscale or RGB)strel
- the structuring element used for openingclosing(ImageProcessor, Strel)
,
Strel.opening(ImageProcessor)
public static ij.ImageStack opening(ij.ImageStack image, Strel3D strel)
image
- the input 3D image to processstrel
- the structuring element used for openingclosing(ImageStack, Strel3D)
,
Strel3D.opening(ImageStack)
public static ij.ImagePlus closing(ij.ImagePlus imagePlus, Strel3D strel)
imagePlus
- the input image to processstrel
- the structuring element used for closingclosing(ImageProcessor, Strel)
,
closing(ImageStack, Strel3D)
,
opening(ImagePlus, Strel3D)
public static ij.process.ImageProcessor closing(ij.process.ImageProcessor image, Strel strel)
image
- the input image to process (grayscale or RGB)strel
- the structuring element used for closingopening(ImageProcessor, Strel)
,
Strel.closing(ImageProcessor)
public static ij.ImageStack closing(ij.ImageStack image, Strel3D strel)
image
- the input 3D image to processstrel
- the structuring element used for closingopening(ImageStack, Strel3D)
,
Strel3D.opening(ImageStack)
public static ij.ImagePlus whiteTopHat(ij.ImagePlus imagePlus, Strel3D strel)
imagePlus
- the input image to processstrel
- the structuring element used for closingwhiteTopHat(ImageProcessor, Strel)
,
whiteTopHat(ImageStack, Strel3D)
,
blackTopHat(ImagePlus, Strel3D)
public static ij.process.ImageProcessor whiteTopHat(ij.process.ImageProcessor image, Strel strel)
image
- the input image to process (grayscale or RGB)strel
- the structuring element used for white top-hatblackTopHat(ImageProcessor, Strel)
,
opening(ImageProcessor, Strel)
public static ij.ImageStack whiteTopHat(ij.ImageStack image, Strel3D strel)
image
- the input 3D image to processstrel
- the structuring element used for white top-hatblackTopHat(ImageStack, Strel3D)
,
opening(ImageStack, Strel3D)
public static ij.ImagePlus blackTopHat(ij.ImagePlus imagePlus, Strel3D strel)
imagePlus
- the input image to processstrel
- the structuring element used for closingblackTopHat(ImageProcessor, Strel)
,
blackTopHat(ImageStack, Strel3D)
,
whiteTopHat(ImagePlus, Strel3D)
public static ij.process.ImageProcessor blackTopHat(ij.process.ImageProcessor image, Strel strel)
image
- the input image to process (grayscale or RGB)strel
- the structuring element used for black top-hatwhiteTopHat(ImageProcessor, Strel)
,
closing(ImageProcessor, Strel)
public static ij.ImageStack blackTopHat(ij.ImageStack image, Strel3D strel)
image
- the input 3D image to processstrel
- the structuring element used for black top-hatwhiteTopHat(ImageStack, Strel3D)
,
closing(ImageStack, Strel3D)
public static ij.ImagePlus gradient(ij.ImagePlus imagePlus, Strel3D strel)
imagePlus
- the input image to processstrel
- the structuring element used for closinggradient(ImageProcessor, Strel)
,
gradient(ImageStack, Strel3D)
,
internalGradient(ImagePlus, Strel3D)
,
externalGradient(ImagePlus, Strel3D)
public static ij.process.ImageProcessor gradient(ij.process.ImageProcessor image, Strel strel)
image
- the input image to process (grayscale or RGB)strel
- the structuring element used for morphological gradienterosion(ImageProcessor, Strel)
,
dilation(ImageProcessor, Strel)
public static ij.ImageStack gradient(ij.ImageStack image, Strel3D strel)
image
- the input 3D image to processstrel
- the structuring element used for morphological gradienterosion(ImageStack, Strel3D)
,
dilation(ImageStack, Strel3D)
public static ij.ImagePlus laplacian(ij.ImagePlus imagePlus, Strel3D strel)
imagePlus
- the input image to processstrel
- the structuring element used for closinglaplacian(ImageProcessor, Strel)
,
laplacian(ImageStack, Strel3D)
,
internalGradient(ImagePlus, Strel3D)
,
externalGradient(ImagePlus, Strel3D)
public static ij.process.ImageProcessor laplacian(ij.process.ImageProcessor image, Strel strel)
image
- the input image to process (grayscale or RGB)strel
- the structuring element used for morphological laplacianerosion(ImageProcessor, Strel)
,
dilation(ImageProcessor, Strel)
public static ij.ImageStack laplacian(ij.ImageStack image, Strel3D strel)
image
- the input 3D image to processstrel
- the structuring element used for morphological laplacianexternalGradient(ImageStack, Strel3D)
,
internalGradient(ImageStack, Strel3D)
public static ij.ImagePlus internalGradient(ij.ImagePlus imagePlus, Strel3D strel)
imagePlus
- the input image to processstrel
- the structuring element used for closinginternalGradient(ImageProcessor, Strel)
,
internalGradient(ImageStack, Strel3D)
,
gradient(ImagePlus, Strel3D)
,
externalGradient(ImagePlus, Strel3D)
public static ij.process.ImageProcessor internalGradient(ij.process.ImageProcessor image, Strel strel)
image
- the input image to process (grayscale or RGB)strel
- the structuring element used for morphological internal gradienterosion(ImageProcessor, Strel)
,
gradient(ImageProcessor, Strel)
,
externalGradient(ImageProcessor, Strel)
public static ij.ImageStack internalGradient(ij.ImageStack image, Strel3D strel)
image
- the input image to processstrel
- the structuring element used for morphological internal gradienterosion(ImageStack, Strel3D)
,
gradient(ImageStack, Strel3D)
,
externalGradient(ImageStack, Strel3D)
public static ij.ImagePlus externalGradient(ij.ImagePlus imagePlus, Strel3D strel)
imagePlus
- the input image to processstrel
- the structuring element used for closingexternalGradient(ImageProcessor, Strel)
,
externalGradient(ImageStack, Strel3D)
,
gradient(ImagePlus, Strel3D)
,
internalGradient(ImagePlus, Strel3D)
public static ij.process.ImageProcessor externalGradient(ij.process.ImageProcessor image, Strel strel)
image
- the input image to process (grayscale or RGB)strel
- the structuring element used for morphological external gradientdilation(ImageProcessor, Strel)
public static ij.ImageStack externalGradient(ij.ImageStack image, Strel3D strel)
image
- the input image to processstrel
- the structuring element used for morphological external gradientdilation(ImageStack, Strel3D)
,
internalGradient(ImageStack, Strel3D)
Copyright © 2014–2023 INRA-IJPB Modeling and Digital Imaging lab. All rights reserved.