Module ij
Package ij.process

# Class BinaryProcessor

java.lang.Object
ij.process.ImageProcessor
ij.process.ByteProcessor
ij.process.BinaryProcessor

All Implemented Interfaces:
  `Cloneable`

public class BinaryProcessor extends ByteProcessor
This class processes binary images.

## Field Summary

### Fields inherited from class ij.process.ByteProcessor

`pixels, snapshotPixels`

### Fields inherited from class ij.process.ImageProcessor

`antialiasedText, baseCM, BICUBIC, BILINEAR, BLACK, BLACK_AND_WHITE_LUT, BLUR_MORE, bLUT1, bLUT2, boldFont, CENTER_JUSTIFY, clipXMax, clipXMin, clipYMax, clipYMin, cm, cm2, CONVOLVE, cTable, cx, cy, defaultColorModel, drawingColor, fillValueSet, FIND_EDGES, fmGraphics, fmImage, font, fontMetrics, gLUT1, gLUT2, height, histogramMax, histogramMin, histogramSize, image, img, interpolate, interpolationMethod, inversionTested, INVERT_PROJECTION, invertedLut, ISODATA, ISODATA2, justification, LEFT_JUSTIFY, lineWidth, lutAnimation, lutUpdateMode, MAX, MAX_PROJECTION, maxThreshold, MEDIAN_FILTER, MIN, MIN_PROJECTION, minMaxSet, minThreshold, NEAREST_NEIGHBOR, newPixels, NO_LUT_UPDATE, NO_THRESHOLD, NONE, OVER_UNDER_LUT, raster, RED_LUT, RIGHT_JUSTIFY, rLUT1, rLUT2, rnd, roiHeight, roiWidth, roiX, roiY, sampleModel, seed, SET_FIRST_CHANNEL, snapshotHeight, snapshotWidth, source, SUM_PROJECTION, UPDATE_BLUE, UPDATE_GREEN, UPDATE_RED, width, xMax, xMin, yMax, yMin`

## Constructor Summary

Constructors
Constructor
Description
`BinaryProcessor(ByteProcessor ip)`
Creates a BinaryProcessor from a ByteProcessor.

## Method Summary

Modifier and Type
Method
Description
`void`
`outline()`
`void`
`skeletonize()`
Converts black objects in a binary image to single pixel skeletons.
`void`
`skeletonize(int foreground)`
Converts objects in a binary image with pixel values of 'forground' (255 or 0) to single pixel skeletons.

### Methods inherited from class ij.process.ByteProcessor

`applyLut, applyTable, convolve, convolve3x3, copyBits, createImage, createMask, createProcessor, crop, dilate, dilate, drawPixel, duplicate, erode, erode, fill, filter, flipVertical, get, get, getBackgroundValue, getBitDepth, getBufferedImage, getf, getf, getForegroundValue, getHistogram, getHistogram, getInterpolatedPixel, getMax, getMin, getPixel, getPixelInterpolated, getPixels, getPixelsCopy, getPixelValue, getSnapshotPixels, isBinary, medianFilter, noise, putPixel, putPixelValue, reset, reset, resetMinAndMax, resize, rotate, scale, set, set, setBackgroundColor, setBackgroundValue, setColor, setf, setf, setFromFloatArrays, setFromFloatProcessors, setMinAndMax, setPixels, setPixels, setSnapshotPixels, setThreshold, setValue, snapshot, swapPixelArrays, threshold, threshold, toFloat, toFloatArrays, toFloatProcessors`

### Methods inherited from class ij.process.ImageProcessor

`abs, add, add, and, applyMacro, autoThreshold, bin, blurGaussian, clone, convertToByte, convertToByteProcessor, convertToByteProcessor, convertToColorProcessor, convertToFloat, convertToFloatProcessor, convertToRGB, convertToShort, convertToShortProcessor, convertToShortProcessor, cubic, draw, drawDot, drawDot2, drawLine, drawLine4, drawOval, drawOverlay, drawPolygon, drawRect, drawRoi, drawString, drawString, drawString, exp, fill, fill, fillOutside, fillOval, fillPolygon, fillRect, fillValueSet, findEdges, flipHorizontal, gamma, getAutoThreshold, getAutoThreshold, getBestIndex, getBicubicInterpolatedPixel, getCalibrationTable, getColorModel, getColumn, getColumn, getCurrentColorModel, getDefaultColorModel, getFloatArray, getFont, getFontMetrics, getHeight, getHistogram, getHistogramMax, getHistogramMin, getHistogramSize, getIndexSampleModel, getIntArray, getInterpolate, getInterpolatedValue, getInterpolationMethod, getInterpolationMethods, getLine, getLineWidth, getLut, getLutUpdateMode, getMask, getMaskArray, getMaxThreshold, getMinThreshold, getNChannels, getNeighborhood, getOverlay, getPixel, getPixelCount, getProgressIncrement, getRoi, getRow, getRow, getSliceNumber, getStatistics, getStats, getStringBounds, getStringWidth, getThresholdColorModel, getValue, getWidth, hideProgress, insert, invert, invertLut, isColorLut, isDefaultLut, isGrayscale, isInvertedLut, isKillable, isPseudoColorLut, isSigned16Bit, isThreshold, lineTo, ln, log, makeDefaultColorModel, maskSizeError, max, maxValue, min, minValue, moveTo, multiply, or, putColumn, putColumn, putPixel, putRow, putRow, resetBinaryThreshold, resetRoi, resetThreshold, resize, resize, resizeLinearly, rotateLeft, rotateRight, scaleAndSetThreshold, set, setAntialiasedText, setAutoThreshold, setAutoThreshold, setAutoThreshold, setAutoThreshold, setAutoThreshold, setBinaryThreshold, setCalibrationTable, setClipRect, setColor, setColor, setColor, setColorModel, setFloatArray, setFont, setFontSize, setGlobalBackgroundColor, setGlobalForegroundColor, setHistogramRange, setHistogramSize, setIntArray, setInterpolate, setInterpolationMethod, setJustification, setLineWidth, setLut, setLutAnimation, setMask, setOverColor, setOverlay, setProgressBar, setRandomSeed, setRoi, setRoi, setRoi, setRoi, setSliceNumber, setSnapshotCopyMode, setThreshold, setUnderColor, setUseBicubic, sharpen, showProgress, smooth, sqr, sqrt, subtract, toString, translate, translate, updateComposite, xor`

### Methods inherited from class java.lang.Object

`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## 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 "http://imagej.nih.gov/ij/images/skeletonize-table.gif".

Overrides:
  `skeletonize` in class `ByteProcessor`

### skeletonize

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

Overrides:
  `skeletonize` in class `ByteProcessor`

### outline

public void outline()

Overrides:
  `outline` in class `ByteProcessor`