Module ij
Package ij.process

Class BinaryProcessor

All Implemented Interfaces:

public class BinaryProcessor
extends ByteProcessor
This class processes binary images.
  • Constructor Details

    • BinaryProcessor

      public BinaryProcessor​(ByteProcessor ip)
      Creates a BinaryProcessor from a ByteProcessor. The ByteProcessor must contain a binary image (pixels values are either 0 or 255). Backgound is assumed to be white.
  • Method Details

    • skeletonize

      public void skeletonize​(int foreground)
      Converts objects in a binary image with pixel values of 'forground' (255 or 0) to single pixel skeletons. Uses a lookup table to repeatably removes pixels from the edges of objects in a binary image, reducing them to single pixel wide skeletons. There is an entry in the table for each of the 256 possible 3x3 neighborhood configurations. An entry of '1' means delete pixel on first pass, '2' means delete pixel on second pass, and '3' means delete on either pass. Pixels are removed from the right and bottom edges of objects on the first pass and from the left and top edges on the second pass. A graphical representation of the 256 neighborhoods indexed by the table is available at "../../../../../images/skeletonize-table.gif".
      skeletonize in class ByteProcessor
    • skeletonize

      public void skeletonize()
      Converts black objects in a binary image to single pixel skeletons.
      skeletonize in class ByteProcessor
    • outline

      public void outline()
      outline in class ByteProcessor