Package inra.ijpb.data.border
Enum BorderManager3D.Type
java.lang.Object
java.lang.Enum<BorderManager3D.Type>
inra.ijpb.data.border.BorderManager3D.Type
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<BorderManager3D.Type>
,java.lang.constant.Constable
- Enclosing interface:
- BorderManager3D
public static enum BorderManager3D.Type extends java.lang.Enum<BorderManager3D.Type>
A set of pre-defined border managers stored in an enumeration.
Each type is associated with a label, for better user-interface
integration. The set of all labels can be obtained via static method
getAllLabels()
, and can be used as input of list dialogs.
To get the type corresponding to a given label, use the twin method
fromLabel(String)
.
// init initial values
ImageProcessor image = ...
String borderManagerName = "Periodic";
// create border manager from name and image
BorderManager.Type bmType = BorderManager.Type.fromLabel(borderManagerName);
BorderManager bm = bmType.createBorderManager(image);
int value = bm.get(-5, -10);
- Author:
- David Legland
-
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 BLACK
uses black value (0) to fill borderGRAY
uses gray value (127) to fill borderMIRRORED
uses mirrored image to populate borderPERIODIC
uses periodic boundary to populate borderREPLICATED
replicates nearest pixel to populate borderWHITE
uses white value (255) to fill border -
Method Summary
Modifier and Type Method Description BorderManager3D
createBorderManager(ij.ImageStack image)
Creates a new Border Manager for the input image.static BorderManager3D.Type
fromLabel(java.lang.String label)
Determines the operation type from its label.static java.lang.String[]
getAllLabels()
java.lang.String
getLabel()
java.lang.String
toString()
static BorderManager3D.Type
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static BorderManager3D.Type[]
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
-
REPLICATED
replicates nearest pixel to populate border -
PERIODIC
uses periodic boundary to populate border -
MIRRORED
uses mirrored image to populate border -
BLACK
uses black value (0) to fill border -
WHITE
uses white value (255) to fill border -
GRAY
uses gray value (127) to fill border
-
-
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()- Overrides:
toString
in classjava.lang.Enum<BorderManager3D.Type>
-
getLabel
public java.lang.String getLabel()- Returns:
- the label used to identify this border manager
-
createBorderManager
Creates a new Border Manager for the input image.- Parameters:
image
- the image to wrap- Returns:
- a new instance of BorderManager3D
-
getAllLabels
public static java.lang.String[] getAllLabels()- Returns:
- all the labels used for identifying this enumeration.
-
fromLabel
Determines the operation type from its label.- Parameters:
label
- the name of the border manager- Returns:
- the enumeration item corresponding to the name
- Throws:
java.lang.IllegalArgumentException
- if label is not recognized.
-