java.lang.Object
ij.process.ImageProcessor
ij.process.ColorProcessor
ij.process.IntProcessor
- All Implemented Interfaces:
Cloneable
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
ConstructorsConstructorDescriptionIntProcessor
(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 TypeMethodDescriptionCreate an 8-bit AWT image by scaling pixels in the range min-max to 0-255.void
Returns this image as an 8-bit BufferedImage .int
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
For short and float images, recalculates the min and max image values needed to correctly display the image.void
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, 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, 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, toString, translate, translate, xor
-
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
Create an 8-bit AWT image by scaling pixels in the range min-max to 0-255.- Overrides:
createImage
in classColorProcessor
-
getBufferedImage
Returns this image as an 8-bit BufferedImage .- Overrides:
getBufferedImage
in classImageProcessor
-
setColorModel
Description copied from class:ImageProcessor
Sets the color model. Must be an IndexColorModel (aka LUT) for all processors except the ColorProcessor.- Overrides:
setColorModel
in classColorProcessor
-
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 classColorProcessor
- See Also:
-
getNChannels
public int getNChannels()Returns the number of channels (1).- Overrides:
getNChannels
in classColorProcessor
- 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 classImageProcessor
-
setMinAndMax
public void setMinAndMax(double minimum, double maximum, int channels) - Overrides:
setMinAndMax
in classColorProcessor
-