@Deprecated public enum ChamferWeights3D extends Enum<ChamferWeights3D>
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 = ChamferWeights3D.BORGEFORS.getFloatWeights();
boolean normalize = true;
DistanceTransform3D dt = new DistanceTransform3DFloat(floatWeights, normalize);
ImageStack result = dt.distanceMap(inputStack);
Modifier and Type | Class and Description |
---|---|
static class |
ChamferWeights3D.FloatOffset
Deprecated.
|
static class |
ChamferWeights3D.ShortOffset
Deprecated.
|
Enum Constant and Description |
---|
BORGEFORS
Deprecated.
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
Deprecated.
Use weight equal to 1 for all neighbors
|
CITY_BLOCK
Deprecated.
Use weights 1 for orthogonal neighbors and 2 for diagonal neighbors,
and 3 for cube-diagonals.
|
QUASI_EUCLIDEAN
Deprecated.
Use weights 1 for orthogonal neighbors and sqrt(2) for diagonal
neighbors, and sqrt(3) for cube-diagonals.
|
WEIGHTS_3_4_5_7
Deprecated.
Use weights 3 for orthogonal neighbors and 4 for diagonal neighbors, and
5 for cube-diagonals, and 7 for (2,1,1) shifts.
|
Modifier and Type | Method and Description |
---|---|
static ChamferWeights3D |
fromLabel(String label)
Deprecated.
Determines the operation type from its label.
|
static String[] |
getAllLabels()
Deprecated.
|
static Collection<ChamferWeights3D.FloatOffset> |
getBackwardOffsets(float[] weights)
Deprecated.
Computes the collection of weighted offsets corresponding to a scan of
the voxels in a 3D image in the backward direction.
|
static Collection<ChamferWeights3D.ShortOffset> |
getBackwardOffsets(short[] weights)
Deprecated.
Computes the collection of weighted offsets corresponding to a scan of
the voxels in a 3D image in the backward direction.
|
float[] |
getFloatWeights()
Deprecated.
|
static Collection<ChamferWeights3D.FloatOffset> |
getForwardOffsets(float[] weights)
Deprecated.
Computes the collection of weighted offsets corresponding to a scan of
the voxels in a 3D image in the forward direction.
|
static Collection<ChamferWeights3D.ShortOffset> |
getForwardOffsets(short[] weights)
Deprecated.
Computes the collection of weighted offsets corresponding to a scan of
the voxels in a 3D image in the forward direction.
|
short[] |
getShortWeights()
Deprecated.
|
String |
toString()
Deprecated.
|
static ChamferWeights3D |
valueOf(String name)
Deprecated.
Returns the enum constant of this type with the specified name.
|
static ChamferWeights3D[] |
values()
Deprecated.
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ChamferWeights3D CHESSBOARD
public static final ChamferWeights3D CITY_BLOCK
public static final ChamferWeights3D QUASI_EUCLIDEAN
public static final ChamferWeights3D BORGEFORS
public static final ChamferWeights3D WEIGHTS_3_4_5_7
public static ChamferWeights3D[] values()
for (ChamferWeights3D c : ChamferWeights3D.values()) System.out.println(c);
public static ChamferWeights3D 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 short[] getShortWeights()
public float[] getFloatWeights()
public String toString()
toString
in class Enum<ChamferWeights3D>
public static String[] getAllLabels()
public static ChamferWeights3D fromLabel(String label)
label
- the name of a chamfer weightIllegalArgumentException
- if label name is not recognized.public static Collection<ChamferWeights3D.ShortOffset> getForwardOffsets(short[] weights)
weights
- an array of (short) weights, corresponding to orthogonal,
diagonal, and optionally more neighbors.getForwardOffsets(float[])
,
getBackwardOffsets(short[])
public static Collection<ChamferWeights3D.FloatOffset> getForwardOffsets(float[] weights)
weights
- an array of (short) weights, corresponding to orthogonal,
diagonal, and optionally more neighbors.getForwardOffsets(short[])
,
getBackwardOffsets(float[])
public static Collection<ChamferWeights3D.ShortOffset> getBackwardOffsets(short[] weights)
weights
- an array of (short) weights, corresponding to orthogonal,
diagonal, and optionally more neighbors.getForwardOffsets(short[])
public static Collection<ChamferWeights3D.FloatOffset> getBackwardOffsets(float[] weights)
weights
- an array of (short) weights, corresponding to orthogonal,
diagonal, and optionally more neighbors.getForwardOffsets(short[])
Copyright © 2014–2023 INRA-IJPB Modeling and Digital Imaging lab. All rights reserved.