public static enum BorderManager.Type extends Enum<BorderManager.Type>
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);
Enum Constant and Description |
---|
BLACK
uses black value (0) to fill border
|
GRAY
uses gray value (0) to fill border
|
MIRRORED
uses mirrored image to populate border
|
PERIODIC
uses periodic boundary to populate border
|
REPLICATED
replicates nearest pixel to populate border
|
WHITE
uses white value (0) to fill border
|
Modifier and Type | Method and Description |
---|---|
BorderManager |
createBorderManager(ij.process.ImageProcessor image)
Creates a new Border Manager for the input image.
|
static BorderManager.Type |
fromLabel(String label)
Determines the operation type from its label.
|
static String[] |
getAllLabels() |
String |
getLabel() |
String |
toString() |
static BorderManager.Type |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static BorderManager.Type[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final BorderManager.Type REPLICATED
public static final BorderManager.Type PERIODIC
public static final BorderManager.Type MIRRORED
public static final BorderManager.Type BLACK
public static final BorderManager.Type WHITE
public static final BorderManager.Type GRAY
public static BorderManager.Type[] values()
for (BorderManager.Type c : BorderManager.Type.values()) System.out.println(c);
public static BorderManager.Type 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<BorderManager.Type>
public String getLabel()
public BorderManager createBorderManager(ij.process.ImageProcessor image)
image
- the image to wrappublic static String[] getAllLabels()
public static BorderManager.Type fromLabel(String label)
label
- the name of the border managerIllegalArgumentException
- if label is not recognized.Copyright © 2014–2023 INRA-IJPB Modeling and Digital Imaging lab. All rights reserved.