public static enum DistanceTransform.DistanceMetric extends Enum<DistanceTransform.DistanceMetric>
Enum Constant and Description |
---|
CHESSBOARD
Chessboard distance metric where dist = 1.
|
CITYBLOCK
Cityblock distance metric where dist = Math.abs(dx) + Math.abs(dy).
|
EUCLIDEAN
Euclidean distance metric where dist = Math.sqrt(dx * dx + dy * dy).
|
Modifier and Type | Method and Description |
---|---|
static DistanceTransform.DistanceMetric |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DistanceTransform.DistanceMetric[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DistanceTransform.DistanceMetric EUCLIDEAN
public static final DistanceTransform.DistanceMetric CITYBLOCK
public static final DistanceTransform.DistanceMetric CHESSBOARD
public static DistanceTransform.DistanceMetric[] values()
for (DistanceTransform.DistanceMetric c : DistanceTransform.DistanceMetric.values()) System.out.println(c);
public static DistanceTransform.DistanceMetric 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 nullCopyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.