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 Details

    • DistanceTransform3D4WeightsFloat

      public DistanceTransform3D4WeightsFloat​(ChamferWeights3D 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

      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

      public DistanceTransform3D4WeightsFloat​(ChamferWeights3D weights, boolean normalize)
      Deprecated.
      Constructor specifying the chamfer weights and the optional normalization.
      Parameters:
      weights - an array of two weights for orthogonal and diagonal directions
      normalize - 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 directions
      normalize - 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 interface DistanceTransform3D
      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