public class ChamferDistanceTransform2DFloat extends AlgoStub implements ChamferDistanceTransform2D
Example of use:
ChamferMask2D mask = ChamferMask2D.BORGEFORS();
boolean normalize = true;
DistanceTransform dt = new ChamferDistanceTransform2DFloat(mask, normalize);
ImageProcessor result = dt.distanceMap(inputImage);
ChamferDistanceTransform2DShort
Constructor and Description |
---|
ChamferDistanceTransform2DFloat(ChamferMask2D mask)
Creates a new algorithm for computing distance maps based on a chamfer
mask.
|
ChamferDistanceTransform2DFloat(ChamferMask2D mask,
boolean normalize)
Creates a new algorithm for computing distance maps based on a chamfer
mask.
|
Modifier and Type | Method and Description |
---|---|
ij.process.FloatProcessor |
distanceMap(ij.process.ImageProcessor labelImage)
Computes the distance map of the distance to the nearest pixel with a
different value.
|
ChamferMask2D |
mask()
Return the chamfer mask used by this distance transform algorithm.
|
addAlgoListener, fireProgressChanged, fireProgressChanged, fireStatusChanged, fireStatusChanged, removeAlgoListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addAlgoListener, removeAlgoListener
public ChamferDistanceTransform2DFloat(ChamferMask2D mask)
mask
- the chamfer mask to use for propagating distancespublic ChamferDistanceTransform2DFloat(ChamferMask2D mask, boolean normalize)
mask
- the chamfer mask to use for propagating distancesnormalize
- whether distance map should be normalized by the weight
associated to orthogonal shiftspublic ChamferMask2D mask()
ChamferDistanceTransform2D
mask
in interface ChamferDistanceTransform2D
public ij.process.FloatProcessor distanceMap(ij.process.ImageProcessor labelImage)
distanceMap
in interface DistanceTransform2D
labelImage
- a label image with black pixels (0) as foregroundCopyright © 2014–2023 INRA-IJPB Modeling and Digital Imaging lab. All rights reserved.