public static enum Strel.Shape extends Enum<Strel.Shape>
Enum Constant and Description |
---|
DIAMOND
Diamond of a given diameter
|
DISK
Disk of a given radius
|
LINE_DIAG_DOWN
Diagonal line of a given length
|
LINE_DIAG_UP
Diagonal line of a given length
|
LINE_HORIZ
Horizontal line of a given length
|
LINE_VERT
Vertical line of a given length
|
OCTAGON
Octagon of a given diameter
|
SQUARE
Square of a given side
|
Modifier and Type | Method and Description |
---|---|
Strel |
fromDiameter(int diam)
Creates a structuring element of the given type and with the
specified diameter.
|
static Strel.Shape |
fromLabel(String label)
Determines the strel shape from its label.
|
Strel |
fromRadius(int radius)
Creates a structuring element of the given type and with the
specified radius.
|
static String[] |
getAllLabels()
Returns a set of labels for most of classical structuring elements.
|
String |
toString() |
static Strel.Shape |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Strel.Shape[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Strel.Shape DISK
DiskStrel
public static final Strel.Shape SQUARE
SquareStrel
public static final Strel.Shape DIAMOND
DiamondStrel
,
Cross3x3Strel
public static final Strel.Shape OCTAGON
OctagonStrel
public static final Strel.Shape LINE_HORIZ
LinearHorizontalStrel
public static final Strel.Shape LINE_VERT
LinearVerticalStrel
public static final Strel.Shape LINE_DIAG_UP
LinearDiagUpStrel
public static final Strel.Shape LINE_DIAG_DOWN
LinearDiagDownStrel
public static Strel.Shape[] values()
for (Strel.Shape c : Strel.Shape.values()) System.out.println(c);
public static Strel.Shape 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 String toString()
toString
in class Enum<Strel.Shape>
public Strel fromRadius(int radius)
radius
- the radius of the structuring element, in pixelspublic Strel fromDiameter(int diam)
diam
- the orthogonal diameter of the structuring element (max of x and y sizes), in pixelspublic static String[] getAllLabels()
public static Strel.Shape fromLabel(String label)
label
- the shape name of the structuring elementIllegalArgumentException
- if label is not recognized.Copyright © 2014–2023 INRA-IJPB Modeling and Digital Imaging lab. All rights reserved.