Package inra.ijpb.plugins
Enum LabelMapMorphologicalFilteringPlugin.Operation
java.lang.Object
java.lang.Enum<LabelMapMorphologicalFilteringPlugin.Operation>
inra.ijpb.plugins.LabelMapMorphologicalFilteringPlugin.Operation
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<LabelMapMorphologicalFilteringPlugin.Operation>
,java.lang.constant.Constable
- Enclosing class:
- LabelMapMorphologicalFilteringPlugin
public static enum LabelMapMorphologicalFilteringPlugin.Operation extends java.lang.Enum<LabelMapMorphologicalFilteringPlugin.Operation>
A pre-defined set of basis morphological operations, that can be easily
used with a GenericDialog.
Example:
// 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
ImageStack image = IJ.getImage().getStack();
ImageStack res = op.process(image, ChamferMask3D.BORGEFORS, 2.0);
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and Type Method Description static LabelMapMorphologicalFilteringPlugin.Operation
fromLabel(java.lang.String opLabel)
Determines the operation type from its label.static java.lang.String[]
getAllLabels()
Returns the list of labels for this enumeration.ij.ImageStack
process(ij.ImageStack image, ChamferMask3D mask, double radius)
Applies the current operator to the input 3D image.ij.process.ImageProcessor
process(ij.process.ImageProcessor image, ChamferMask2D mask, double radius)
Applies the current operator to the input image.java.lang.String
toString()
static LabelMapMorphologicalFilteringPlugin.Operation
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static LabelMapMorphologicalFilteringPlugin.Operation[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
-
Enum Constant Details
-
EROSION
Morphological erosion (local minima) -
DILATION
Morphological dilation (local maxima) -
OPENING
Morphological opening (erosion followed by dilation) -
CLOSING
Morphological closing (dilation followed by erosion)
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
process
public ij.process.ImageProcessor process(ij.process.ImageProcessor image, ChamferMask2D mask, double radius)Applies the current operator to the input image.- Parameters:
image
- the image to processmask
- the chamfer mask used for propagating distancesradius
- the radius used to threshold the distance map- Returns:
- the result of morphological operation applied to image
-
process
Applies the current operator to the input 3D image.- Parameters:
image
- the image to processmask
- the chamfer mask used for propagating distancesradius
- the radius used to threshold the distance map- Returns:
- the result of morphological operation applied to image
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Enum<LabelMapMorphologicalFilteringPlugin.Operation>
-
getAllLabels
public static java.lang.String[] getAllLabels()Returns the list of labels for this enumeration.- Returns:
- the list of labels for this enumeration.
-
fromLabel
Determines the operation type from its label.- Parameters:
opLabel
- the label of the operation- Returns:
- the parsed Operation
- Throws:
java.lang.IllegalArgumentException
- if label is not recognized.
-