Package inra.ijpb.binary.distmap

Computations of distance maps on binary images, using chamfer distances (integer approximation of Euclidean distances).

Contains implementations for computation using shorts or float values, for 3x3 and 5x5 neighborhoods.

Example of use:


	ChamferMask3D mask = ChamferMask3D.CHESSKNIGHT;
	boolean normalize = true;
	DistanceTransform dt = new ChamferDistanceTransform2DShort(mask, normalize);
	ImageProcessor result = dt.distanceMap(inputImage);
	// or:
	ImagePlus resultPlus = BinaryImages.distanceMap(imagePlus, mask, false, normalize);
 
See Also:
BinaryImages.distanceMap(ImageProcessor, short[], boolean), BinaryImages.distanceMap(ImageProcessor, float[], boolean), DistanceTransform
  • Interface Summary
    Interface Description
    ChamferDistanceTransform2D
    Specialization of DistanceTransform based on the use of a chamfer mask.
    ChamferDistanceTransform3D
    Specialization of DistanceTransform based on the use of a chamfer mask.
    DistanceTransform
    Interface for computing distance maps from binary images.
    DistanceTransform3D
    Interface for computing distance maps from binary 3D images.
  • Class Summary
    Class Description
    ChamferDistanceTransform2DFloat
    Computes distance transform on binary images by propagating distances using a ChamferMask2D, and using 32-bits floating-point computation.
    ChamferDistanceTransform2DShort
    Computes distance transform by propagating distances using a ChamferMask2D, and using 16-bits integer computation.
    ChamferDistanceTransform3DFloat
    Computes 3D distance transform on binary images using the chamfer weights provided by a ChamferMask3D object, and using 32-bits floating-point computation.
    ChamferDistanceTransform3DShort
    Computes 3D distance transform using the chamfer weights provided by a ChamferMask3D object, and using 16-bits integer computation.
    ChamferMask2D
    Chamfer masks defines a series of weights associated to neighbors of current pixels.
    ChamferMask2D.FloatOffset
    The shift to a neighbor of a reference pixel, as a pair (dx,dy), and the associated weights given as a float.
    ChamferMask2D.ShortOffset
    The shift to a neighbor of a reference pixel, as a pair (dx,dy), and the associated weights given as a short.
    ChamferMask2DW2
    Implementation of Chamfer Weights that manages two types of offsets, corresponding to orthogonal and diagonal neighbors.
    ChamferMask2DW2Float
    Implementation of Chamfer Weights that manages two types of offsets, corresponding to orthogonal, and diagonal neighbors.
    ChamferMask2DW3
    Implementation of Chamfer Weights that manages three types of offsets types: orthogonal, diagonal neighbors and "chess-knight move" neighbors.
    ChamferMask2DW4
    Implementation of 2D Chamfer mask that manages four types of offsets types.
    ChamferMask3D
    A collection of weighted offsets for computing distance maps from 3D binary images.
    ChamferMask3D.FloatOffset
    The shift to a neighbor of a reference voxel, as a triplet (dx,dy,dz), and the associated weights given as a float.
    ChamferMask3D.ShortOffset
    The shift to a neighbor of a reference voxel, as a triplet (dx,dy,dz), and the associated weights given as a short.
    ChamferMask3DW3
    Implementation of Chamfer Weights for 3D images that manages three type offset types, corresponding to orthogonal, square-diagonal and cube-diagonal neighbors.
    ChamferMask3DW3Float
    Implementation of Chamfer Weights for 3D images that manages three types of offsets, corresponding to orthogonal, square-diagonal and cube-diagonal neighbors.
    ChamferMask3DW4
    Implementation of Chamfer Weights for 3D images that manages four types of offsets.
    ChamferMask3DW5
    Implementation of Chamfer Weights for 3D images that manages five types of offsets.
    ChamferMask3DW6
    Implementation of Chamfer Weights for 3D images that manages six types of offsets (all the possibilities in a 5-by-5-by-5 neighborhood).
    DistanceTransform3D4WeightsFloat Deprecated.
    replaced by ChamferDistanceTransform3DFloat (since 1.5.0)
    DistanceTransform3D4WeightsShort Deprecated.
    replaced by ChamferDistanceTransform3DShort (since 1.5.0)
    DistanceTransform3DFloat Deprecated.
    replaced by ChamferDistanceTransform3DFloat (since 1.5.0)
    DistanceTransform3DShort Deprecated.
    replaced by ChamferDistanceTransform3DShort (since 1.5.0)
    DistanceTransform3x3Float Deprecated.
    replaced by ChamferDistanceTransform2DFloat (since 1.5.0)
    DistanceTransform3x3Short Deprecated.
    replaced by ChamferDistanceTransform2DShort (since 1.5.0)
    DistanceTransform5x5Float Deprecated.
    replaced by ChamferDistanceTransform2DFloat (since 1.5.0)
    DistanceTransform5x5Short Deprecated.
    replaced by ChamferDistanceTransform2DShort (since 1.5.0)
  • Enum Summary
    Enum Description
    ChamferMasks2D
    A pre-defined set of weights that can be used to compute distance transform using chamfer approximations of euclidean metric.
    ChamferMasks3D
    A pre-defined set of weights that can be used to compute 3D distance transform using chamfer approximations of euclidean metric.