public static enum Morphology.Operation extends Enum<Morphology.Operation>
// Use a generic dialog to define an operator
GenericDialog gd = new GenericDialog();
gd.addChoice("Operation", Operation.getAllLabels();
gd.showDialog();
Operation op = Operation.fromLabel(gd.getNextChoice());
// Apply the operation on the current image
ImageProcessor image = IJ.getImage().getProcessor();
op.apply(image, SquareStrel.fromRadius(2));
Enum Constant and Description |
---|
BOTTOMHAT
Black Top-Hat
|
CLOSING
Morphological closing (dilation followed by erosion)
|
DILATION
Morphological dilation (local maxima)
|
EROSION
Morphological erosion (local minima)
|
EXTERNAL_GRADIENT
Morphological internal gradient (difference of original image with erosion)
|
GRADIENT
Morphological gradient (difference of dilation with erosion)
|
INTERNAL_GRADIENT
Morphological internal gradient (difference of dilation with original image)
|
LAPLACIAN
Morphological laplacian (difference of external gradient with internal gradient)
|
OPENING
Morphological opening (erosion followed by dilation)
|
TOPHAT
White Top-Hat
|
Modifier and Type | Method and Description |
---|---|
ij.process.ImageProcessor |
apply(ij.process.ImageProcessor image,
Strel strel)
Applies the current operator to the input image.
|
ij.ImageStack |
apply(ij.ImageStack image,
Strel3D strel)
Applies the current operator to the input 3D image.
|
static Morphology.Operation |
fromLabel(String opLabel)
Determines the operation type from its label.
|
static String[] |
getAllLabels()
Returns the list of labels for this enumeration.
|
String |
toString() |
static Morphology.Operation |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Morphology.Operation[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Morphology.Operation EROSION
public static final Morphology.Operation DILATION
public static final Morphology.Operation OPENING
public static final Morphology.Operation CLOSING
public static final Morphology.Operation TOPHAT
public static final Morphology.Operation BOTTOMHAT
public static final Morphology.Operation GRADIENT
public static final Morphology.Operation LAPLACIAN
public static final Morphology.Operation INTERNAL_GRADIENT
public static final Morphology.Operation EXTERNAL_GRADIENT
public static Morphology.Operation[] values()
for (Morphology.Operation c : Morphology.Operation.values()) System.out.println(c);
public static Morphology.Operation valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic ij.process.ImageProcessor apply(ij.process.ImageProcessor image, Strel strel)
image
- the image to processstrel
- the structuring element to usepublic ij.ImageStack apply(ij.ImageStack image, Strel3D strel)
image
- the image to processstrel
- the structuring element to usepublic String toString()
toString
in class Enum<Morphology.Operation>
public static String[] getAllLabels()
public static Morphology.Operation fromLabel(String opLabel)
opLabel
- the label of the operationIllegalArgumentException
- if label is not recognized.Copyright © 2014–2023 INRA-IJPB Modeling and Digital Imaging lab. All rights reserved.