Class Thinning

java.lang.Object
qupath.opencv.tools.Thinning

public class Thinning extends Object
Implementation of the 3D binary thinning algorithm of
Lee et al.
"Building skeleton models via 3-D medial surface/axis thinning algorithms."
Computer Vision, Graphics, and Image Processing, 56(6):462–478, 1994.
This is a new implementation, developed with reference to the original paper and two other implementations:
  • the ITK version from Hanno Homann (possibly-broken link http://hdl.handle.net/1926/1292)
  • the Skeletonize3D ImageJ plugin by Ignacio Arganda-Carreras
These were mostly used to help debug thorny issues around pixel ordering in the lookup tables. This implementation uses a different design with some additional optimizations, but should give the same results as "Skeletonize3D".
Author:
Pete Bankhead
  • Constructor Details

    • Thinning

      public Thinning()
  • Method Details

    • thin

      public static void thin(Mat mat)
      Thin the binary image in Mat. Here, the image is assumed to be 2D or 3D; if 3D, then the z information is found along the channels dimension.

      The thinning is performed in-place. The image is converted to uint8 if required; non-zero pixels are considered foreground and zero pixels background.

      The resulting image has 0 in the background and retains the original (after conversion to 8-bit) value in the foreground (typically 1 or 255).

      Parameters:
      mat - the image to thin