public enum ChamferMasks3D extends Enum<ChamferMasks3D>
A pre-defined set of weights that can be used to compute 3D distance transform using chamfer approximations of euclidean metric.
Provides methods to access weight values either as float array or as short array.
Example of use:
float[] floatWeights = ChamferWeights3D2.BORGEFORS.getFloatWeights();
boolean normalize = true;
DistanceTransform3D dt = new DistanceTransform3DFloat(floatWeights, normalize);
ImageStack result = dt.distanceMap(inputStack);
Enum Constant and Description |
---|
BORGEFORS
Use weights 3 for orthogonal neighbors and 4 for diagonal neighbors,
and 5 for cube-diagonals (best approximation for 3-by-3-by-3 masks).
|
CHESSBOARD
Use weight equal to 1 for all neighbors
|
CITY_BLOCK
Use weights 1 for orthogonal neighbors and 2 for diagonal neighbors,
and 3 for cube-diagonals.
|
QUASI_EUCLIDEAN
Use floating-point weights 1.0 for orthogonal neighbors and sqrt(2) for
diagonal neighbors, and sqrt(3) for cube-diagonals.
|
SVENSSON_3_4_5_7
Use weights 3 for orthogonal neighbors and 4 for diagonal neighbors, and
5 for cube-diagonals, and 7 for (2,1,1) shifts.
|
WEIGHTS_10_14_17_22_34_30
Use six types of weights, with a |Emax| error of around 0.0408.
|
WEIGHTS_13_18_22_29_31
Use five types of weights, with a |Emax| error of around 0.0397.
|
WEIGHTS_7_10_12_16_17_21
Use six types of weights, with a |Emax| error of around 0.0524.
|
WEIGHTS_8_11_14_18_20
Use five types of weights, with a |Emax| error of around 0.0653.
|
Modifier and Type | Method and Description |
---|---|
static ChamferMasks3D |
fromLabel(String label)
Determines the operation type from its label.
|
static String[] |
getAllLabels() |
ChamferMask3D |
getMask() |
String |
toString() |
static ChamferMasks3D |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ChamferMasks3D[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ChamferMasks3D CHESSBOARD
public static final ChamferMasks3D CITY_BLOCK
public static final ChamferMasks3D QUASI_EUCLIDEAN
public static final ChamferMasks3D BORGEFORS
public static final ChamferMasks3D SVENSSON_3_4_5_7
public static final ChamferMasks3D WEIGHTS_8_11_14_18_20
public static final ChamferMasks3D WEIGHTS_13_18_22_29_31
public static final ChamferMasks3D WEIGHTS_7_10_12_16_17_21
public static final ChamferMasks3D WEIGHTS_10_14_17_22_34_30
public static ChamferMasks3D[] values()
for (ChamferMasks3D c : ChamferMasks3D.values()) System.out.println(c);
public static ChamferMasks3D 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 ChamferMask3D getMask()
public String toString()
toString
in class Enum<ChamferMasks3D>
public static String[] getAllLabels()
public static ChamferMasks3D fromLabel(String label)
label
- the name of a chamfer weightIllegalArgumentException
- if label name is not recognized.Copyright © 2014–2023 INRA-IJPB Modeling and Digital Imaging lab. All rights reserved.