Module ij
Package ij.process

# Class IntProcessor

java.lang.Object
ij.process.ImageProcessor
ij.process.ColorProcessor
ij.process.IntProcessor

All Implemented Interfaces:
  `Cloneable`

public class IntProcessor extends ColorProcessor
This is an extended ColorProcessor that supports signed 32-bit int images.

## Field Summary

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

`max, min, pixels, RGB_DILATE, RGB_ERODE, RGB_FIND_EDGES, RGB_MAX, RGB_MEDIAN, RGB_MIN, RGB_NOISE, RGB_RESIZE, RGB_ROTATE, RGB_SCALE, RGB_THRESHOLD, RGB_TRANSLATE, 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
`IntProcessor(int width, int height)`
Creates a blank IntProcessor with the specified dimensions.
`IntProcessor(int width, int height, int[] pixels)`
Creates an IntProcessor from a pixel array.

## Method Summary

Modifier and Type
Method
Description
`Image`
`createImage()`
Create an 8-bit AWT image by scaling pixels in the range min-max to 0-255.
`void`
`findMinAndMax()`
`BufferedImage`
`getBufferedImage()`
Returns this image as an 8-bit BufferedImage .
`int`
`getNChannels()`
Returns the number of channels (1).
`float`
`getPixelValue(int x, int y)`
Converts the specified pixel to grayscale using the formula g=(r+g+b)/3 and returns it as a float.
`void`
`resetMinAndMax()`
For short and float images, recalculates the min and max image values needed to correctly display the image.
`void`
`setColorModel(ColorModel cm)`
Sets the color model.
`void`
`setMinAndMax(double minimum, double maximum, int channels)`

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

`applyTable, applyTable, autoThreshold, caSnapshot, caSnapshot, convolve, convolve3x3, copyBits, createProcessor, crop, dilate, drawPixel, duplicate, erode, fill, fill, filter, filterRGB, findEdges, flipVertical, get, get, getBackgroundValue, getBestIndex, getBitDepth, getBrightness, getChannel, getChannel, getColor, getf, getf, getForegroundValue, getHistogram, getHistogram, getHSB, getHSB, getHSB32Stack, getHSBStack, getInterpolatedPixel, getInterpolatedRGBPixel, getMax, getMin, getPixel, getPixel, getPixelInterpolated, getPixels, getPixelsCopy, getRGB, getRGBWeights, getSnapshotPixels, getWeightingFactors, invertLut, isGrayscale, isInvertedLut, makeThumbnail, medianFilter, noise, putPixel, putPixel, putPixelValue, reset, reset, resize, rotate, scale, set, set, setBackgroundColor, setBackgroundValue, setBrightness, setChannel, setColor, setColor, setf, setf, setHSB, setHSB, setMinAndMax, setPixels, setPixels, setRGB, setRGBWeights, setRGBWeights, setSnapshotPixels, setValue, setWeightingFactors, snapshot, swapPixelArrays, threshold, toFloat, updateComposite, weightedHistogram`

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

`abs, add, add, and, applyMacro, bin, blurGaussian, clone, convertToByte, convertToByteProcessor, convertToByteProcessor, convertToColorProcessor, convertToFloat, convertToFloatProcessor, convertToRGB, convertToShort, convertToShortProcessor, convertToShortProcessor, createMask, cubic, draw, drawDot, drawDot2, drawLine, drawLine4, drawOval, drawOverlay, drawPolygon, drawRect, drawRoi, drawString, drawString, drawString, exp, fill, fillOutside, fillOval, fillPolygon, fillRect, fillValueSet, flipHorizontal, gamma, getAutoThreshold, getAutoThreshold, 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, getNeighborhood, getOverlay, getPixelCount, getProgressIncrement, getRoi, getRow, getRow, getSliceNumber, getStatistics, getStats, getStringBounds, getStringWidth, getThresholdColorModel, getValue, getWidth, hideProgress, insert, invert, isBinary, isColorLut, isDefaultLut, isKillable, isPseudoColorLut, isSigned16Bit, isThreshold, lineTo, ln, log, makeDefaultColorModel, maskSizeError, max, maxValue, min, minValue, moveTo, multiply, or, putColumn, putColumn, putRow, putRow, resetBinaryThreshold, resetRoi, resetThreshold, resize, resize, resizeLinearly, rotateLeft, rotateRight, scaleAndSetThreshold, set, setAntialiasedText, setAutoThreshold, setAutoThreshold, setAutoThreshold, setAutoThreshold, setAutoThreshold, setBinaryThreshold, setCalibrationTable, setClipRect, setColor, setColor, 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, setThreshold, setUnderColor, setUseBicubic, sharpen, showProgress, smooth, sqr, sqrt, subtract, threshold, toString, translate, translate, xor`

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

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

## Constructor Details

### IntProcessor

public IntProcessor(int width, int height)
Creates a blank IntProcessor with the specified dimensions.

### IntProcessor

public IntProcessor(int width, int height, int[] pixels)
Creates an IntProcessor from a pixel array.

## Method Details

### createImage

public Image createImage()
Create an 8-bit AWT image by scaling pixels in the range min-max to 0-255.

Overrides:
  `createImage` in class `ColorProcessor`

### getBufferedImage

public BufferedImage getBufferedImage()
Returns this image as an 8-bit BufferedImage .

Overrides:
  `getBufferedImage` in class `ImageProcessor`

### setColorModel

public void setColorModel(ColorModel cm)
Description copied from class: `ImageProcessor`
Sets the color model. Must be an IndexColorModel (aka LUT) for all processors except the ColorProcessor.

Overrides:
  `setColorModel` in class `ColorProcessor`

### getPixelValue

public float getPixelValue(int x, int y)
Description copied from class: `ColorProcessor`
Converts the specified pixel to grayscale using the formula g=(r+g+b)/3 and returns it as a float. Call setWeightingFactors() to specify different conversion factors.

Overrides:
  `getPixelValue` in class `ColorProcessor`
See Also:
  - `ImageProcessor.getPixel(int, int)`
  - `ImageProcessor.getValue(int, int)`
  - `ImageProcessor.getf(int, int)`

### getNChannels

public int getNChannels()
Returns the number of channels (1).

Overrides:
  `getNChannels` in class `ColorProcessor`
Returns:
  1 for grayscale images, 3 for RGB images

### findMinAndMax

public void findMinAndMax()

### resetMinAndMax

public void resetMinAndMax()
Description copied from class: `ImageProcessor`
For short and float images, recalculates the min and max image values needed to correctly display the image. For ByteProcessors, resets the LUT.

Overrides:
  `resetMinAndMax` in class `ImageProcessor`

### setMinAndMax

public void setMinAndMax(double minimum, double maximum, int channels)

Overrides:
  `setMinAndMax` in class `ColorProcessor`