public enum Connectivity2D extends Enum<Connectivity2D>
Enum Constant and Description |
---|
C4
The 4 connectivity (only orthogonal neighbors)
|
C8
The 8 connectivity (orthogonal and diagonal neighbors)
|
Modifier and Type | Method and Description |
---|---|
static Connectivity2D |
fromLabel(String label)
Determines the connectivity type from its label.
|
static String[] |
getAllLabels()
Returns all the labels for this enumeration.
|
int |
getValue()
Returns the integer value associated to this connectivity.
|
String |
toString() |
static Connectivity2D |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Connectivity2D[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Connectivity2D C4
public static final Connectivity2D C8
public static Connectivity2D[] values()
for (Connectivity2D c : Connectivity2D.values()) System.out.println(c);
public static Connectivity2D 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 int getValue()
public static String[] getAllLabels()
public static Connectivity2D fromLabel(String label)
label
- the name of the connectivityIllegalArgumentException
- if label is not recognized.public String toString()
toString
in class Enum<Connectivity2D>
Copyright © 2014–2023 INRA-IJPB Modeling and Digital Imaging lab. All rights reserved.