@Deprecated public class DistanceTransform5x5Float extends AlgoStub implements DistanceTransform
Computes Chamfer distances in a 5x5 neighborhood using a FloatProcessor object for storing result.
Uses 5x5 chamfer map, with two passes (one forward, one backward). Three different weights are provided for orthogonal, diagonal, and "chess-knight" moves. Weights equal to (5,7,11) usually give nice results.
Example of use:
float[] floatWeights = ChamferWeights.CHESSKNIGHT.getFloatWeights();
boolean normalize = true;
DistanceTransform dt = new DistanceTransform5x5Float(floatWeights, normalize);
ImageProcessor result = dt.distanceMap(inputImage);
// or:
ImagePlus resultPlus = BinaryImages.distanceMap(imagePlus, floatWeights, normalize);
BinaryImages.distanceMap(ImageProcessor, float[], boolean),
DistanceTransform5x5Short,
DistanceTransform| Constructor and Description |
|---|
DistanceTransform5x5Float()
Deprecated.
Default constructor with predefined chamfer weights.
|
DistanceTransform5x5Float(ChamferWeights weights)
Deprecated.
Constructor specifying the chamfer weights and the optional
normalization.
|
DistanceTransform5x5Float(ChamferWeights weights,
boolean normalize)
Deprecated.
Constructor specifying the chamfer weights and the optional
normalization.
|
DistanceTransform5x5Float(float[] weights)
Deprecated.
Default constructor that specifies the chamfer weights.
|
DistanceTransform5x5Float(float[] weights,
boolean normalize)
Deprecated.
Constructor specifying the chamfer weights and the optional
normalization.
|
| Modifier and Type | Method and Description |
|---|---|
ij.process.FloatProcessor |
distanceMap(ij.process.ImageProcessor labelImage)
Deprecated.
Computes the distance map of the distance to the nearest pixel with a different value.
|
addAlgoListener, fireProgressChanged, fireProgressChanged, fireStatusChanged, fireStatusChanged, removeAlgoListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddAlgoListener, removeAlgoListenerpublic DistanceTransform5x5Float()
public DistanceTransform5x5Float(ChamferWeights weights)
weights - a set of chamfer weights with at least three valuespublic DistanceTransform5x5Float(float[] weights)
weights - an array of two weights for orthogonal and diagonal directionspublic DistanceTransform5x5Float(ChamferWeights weights, boolean normalize)
weights - an array of two weights for orthogonal and diagonal directionsnormalize - flag indicating whether the final distance map should be
normalized by the first weightpublic DistanceTransform5x5Float(float[] weights,
boolean normalize)
weights - an array of two weights for orthogonal and diagonal directionsnormalize - flag indicating whether the final distance map should be
normalized by the first weightpublic ij.process.FloatProcessor distanceMap(ij.process.ImageProcessor labelImage)
distanceMap in interface DistanceTransformlabelImage - a label image with black pixels (0) as foregroundCopyright © 2014–2023 INRA-IJPB Modeling and Digital Imaging lab. All rights reserved.