Package inra.ijpb.label.distmap
Class DistanceTransform3DShort
java.lang.Object
inra.ijpb.algo.AlgoStub
inra.ijpb.label.distmap.DistanceTransform3DShort
- All Implemented Interfaces:
Algo
,DistanceTransform3D
@Deprecated public class DistanceTransform3DShort extends AlgoStub implements DistanceTransform3D
Deprecated.
replaced by ChamferDistanceTransform3DShort (since 1.4.4)
Computes Chamfer distances in a 3x3x3 neighborhood and storing result in
16-bits image.
In practice, computations are done with integers, but result is stored in a
3D short image, thus requiring less memory than floating point.
-
Constructor Summary
Constructors Constructor Description DistanceTransform3DShort(short[] weights)
Deprecated.Default constructor that specifies the chamfer weights.DistanceTransform3DShort(short[] weights, boolean normalize)
Deprecated.Constructor specifying the chamfer weights and the optional normalization.DistanceTransform3DShort(ChamferWeights3D weights)
Deprecated.Default constructor that specifies the chamfer weights.DistanceTransform3DShort(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
-
DistanceTransform3DShort
Deprecated.Default constructor that specifies the chamfer weights.- Parameters:
weights
- an array of two weights for orthogonal and diagonal directions
-
DistanceTransform3DShort
public DistanceTransform3DShort(short[] weights)Deprecated.Default constructor that specifies the chamfer weights.- Parameters:
weights
- an array of two weights for orthogonal and diagonal directions
-
DistanceTransform3DShort
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
-
DistanceTransform3DShort
public DistanceTransform3DShort(short[] 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
-