|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectij.process.ImageProcessor
ij.process.FloatProcessor
public class FloatProcessor
This is an 32-bit floating-point image and methods that operate on that image.
Field Summary |
---|
Fields inherited from class ij.process.ImageProcessor |
---|
baseCM, BLACK, BLACK_AND_WHITE_LUT, bLUT1, bLUT2, cm, cTable, cx, cy, font, fontMetrics, gLUT1, gLUT2, height, histogramSize, imageSource, interpolate, inversionTested, invertedLut, lineWidth, lutAnimation, maxThreshold, minThreshold, NO_LUT_UPDATE, NO_THRESHOLD, RED_LUT, rLUT1, rLUT2, roiHeight, roiWidth, roiX, roiY, snapshotHeight, snapshotWidth, width, xMax, xMin, yMax, yMin |
Constructor Summary | |
---|---|
FloatProcessor(int width,
int height)
Creates a blank FloatProcessor using the default grayscale LUT that displays zero as black. |
|
FloatProcessor(int width,
int height,
float[] pixels,
java.awt.image.ColorModel cm)
Creates a new FloatProcessor using the specified pixel array and ColorModel. |
Method Summary | |
---|---|
void |
add(int value)
Adds 'value' to each pixel in the image or ROI. |
void |
and(int value)
Binary AND of each pixel in the image or ROI with 'value'. |
void |
applyTable(int[] lut)
Transforms the image or ROI using a lookup table. |
void |
autoThreshold()
For byte images, converts to binary using an automatically determined threshold. |
void |
convolve3x3(int[] kernel)
3x3 convolution contributed by Glynne Casteel. |
void |
copyBits(ImageProcessor ip,
int xloc,
int yloc,
int mode)
Copies the image contained in 'ip' to (xloc, yloc) using one of the transfer modes defined in the Blitter interface. |
java.awt.Image |
createImage()
Returns a copy of this image is the form of an AWT Image. |
ImageProcessor |
createProcessor(int width,
int height)
Returns a new, blank FloatProcessor with the specified width and height. |
ImageProcessor |
crop()
Creates a new processor containing an image that corresponds to the current ROI. |
void |
dilate()
Dilates the image or ROI using a 3x3 minimum filter. |
void |
drawPixel(int x,
int y)
Draws a pixel in the current foreground color. |
void |
erode()
Erodes the image or ROI using a 3x3 maximum filter. |
void |
fill()
Fills the current rectangular ROI. |
void |
fill(int[] mask)
Fills pixels that are within roi and part of the mask. |
void |
filter(int type)
Filters using a 3x3 neighborhood. |
void |
findMinAndMax()
Calculates the minimum and maximum pixel value for the entire image. |
void |
gamma(double value)
Performs gamma correction of the image or ROI. |
int[] |
getHistogram()
Returns the histogram of the image or ROI. |
double |
getInterpolatedPixel(double x,
double y)
Uses bilinear interpolation to find the pixel value at real coordinates (x,y). |
double |
getMax()
Returns the largest displayed pixel value. |
double |
getMin()
Returns the smallest displayed pixel value. |
int |
getPixel(int x,
int y)
Returns a pixel value that must be converted using Float.intBitsToFloat(). |
java.lang.Object |
getPixels()
Returns a reference to the float array containing this image's pixel data. |
java.lang.Object |
getPixelsCopy()
Returns a reference to this image's snapshot (undo) array. |
float |
getPixelValue(int x,
int y)
Returns the value of the pixel at (x,y). |
void |
invert()
Inverts the image or ROI. |
void |
log()
Performs a log transform on the image or ROI. |
void |
medianFilter()
A 3x3 median filter. |
void |
multiply(double value)
Multiplies each pixel in the image or ROI by 'value'. |
void |
noise(double range)
Adds random noise to the image or ROI. |
void |
or(int value)
Binary OR of each pixel in the image or ROI with 'value'. |
void |
putPixel(int x,
int y,
int value)
Stores the specified value at (x,y). |
void |
putPixelValue(int x,
int y,
double value)
Stores the specified real value at (x,y). |
void |
reset()
Restores the pixel data from the snapshot (undo) buffer. |
void |
reset(int[] mask)
Restore pixels that are within roi but not part of the mask. |
void |
resetMinAndMax()
Recalculates the min and max values used to scale pixel values to 0-255 for display. |
ImageProcessor |
resize(int dstWidth,
int dstHeight)
Creates a new FloatProcessor containing a scaled copy of this image or selection. |
void |
rotate(double angle)
Rotates the image or ROI 'angle' degrees clockwise. |
void |
scale(double xScale,
double yScale)
Scales the image or selection using the specified scale factors. |
void |
setColor(java.awt.Color color)
Sets the foreground fill/draw color. |
void |
setMinAndMax(double min,
double max)
Sets the min and max variables that control how real pixel values are mapped to 0-255 screen values. |
void |
setPixels(java.lang.Object pixels)
Sets a new pixel array for the image and resets the snapshot buffer. |
void |
setThreshold(double minThreshold,
double maxThreshold,
int lutUpdate)
Sets the lower and upper threshold levels. |
void |
setValue(double value)
Sets the default fill/draw value. |
void |
snapshot()
Makes a copy of this image's pixel data. |
void |
threshold(int level)
|
void |
xor(int value)
Binary exclusive OR of each pixel in the image or ROI with 'value'. |
Methods inherited from class ij.process.ImageProcessor |
---|
convertToByte, convertToFloat, convertToRGB, convertToShort, drawDot, drawDot2, drawString, duplicate, findEdges, flipHorizontal, flipVertical, getBestIndex, getColorModel, getColumn, getHeight, getHistogramSize, getImageSource, getLine, getMask, getMaxThreshold, getMinThreshold, getRoi, getRow, getStringWidth, getWidth, hideProgress, insert, invertLut, isInvertedLut, isKillable, lineTo, makeDefaultColorModel, moveTo, putColumn, putRow, rotateLeft, rotateRight, setCalibrationTable, setColor, setColorModel, setFont, setHistogramSize, setInterpolate, setLineWidth, setLutAnimation, setMask, setProgressBar, setRoi, setRoi, sharpen, showProgress, smooth, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FloatProcessor(int width, int height, float[] pixels, java.awt.image.ColorModel cm)
public FloatProcessor(int width, int height)
Method Detail |
---|
public void findMinAndMax()
getMin()
,
getMin()
public void setMinAndMax(double min, double max)
setMinAndMax
in class ImageProcessor
ContrastAdjuster
public void resetMinAndMax()
resetMinAndMax
in class ImageProcessor
public double getMin()
getMin
in class ImageProcessor
public double getMax()
getMax
in class ImageProcessor
public java.awt.Image createImage()
ImageProcessor
createImage
in class ImageProcessor
public ImageProcessor createProcessor(int width, int height)
createProcessor
in class ImageProcessor
public void snapshot()
ImageProcessor
snapshot
in class ImageProcessor
public void reset()
ImageProcessor
reset
in class ImageProcessor
public void reset(int[] mask)
ImageProcessor
reset
in class ImageProcessor
public int getPixel(int x, int y)
getPixel
in class ImageProcessor
public double getInterpolatedPixel(double x, double y)
getInterpolatedPixel
in class ImageProcessor
public void putPixel(int x, int y, int value)
putPixel
in class ImageProcessor
public void putPixelValue(int x, int y, double value)
putPixelValue
in class ImageProcessor
public float getPixelValue(int x, int y)
ImageProcessor
getPixelValue
in class ImageProcessor
public void drawPixel(int x, int y)
drawPixel
in class ImageProcessor
public java.lang.Object getPixels()
getPixels
in class ImageProcessor
public java.lang.Object getPixelsCopy()
ImageProcessor
getPixelsCopy
in class ImageProcessor
public void setPixels(java.lang.Object pixels)
ImageProcessor
setPixels
in class ImageProcessor
public void copyBits(ImageProcessor ip, int xloc, int yloc, int mode)
copyBits
in class ImageProcessor
public void applyTable(int[] lut)
ImageProcessor
applyTable
in class ImageProcessor
public void invert()
ImageProcessor
invert
in class ImageProcessor
public void add(int value)
ImageProcessor
add
in class ImageProcessor
public void multiply(double value)
ImageProcessor
multiply
in class ImageProcessor
public void and(int value)
ImageProcessor
and
in class ImageProcessor
public void or(int value)
ImageProcessor
or
in class ImageProcessor
public void xor(int value)
ImageProcessor
xor
in class ImageProcessor
public void gamma(double value)
ImageProcessor
gamma
in class ImageProcessor
public void log()
ImageProcessor
log
in class ImageProcessor
public void fill()
fill
in class ImageProcessor
public void fill(int[] mask)
fill
in class ImageProcessor
public void convolve3x3(int[] kernel)
convolve3x3
in class ImageProcessor
public void filter(int type)
filter
in class ImageProcessor
public void rotate(double angle)
rotate
in class ImageProcessor
ImageProcessor.setInterpolate(boolean)
public void noise(double range)
ImageProcessor
noise
in class ImageProcessor
range
- the range of random numberspublic ImageProcessor crop()
ImageProcessor
crop
in class ImageProcessor
public void scale(double xScale, double yScale)
scale
in class ImageProcessor
ImageProcessor.setInterpolate(boolean)
public ImageProcessor resize(int dstWidth, int dstHeight)
resize
in class ImageProcessor
ImageProcessor.setInterpolate(boolean)
public void setColor(java.awt.Color color)
setColor
in class ImageProcessor
public void setValue(double value)
setValue
in class ImageProcessor
public void setThreshold(double minThreshold, double maxThreshold, int lutUpdate)
ImageProcessor
setThreshold
in class ImageProcessor
public void threshold(int level)
public void autoThreshold()
ImageProcessor
autoThreshold
in class ImageProcessor
public void medianFilter()
ImageProcessor
medianFilter
in class ImageProcessor
public int[] getHistogram()
ImageProcessor
getHistogram
in class ImageProcessor
public void erode()
ImageProcessor
erode
in class ImageProcessor
public void dilate()
ImageProcessor
dilate
in class ImageProcessor
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |