Package inra.ijpb.binary.distmap
Class DistanceTransform3D4WeightsFloat
java.lang.Object
inra.ijpb.algo.AlgoStub
inra.ijpb.binary.distmap.DistanceTransform3D4WeightsFloat
- All Implemented Interfaces:
Algo
,DistanceTransform3D
@Deprecated public class DistanceTransform3D4WeightsFloat extends AlgoStub implements DistanceTransform3D
Deprecated.
replaced by ChamferDistanceTransform3DFloat (since 1.5.0)
Computes 3D distance transform in a 5x5x5 neighborhood using four chamfer
weights and floating point calculation.
- Author:
- David Legland
-
Constructor Summary
Constructors Constructor Description DistanceTransform3D4WeightsFloat(float[] weights)
Deprecated.Default constructor that specifies the chamfer weights.DistanceTransform3D4WeightsFloat(float[] weights, boolean normalize)
Deprecated.Constructor specifying the chamfer weights and the optional normalization.DistanceTransform3D4WeightsFloat(ChamferWeights3D weights)
Deprecated.Default constructor that specifies the chamfer weights.DistanceTransform3D4WeightsFloat(ChamferWeights3D weights, boolean normalize)
Deprecated.Constructor specifying the chamfer weights and the optional normalization. -
Method Summary
Modifier and Type Method Description ij.ImageStack
distanceMap(ij.ImageStack image)
Deprecated.Computes the distance map from a 3D binary image.Methods inherited from class inra.ijpb.algo.AlgoStub
addAlgoListener, removeAlgoListener
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface inra.ijpb.algo.Algo
addAlgoListener, removeAlgoListener
-
Constructor Details
-
DistanceTransform3D4WeightsFloat
Deprecated.Default constructor that specifies the chamfer weights.- Parameters:
weights
- an array of four weights direction orthogonal, diagonal, cube diagonal, and (+-2,+-1,+-1).
-
DistanceTransform3D4WeightsFloat
public DistanceTransform3D4WeightsFloat(float[] weights)Deprecated.Default constructor that specifies the chamfer weights.- Parameters:
weights
- an array of four weights direction orthogonal, diagonal, cube diagonal, and (+-2,+-1,+-1).
-
DistanceTransform3D4WeightsFloat
Deprecated.Constructor specifying the chamfer weights and the optional normalization.- Parameters:
weights
- an array of two weights for orthogonal and diagonal directionsnormalize
- flag indicating whether the final distance map should be normalized by the first weight
-
DistanceTransform3D4WeightsFloat
public DistanceTransform3D4WeightsFloat(float[] weights, boolean normalize)Deprecated.Constructor specifying the chamfer weights and the optional normalization.- Parameters:
weights
- an array of two weights for orthogonal and diagonal directionsnormalize
- flag indicating whether the final distance map should be normalized by the first weight
-
-
Method Details
-
distanceMap
public ij.ImageStack distanceMap(ij.ImageStack image)Deprecated.Computes the distance map from a 3D binary image. Distance is computed for each foreground (white) pixel, as the chamfer distance to the nearest background (black) pixel.- Specified by:
distanceMap
in interfaceDistanceTransform3D
- Parameters:
image
- a 3D binary image with white pixels (255) as foreground- Returns:
- a new 3D image containing:
- 0 for each background pixel
- the distance to the nearest background pixel otherwise
-