Package inra.ijpb.morphology
Enum Strel3D.Shape
java.lang.Object
java.lang.Enum<Strel3D.Shape>
inra.ijpb.morphology.Strel3D.Shape
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Strel3D.Shape>
,java.lang.constant.Constable
- Enclosing interface:
- Strel3D
public static enum Strel3D.Shape extends java.lang.Enum<Strel3D.Shape>
An enumeration of the different possible structuring element shapes.
Each item of the enumeration can create Strel instances of specific
class and of given size.
-
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
Enum Constants Enum Constant Description BALL
Ball of a given radiusCUBE
Cube of a given sideDIAMOND
Diamond of a given diameterLINE_DIAG_DOWN
Diagonal line of a given lengthLINE_DIAG_UP
Diagonal line of a given lengthLINE_HORIZ
Horizontal line of a given lengthLINE_VERT
Vertical line of a given lengthLINE_Z
3D line in the Z directionOCTAGON
Octagon of a given diameterSQUARE
Square of a given side -
Method Summary
Modifier and Type Method Description Strel3D
fromDiameter(int diam)
Creates a structuring element of the given type and with the specified diameter.Strel3D
fromDiameterList(int diamX, int diamY, int diamZ)
Creates a structuring element of the given type and with the specified diameter.static Strel3D.Shape
fromLabel(java.lang.String label)
Determines the strel shape from its label.Strel3D
fromRadius(int radius)
Creates a structuring element of the given type and with the specified radius.Strel3D
fromRadiusList(int radiusX, int radiusY, int radiusZ)
Creates a structuring element of the given type and with the specified radius for each dimension.static java.lang.String[]
getAllLabels()
Returns a set of labels for most of classical structuring elements.java.lang.String
toString()
Returns the label associated to this shape.static Strel3D.Shape
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Strel3D.Shape[]
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
-
BALL
Ball of a given radius- See Also:
SquareStrel
-
CUBE
Cube of a given side- See Also:
SquareStrel
-
SQUARE
Square of a given side- See Also:
SquareStrel
-
DIAMOND
Diamond of a given diameter- See Also:
DiamondStrel
,Cross3x3Strel
-
OCTAGON
Octagon of a given diameter- See Also:
OctagonStrel
-
LINE_HORIZ
Horizontal line of a given length- See Also:
LinearHorizontalStrel
-
LINE_VERT
Vertical line of a given length- See Also:
LinearVerticalStrel
-
LINE_Z
3D line in the Z direction- See Also:
LinearDepthStrel3D
-
LINE_DIAG_UP
Diagonal line of a given length- See Also:
LinearDiagUpStrel
-
LINE_DIAG_DOWN
Diagonal line of a given length- See Also:
LinearDiagDownStrel
-
-
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
-
toString
public java.lang.String toString()Returns the label associated to this shape.- Overrides:
toString
in classjava.lang.Enum<Strel3D.Shape>
-
fromRadius
Creates a structuring element of the given type and with the specified radius. The final size is given by 2 * radius + 1, to take into account the central pixel.- Parameters:
radius
- the radius of the structuring element, in pixels- Returns:
- a new structuring element
-
fromRadiusList
Creates a structuring element of the given type and with the specified radius for each dimension. The final size is given for each dimension by 2 * radius + 1, to take into account the central pixel.- Parameters:
radiusX
- the radius of the structuring element in the x-direction, in pixelsradiusY
- the radius of the structuring element in the y-direction, in pixelsradiusZ
- the radius of the structuring element in the z-direction, in pixels- Returns:
- a new structuring element
-
fromDiameter
Creates a structuring element of the given type and with the specified diameter.- Parameters:
diam
- the orthogonal diameter of the structuring element (max of x and y sizes), in pixels- Returns:
- a new structuring element
-
fromDiameterList
Creates a structuring element of the given type and with the specified diameter.- Parameters:
diamX
- the diameter of the structuring element in the X directiondiamY
- the diameter of the structuring element in the Y directiondiamZ
- the diameter of the structuring element in the Z direction- Returns:
- a new structuring element
-
getAllLabels
public static java.lang.String[] getAllLabels()Returns a set of labels for most of classical structuring elements.- Returns:
- a list of labels
-
fromLabel
Determines the strel shape from its label.- Parameters:
label
- the name of the structuring element- Returns:
- a Shape object that can be used to instantiate new structuring elements
- Throws:
java.lang.IllegalArgumentException
- if label is not recognized.
-