Class: ByteProcessor

ByteProcessor

new ByteProcessor(img)

Creates a ByteProcessor from an AWT Image.

Parameters:
Name Type Description
img java.awt.Image

-

Author:
  • Created by ijdoc2js

Methods

applyLut()

Author:
  • Created by ijdoc2js

applyTable(lut)

Transforms the image or ROI using a lookup table. The length of the table must be 256 for byte images and 65536 for short images. RGB and float images are not supported.

Parameters:
Name Type Description
lut Array.<int>

-

Author:
  • Created by ijdoc2js

convolve(kernel, kernelWidth, kernelHeight)

Performs a convolution operation using the specified kernel.

Parameters:
Name Type Description
kernel Array.<float>

-

kernelWidth int

-

kernelHeight int

-

Author:
  • Created by ijdoc2js

convolve3x3(kernel)

Convolves the image or ROI with the specified 3x3 integer convolution kernel.

Parameters:
Name Type Description
kernel Array.<int>

-

Author:
  • Created by ijdoc2js

copyBits(ip, xloc, yloc, mode)

Copies the image contained in 'ip' to (xloc, yloc) using one of the transfer modes defined in the Blitter interface.

Parameters:
Name Type Description
ip ImageProcessor

-

xloc int

-

yloc int

-

mode int

-

Author:
  • Created by ijdoc2js

createImage()

Returns a copy of this image is the form of an AWT Image.

Author:
  • Created by ijdoc2js
Returns:

java.awt.Image

createProcessor(width, height)

Returns a new, blank ByteProcessor with the specified width and height.

Parameters:
Name Type Description
width int

-

height int

-

Author:
  • Created by ijdoc2js
Returns:

ImageProcessor

crop()

Creates a new processor containing an image that corresponds to the current ROI.

Author:
  • Created by ijdoc2js
Returns:

ImageProcessor

dilate()

Dilates the image or ROI using a 3x3 minimum filter. Requires 8-bit or RGB image.

Author:
  • Created by ijdoc2js

dilate(count, background)

Parameters:
Name Type Description
count int

-

background int

-

Author:
  • Created by ijdoc2js

drawPixel(x, y)

Draws a pixel in the current foreground color.

Parameters:
Name Type Description
x int

-

y int

-

Author:
  • Created by ijdoc2js

duplicate()

Returns a duplicate of this image.

Author:
  • Created by ijdoc2js
Returns:

ImageProcessor

erode()

Erodes the image or ROI using a 3x3 maximum filter. Requires 8-bit or RGB image.

Author:
  • Created by ijdoc2js

erode(count, background)

Parameters:
Name Type Description
count int

-

background int

-

Author:
  • Created by ijdoc2js

fill(mask)

Sets pixels that are within roi and part of the mask to the foreground color. Does nothing if the mask is not the same size as the ROI.

Parameters:
Name Type Description
mask ImageProcessor

-

Author:
  • Created by ijdoc2js

filter(type)

Filters using a 3x3 neighborhood. The p1, p2, etc variables, which contain the values of the pixels in the neighborhood, are arranged as follows:

 p1 p2 p3
p4 p5 p6
p7 p8 p9
Parameters:
Name Type Description
type int

-

Author:
  • Created by ijdoc2js

flipVertical()

Flips the image or ROI vertically.

Author:
  • Created by ijdoc2js

get(index)

Parameters:
Name Type Description
index int

-

Author:
  • Created by ijdoc2js
Returns:

int

get(x, y)

This is a faster version of getPixel() that does not do bounds checking.

Parameters:
Name Type Description
x int

-

y int

-

Author:
  • Created by ijdoc2js
Returns:

int

getBackgroundValue()

Returns the background fill value.

Author:
  • Created by ijdoc2js
Returns:

double

getBitDepth()

Returns the bit depth, 8, 16, 24 (RGB) or 32. RGB images actually use 32 bits per pixel.

Author:
  • Created by ijdoc2js
Returns:

int

getBufferedImage()

Returns this image as a BufferedImage.

Author:
  • Created by ijdoc2js
Returns:

java.awt.image.BufferedImage

getf(index)

Parameters:
Name Type Description
index int

-

Author:
  • Created by ijdoc2js
Returns:

float

getf(x, y)

Returns the value of the pixel at (x,y) as a float. Faster than getPixel() because no bounds checking is done.

Parameters:
Name Type Description
x int

-

y int

-

Author:
  • Created by ijdoc2js
Returns:

float

getHistogram()

Returns the histogram of the image or ROI. Returns a luminosity histogram for RGB images and null for float images.

For 8-bit and 16-bit images, returns an array with one entry for each possible value that a pixel can have, from 0 to 255 (8-bit image) or 0-65535 (16-bit image). Thus, the array size is 256 or 65536, and the bin width in uncalibrated units is 1.

For RGB images, the brightness is evaluated using the color weights (which would result in a float value) and rounded to an int. This gives 256 bins. FloatProcessor.getHistogram is not implemented (returns null).

Author:
  • Created by ijdoc2js
Returns:

int[]

getHistogram(mask)

Parameters:
Name Type Description
mask ImageProcessor

-

Author:
  • Created by ijdoc2js
Returns:

int[]

getInterpolatedPixel(x, y)

Uses the current interpolation method (BILINEAR or BICUBIC) to calculate the pixel value at real coordinates (x,y).

Parameters:
Name Type Description
x double

-

y double

-

Author:
  • Created by ijdoc2js
Returns:

double

getMax()

Returns the largest displayed pixel value.

Author:
  • Created by ijdoc2js
Returns:

double

getMin()

Returns the smallest displayed pixel value.

Author:
  • Created by ijdoc2js
Returns:

double

getPixel(x, y)

Returns the value of the pixel at (x,y). For RGB images, the argb values are packed in an int. For float images, the the value must be converted using Float.intBitsToFloat(). Returns zero if either the x or y coodinate is out of range.

Parameters:
Name Type Description
x int

-

y int

-

Author:
  • Created by ijdoc2js
Returns:

int

getPixelInterpolated(x, y)

Uses the current interpolation method to find the pixel value at real coordinates (x,y). For RGB images, the argb values are packed in an int. For float images, the value must be converted using Float.intBitsToFloat(). Returns zero if the (x, y) is not inside the image.

Parameters:
Name Type Description
x double

-

y double

-

Author:
  • Created by ijdoc2js
Returns:

int

getPixels()

Returns a reference to the byte array containing this image's pixel data. To avoid sign extension, the pixel values must be accessed using a mask (e.g. int i = pixels[j]&0xff).

Author:
  • Created by ijdoc2js
Returns:

java.lang.Object

getPixelsCopy()

Returns a copy of the pixel data. Or returns a reference to the snapshot buffer if it is not null and 'snapshotCopyMode' is true.

Author:
  • Created by ijdoc2js
Returns:

java.lang.Object

getPixelValue(x, y)

Returns the value of the pixel at (x,y). For byte and short images, returns a calibrated value if a calibration table has been set using setCalibraionTable(). For RGB images, returns the luminance value.

Parameters:
Name Type Description
x int

-

y int

-

Author:
  • Created by ijdoc2js
Returns:

float

getSnapshotPixels()

Returns a reference to the snapshot (undo) buffer, or null.

Author:
  • Created by ijdoc2js
Returns:

java.lang.Object

isBinary()

Returns 'true' if this is a binary image (8-bit-image with only 0 and 255).

Author:
  • Created by ijdoc2js
Returns:

boolean

medianFilter()

A 3x3 median filter. Requires 8-bit or RGB image.

Author:
  • Created by ijdoc2js

noise(standardDeviation)

Adds pseudorandom, Gaussian ("normally") distributed values, with mean 0.0 and the specified standard deviation, to this image or ROI.

Parameters:
Name Type Description
standardDeviation double

-

Author:
  • Created by ijdoc2js

outline()

Author:
  • Created by ijdoc2js

putPixel(x, y, value)

Stores the specified value at (x,y). Does nothing if (x,y) is outside the image boundary. Values outside the range 0-255 are clamped.

Parameters:
Name Type Description
x int

-

y int

-

value int

-

Author:
  • Created by ijdoc2js

putPixelValue(x, y, value)

Stores the specified real value at (x,y). Does nothing if (x,y) is outside the image boundary. Values outside the range 0-255 are clamped.

Parameters:
Name Type Description
x int

-

y int

-

value double

-

Author:
  • Created by ijdoc2js

reset(mask)

Restore pixels that are within roi but not part of mask.

Parameters:
Name Type Description
mask ImageProcessor

-

Author:
  • Created by ijdoc2js

reset()

Reset the image from snapshot.

Author:
  • Created by ijdoc2js

resetMinAndMax()

Resets this image's LUT.

Author:
  • Created by ijdoc2js

resize(dstWidth, dstHeight)

Creates a new ByteProcessor containing a scaled copy of this image or selection.

Parameters:
Name Type Description
dstWidth int

-

dstHeight int

-

Author:
  • Created by ijdoc2js
Returns:

ImageProcessor

rotate(angle)

Rotates the image or ROI 'angle' degrees clockwise.

Parameters:
Name Type Description
angle double

-

Author:
  • Created by ijdoc2js

scale(xScale, yScale)

Scales the image or selection using the specified scale factors.

Parameters:
Name Type Description
xScale double

-

yScale double

-

Author:
  • Created by ijdoc2js

set(x, y, value)

This is a faster version of putPixel() that does not clip out of range values and does not do bounds checking.

Parameters:
Name Type Description
x int

-

y int

-

value int

-

Author:
  • Created by ijdoc2js

set(index, value)

Parameters:
Name Type Description
index int

-

value int

-

Author:
  • Created by ijdoc2js

setBackgroundValue(value)

Sets the background fill value, where 0<=value<=255.

Parameters:
Name Type Description
value double

-

Author:
  • Created by ijdoc2js

setColor(color)

Sets the foreground drawing color.

Parameters:
Name Type Description
color java.awt.Color

-

Author:
  • Created by ijdoc2js

setf(index, value)

Parameters:
Name Type Description
index int

-

value float

-

Author:
  • Created by ijdoc2js

setf(x, y, value)

Sets the value of the pixel at (x,y) to 'value'. Does no bounds checking or clamping, making it faster than putPixel(). Due to the lack of bounds checking, (x,y) coordinates outside the image may cause an exception. Due to the lack of clamping, values outside the 0-255 range (for byte) or 0-65535 range (for short) are not handled correctly.

Parameters:
Name Type Description
x int

-

y int

-

value float

-

Author:
  • Created by ijdoc2js

setFromFloatArrays(arrays)

Parameters:
Name Type Description
arrays Array.<Array.<float>>

-

Author:
  • Created by ijdoc2js

setFromFloatProcessors(fp)

Parameters:
Name Type Description
fp Array.<FloatProcessor>

-

Author:
  • Created by ijdoc2js

setMinAndMax(min, max)

Maps the entries in this image's LUT from min-max to 0-255.

Parameters:
Name Type Description
min double

-

max double

-

Author:
  • Created by ijdoc2js

setPixels(channelNumber, fp)

Sets the pixels from a FloatProcessor, no scaling. Also the min&max values are taken from the FloatProcessor.

Parameters:
Name Type Description
channelNumber int

-

fp FloatProcessor

-

Author:
  • Created by ijdoc2js

setPixels(pixels)

Sets a new pixel array for the image. The length of the array must be equal to width*height. Use setSnapshotPixels(null) to clear the snapshot buffer.

Parameters:
Name Type Description
pixels java.lang.Object

-

Author:
  • Created by ijdoc2js

setSnapshotPixels(pixels)

Sets a new pixel array for the snapshot (undo) buffer.

Parameters:
Name Type Description
pixels java.lang.Object

-

Author:
  • Created by ijdoc2js

setThreshold(minThreshold, maxThreshold, lutUpdate)

Sets the lower and upper threshold levels. The 'lutUpdate' argument can be RED_LUT, BLACK_AND_WHITE_LUT, OVER_UNDER_LUT or NO_LUT_UPDATE. Thresholding of RGB images is not supported.

Parameters:
Name Type Description
minThreshold double

-

maxThreshold double

-

lutUpdate int

-

Author:
  • Created by ijdoc2js

setValue(value)

Sets the default fill/draw value, where 0<=value<=255.

Parameters:
Name Type Description
value double

-

Author:
  • Created by ijdoc2js

skeletonize()

Author:
  • Created by ijdoc2js

snapshot()

Make a snapshot of the current image.

Author:
  • Created by ijdoc2js

swapPixelArrays()

Swaps the pixel and snapshot (undo) arrays.

Author:
  • Created by ijdoc2js

threshold(level)

Sets pixels less than or equal to level to 0 and all other pixels to 255.

Parameters:
Name Type Description
level int

-

Author:
  • Created by ijdoc2js

toFloat(channelNumber, fp)

Returns a FloatProcessor with the same image, no scaling or calibration (pixel values 0 to 255). The roi, mask, lut (ColorModel), threshold, min&max are also set for the FloatProcessor

Parameters:
Name Type Description
channelNumber int

-

fp FloatProcessor

-

Author:
  • Created by ijdoc2js
Returns:

FloatProcessor

toFloatArrays()

Author:
  • Created by ijdoc2js
Returns:

float[][]

toFloatProcessors()

Author:
  • Created by ijdoc2js
Returns:

FloatProcessor[]

ByteProcessor

new ByteProcessor(width, height)

Creates a blank ByteProcessor of the specified dimensions.

Parameters:
Name Type Description
width int

-

height int

-

Author:
  • Created by ijdoc2js

Methods

applyLut()

Author:
  • Created by ijdoc2js

applyTable(lut)

Transforms the image or ROI using a lookup table. The length of the table must be 256 for byte images and 65536 for short images. RGB and float images are not supported.

Parameters:
Name Type Description
lut Array.<int>

-

Author:
  • Created by ijdoc2js

convolve(kernel, kernelWidth, kernelHeight)

Performs a convolution operation using the specified kernel.

Parameters:
Name Type Description
kernel Array.<float>

-

kernelWidth int

-

kernelHeight int

-

Author:
  • Created by ijdoc2js

convolve3x3(kernel)

Convolves the image or ROI with the specified 3x3 integer convolution kernel.

Parameters:
Name Type Description
kernel Array.<int>

-

Author:
  • Created by ijdoc2js

copyBits(ip, xloc, yloc, mode)

Copies the image contained in 'ip' to (xloc, yloc) using one of the transfer modes defined in the Blitter interface.

Parameters:
Name Type Description
ip ImageProcessor

-

xloc int

-

yloc int

-

mode int

-

Author:
  • Created by ijdoc2js

createImage()

Returns a copy of this image is the form of an AWT Image.

Author:
  • Created by ijdoc2js
Returns:

java.awt.Image

createProcessor(width, height)

Returns a new, blank ByteProcessor with the specified width and height.

Parameters:
Name Type Description
width int

-

height int

-

Author:
  • Created by ijdoc2js
Returns:

ImageProcessor

crop()

Creates a new processor containing an image that corresponds to the current ROI.

Author:
  • Created by ijdoc2js
Returns:

ImageProcessor

dilate()

Dilates the image or ROI using a 3x3 minimum filter. Requires 8-bit or RGB image.

Author:
  • Created by ijdoc2js

dilate(count, background)

Parameters:
Name Type Description
count int

-

background int

-

Author:
  • Created by ijdoc2js

drawPixel(x, y)

Draws a pixel in the current foreground color.

Parameters:
Name Type Description
x int

-

y int

-

Author:
  • Created by ijdoc2js

duplicate()

Returns a duplicate of this image.

Author:
  • Created by ijdoc2js
Returns:

ImageProcessor

erode()

Erodes the image or ROI using a 3x3 maximum filter. Requires 8-bit or RGB image.

Author:
  • Created by ijdoc2js

erode(count, background)

Parameters:
Name Type Description
count int

-

background int

-

Author:
  • Created by ijdoc2js

fill(mask)

Sets pixels that are within roi and part of the mask to the foreground color. Does nothing if the mask is not the same size as the ROI.

Parameters:
Name Type Description
mask ImageProcessor

-

Author:
  • Created by ijdoc2js

filter(type)

Filters using a 3x3 neighborhood. The p1, p2, etc variables, which contain the values of the pixels in the neighborhood, are arranged as follows:

 p1 p2 p3
p4 p5 p6
p7 p8 p9
Parameters:
Name Type Description
type int

-

Author:
  • Created by ijdoc2js

flipVertical()

Flips the image or ROI vertically.

Author:
  • Created by ijdoc2js

get(index)

Parameters:
Name Type Description
index int

-

Author:
  • Created by ijdoc2js
Returns:

int

get(x, y)

This is a faster version of getPixel() that does not do bounds checking.

Parameters:
Name Type Description
x int

-

y int

-

Author:
  • Created by ijdoc2js
Returns:

int

getBackgroundValue()

Returns the background fill value.

Author:
  • Created by ijdoc2js
Returns:

double

getBitDepth()

Returns the bit depth, 8, 16, 24 (RGB) or 32. RGB images actually use 32 bits per pixel.

Author:
  • Created by ijdoc2js
Returns:

int

getBufferedImage()

Returns this image as a BufferedImage.

Author:
  • Created by ijdoc2js
Returns:

java.awt.image.BufferedImage

getf(index)

Parameters:
Name Type Description
index int

-

Author:
  • Created by ijdoc2js
Returns:

float

getf(x, y)

Returns the value of the pixel at (x,y) as a float. Faster than getPixel() because no bounds checking is done.

Parameters:
Name Type Description
x int

-

y int

-

Author:
  • Created by ijdoc2js
Returns:

float

getHistogram()

Returns the histogram of the image or ROI. Returns a luminosity histogram for RGB images and null for float images.

For 8-bit and 16-bit images, returns an array with one entry for each possible value that a pixel can have, from 0 to 255 (8-bit image) or 0-65535 (16-bit image). Thus, the array size is 256 or 65536, and the bin width in uncalibrated units is 1.

For RGB images, the brightness is evaluated using the color weights (which would result in a float value) and rounded to an int. This gives 256 bins. FloatProcessor.getHistogram is not implemented (returns null).

Author:
  • Created by ijdoc2js
Returns:

int[]

getHistogram(mask)

Parameters:
Name Type Description
mask ImageProcessor

-

Author:
  • Created by ijdoc2js
Returns:

int[]

getInterpolatedPixel(x, y)

Uses the current interpolation method (BILINEAR or BICUBIC) to calculate the pixel value at real coordinates (x,y).

Parameters:
Name Type Description
x double

-

y double

-

Author:
  • Created by ijdoc2js
Returns:

double

getMax()

Returns the largest displayed pixel value.

Author:
  • Created by ijdoc2js
Returns:

double

getMin()

Returns the smallest displayed pixel value.

Author:
  • Created by ijdoc2js
Returns:

double

getPixel(x, y)

Returns the value of the pixel at (x,y). For RGB images, the argb values are packed in an int. For float images, the the value must be converted using Float.intBitsToFloat(). Returns zero if either the x or y coodinate is out of range.

Parameters:
Name Type Description
x int

-

y int

-

Author:
  • Created by ijdoc2js
Returns:

int

getPixelInterpolated(x, y)

Uses the current interpolation method to find the pixel value at real coordinates (x,y). For RGB images, the argb values are packed in an int. For float images, the value must be converted using Float.intBitsToFloat(). Returns zero if the (x, y) is not inside the image.

Parameters:
Name Type Description
x double

-

y double

-

Author:
  • Created by ijdoc2js
Returns:

int

getPixels()

Returns a reference to the byte array containing this image's pixel data. To avoid sign extension, the pixel values must be accessed using a mask (e.g. int i = pixels[j]&0xff).

Author:
  • Created by ijdoc2js
Returns:

java.lang.Object

getPixelsCopy()

Returns a copy of the pixel data. Or returns a reference to the snapshot buffer if it is not null and 'snapshotCopyMode' is true.

Author:
  • Created by ijdoc2js
Returns:

java.lang.Object

getPixelValue(x, y)

Returns the value of the pixel at (x,y). For byte and short images, returns a calibrated value if a calibration table has been set using setCalibraionTable(). For RGB images, returns the luminance value.

Parameters:
Name Type Description
x int

-

y int

-

Author:
  • Created by ijdoc2js
Returns:

float

getSnapshotPixels()

Returns a reference to the snapshot (undo) buffer, or null.

Author:
  • Created by ijdoc2js
Returns:

java.lang.Object

isBinary()

Returns 'true' if this is a binary image (8-bit-image with only 0 and 255).

Author:
  • Created by ijdoc2js
Returns:

boolean

medianFilter()

A 3x3 median filter. Requires 8-bit or RGB image.

Author:
  • Created by ijdoc2js

noise(standardDeviation)

Adds pseudorandom, Gaussian ("normally") distributed values, with mean 0.0 and the specified standard deviation, to this image or ROI.

Parameters:
Name Type Description
standardDeviation double

-

Author:
  • Created by ijdoc2js

outline()

Author:
  • Created by ijdoc2js

putPixel(x, y, value)

Stores the specified value at (x,y). Does nothing if (x,y) is outside the image boundary. Values outside the range 0-255 are clamped.

Parameters:
Name Type Description
x int

-

y int

-

value int

-

Author:
  • Created by ijdoc2js

putPixelValue(x, y, value)

Stores the specified real value at (x,y). Does nothing if (x,y) is outside the image boundary. Values outside the range 0-255 are clamped.

Parameters:
Name Type Description
x int

-

y int

-

value double

-

Author:
  • Created by ijdoc2js

reset(mask)

Restore pixels that are within roi but not part of mask.

Parameters:
Name Type Description
mask ImageProcessor

-

Author:
  • Created by ijdoc2js

reset()

Reset the image from snapshot.

Author:
  • Created by ijdoc2js

resetMinAndMax()

Resets this image's LUT.

Author:
  • Created by ijdoc2js

resize(dstWidth, dstHeight)

Creates a new ByteProcessor containing a scaled copy of this image or selection.

Parameters:
Name Type Description
dstWidth int

-

dstHeight int

-

Author:
  • Created by ijdoc2js
Returns:

ImageProcessor

rotate(angle)

Rotates the image or ROI 'angle' degrees clockwise.

Parameters:
Name Type Description
angle double

-

Author:
  • Created by ijdoc2js

scale(xScale, yScale)

Scales the image or selection using the specified scale factors.

Parameters:
Name Type Description
xScale double

-

yScale double

-

Author:
  • Created by ijdoc2js

set(x, y, value)

This is a faster version of putPixel() that does not clip out of range values and does not do bounds checking.

Parameters:
Name Type Description
x int

-

y int

-

value int

-

Author:
  • Created by ijdoc2js

set(index, value)

Parameters:
Name Type Description
index int

-

value int

-

Author:
  • Created by ijdoc2js

setBackgroundValue(value)

Sets the background fill value, where 0<=value<=255.

Parameters:
Name Type Description
value double

-

Author:
  • Created by ijdoc2js

setColor(color)

Sets the foreground drawing color.

Parameters:
Name Type Description
color java.awt.Color

-

Author:
  • Created by ijdoc2js

setf(index, value)

Parameters:
Name Type Description
index int

-

value float

-

Author:
  • Created by ijdoc2js

setf(x, y, value)

Sets the value of the pixel at (x,y) to 'value'. Does no bounds checking or clamping, making it faster than putPixel(). Due to the lack of bounds checking, (x,y) coordinates outside the image may cause an exception. Due to the lack of clamping, values outside the 0-255 range (for byte) or 0-65535 range (for short) are not handled correctly.

Parameters:
Name Type Description
x int

-

y int

-

value float

-

Author:
  • Created by ijdoc2js

setFromFloatArrays(arrays)

Parameters:
Name Type Description
arrays Array.<Array.<float>>

-

Author:
  • Created by ijdoc2js

setFromFloatProcessors(fp)

Parameters:
Name Type Description
fp Array.<FloatProcessor>

-

Author:
  • Created by ijdoc2js

setMinAndMax(min, max)

Maps the entries in this image's LUT from min-max to 0-255.

Parameters:
Name Type Description
min double

-

max double

-

Author:
  • Created by ijdoc2js

setPixels(channelNumber, fp)

Sets the pixels from a FloatProcessor, no scaling. Also the min&max values are taken from the FloatProcessor.

Parameters:
Name Type Description
channelNumber int

-

fp FloatProcessor

-

Author:
  • Created by ijdoc2js

setPixels(pixels)

Sets a new pixel array for the image. The length of the array must be equal to width*height. Use setSnapshotPixels(null) to clear the snapshot buffer.

Parameters:
Name Type Description
pixels java.lang.Object

-

Author:
  • Created by ijdoc2js

setSnapshotPixels(pixels)

Sets a new pixel array for the snapshot (undo) buffer.

Parameters:
Name Type Description
pixels java.lang.Object

-

Author:
  • Created by ijdoc2js

setThreshold(minThreshold, maxThreshold, lutUpdate)

Sets the lower and upper threshold levels. The 'lutUpdate' argument can be RED_LUT, BLACK_AND_WHITE_LUT, OVER_UNDER_LUT or NO_LUT_UPDATE. Thresholding of RGB images is not supported.

Parameters:
Name Type Description
minThreshold double

-

maxThreshold double

-

lutUpdate int

-

Author:
  • Created by ijdoc2js

setValue(value)

Sets the default fill/draw value, where 0<=value<=255.

Parameters:
Name Type Description
value double

-

Author:
  • Created by ijdoc2js

skeletonize()

Author:
  • Created by ijdoc2js

snapshot()

Make a snapshot of the current image.

Author:
  • Created by ijdoc2js

swapPixelArrays()

Swaps the pixel and snapshot (undo) arrays.

Author:
  • Created by ijdoc2js

threshold(level)

Sets pixels less than or equal to level to 0 and all other pixels to 255.

Parameters:
Name Type Description
level int

-

Author:
  • Created by ijdoc2js

toFloat(channelNumber, fp)

Returns a FloatProcessor with the same image, no scaling or calibration (pixel values 0 to 255). The roi, mask, lut (ColorModel), threshold, min&max are also set for the FloatProcessor

Parameters:
Name Type Description
channelNumber int

-

fp FloatProcessor

-

Author:
  • Created by ijdoc2js
Returns:

FloatProcessor

toFloatArrays()

Author:
  • Created by ijdoc2js
Returns:

float[][]

toFloatProcessors()

Author:
  • Created by ijdoc2js
Returns:

FloatProcessor[]

ByteProcessor

new ByteProcessor(width, height, pixels)

Creates a ByteProcessor from a byte array.

Parameters:
Name Type Description
width int

-

height int

-

pixels Array.<byte>

-

Author:
  • Created by ijdoc2js

Methods

applyLut()

Author:
  • Created by ijdoc2js

applyTable(lut)

Transforms the image or ROI using a lookup table. The length of the table must be 256 for byte images and 65536 for short images. RGB and float images are not supported.

Parameters:
Name Type Description
lut Array.<int>

-

Author:
  • Created by ijdoc2js

convolve(kernel, kernelWidth, kernelHeight)

Performs a convolution operation using the specified kernel.

Parameters:
Name Type Description
kernel Array.<float>

-

kernelWidth int

-

kernelHeight int

-

Author:
  • Created by ijdoc2js

convolve3x3(kernel)

Convolves the image or ROI with the specified 3x3 integer convolution kernel.

Parameters:
Name Type Description
kernel Array.<int>

-

Author:
  • Created by ijdoc2js

copyBits(ip, xloc, yloc, mode)

Copies the image contained in 'ip' to (xloc, yloc) using one of the transfer modes defined in the Blitter interface.

Parameters:
Name Type Description
ip ImageProcessor

-

xloc int

-

yloc int

-

mode int

-

Author:
  • Created by ijdoc2js

createImage()

Returns a copy of this image is the form of an AWT Image.

Author:
  • Created by ijdoc2js
Returns:

java.awt.Image

createProcessor(width, height)

Returns a new, blank ByteProcessor with the specified width and height.

Parameters:
Name Type Description
width int

-

height int

-

Author:
  • Created by ijdoc2js
Returns:

ImageProcessor

crop()

Creates a new processor containing an image that corresponds to the current ROI.

Author:
  • Created by ijdoc2js
Returns:

ImageProcessor

dilate()

Dilates the image or ROI using a 3x3 minimum filter. Requires 8-bit or RGB image.

Author:
  • Created by ijdoc2js

dilate(count, background)

Parameters:
Name Type Description
count int

-

background int

-

Author:
  • Created by ijdoc2js

drawPixel(x, y)

Draws a pixel in the current foreground color.

Parameters:
Name Type Description
x int

-

y int

-

Author:
  • Created by ijdoc2js

duplicate()

Returns a duplicate of this image.

Author:
  • Created by ijdoc2js
Returns:

ImageProcessor

erode()

Erodes the image or ROI using a 3x3 maximum filter. Requires 8-bit or RGB image.

Author:
  • Created by ijdoc2js

erode(count, background)

Parameters:
Name Type Description
count int

-

background int

-

Author:
  • Created by ijdoc2js

fill(mask)

Sets pixels that are within roi and part of the mask to the foreground color. Does nothing if the mask is not the same size as the ROI.

Parameters:
Name Type Description
mask ImageProcessor

-

Author:
  • Created by ijdoc2js

filter(type)

Filters using a 3x3 neighborhood. The p1, p2, etc variables, which contain the values of the pixels in the neighborhood, are arranged as follows:

 p1 p2 p3
p4 p5 p6
p7 p8 p9
Parameters:
Name Type Description
type int

-

Author:
  • Created by ijdoc2js

flipVertical()

Flips the image or ROI vertically.

Author:
  • Created by ijdoc2js

get(index)

Parameters:
Name Type Description
index int

-

Author:
  • Created by ijdoc2js
Returns:

int

get(x, y)

This is a faster version of getPixel() that does not do bounds checking.

Parameters:
Name Type Description
x int

-

y int

-

Author:
  • Created by ijdoc2js
Returns:

int

getBackgroundValue()

Returns the background fill value.

Author:
  • Created by ijdoc2js
Returns:

double

getBitDepth()

Returns the bit depth, 8, 16, 24 (RGB) or 32. RGB images actually use 32 bits per pixel.

Author:
  • Created by ijdoc2js
Returns:

int

getBufferedImage()

Returns this image as a BufferedImage.

Author:
  • Created by ijdoc2js
Returns:

java.awt.image.BufferedImage

getf(index)

Parameters:
Name Type Description
index int

-

Author:
  • Created by ijdoc2js
Returns:

float

getf(x, y)

Returns the value of the pixel at (x,y) as a float. Faster than getPixel() because no bounds checking is done.

Parameters:
Name Type Description
x int

-

y int

-

Author:
  • Created by ijdoc2js
Returns:

float

getHistogram()

Returns the histogram of the image or ROI. Returns a luminosity histogram for RGB images and null for float images.

For 8-bit and 16-bit images, returns an array with one entry for each possible value that a pixel can have, from 0 to 255 (8-bit image) or 0-65535 (16-bit image). Thus, the array size is 256 or 65536, and the bin width in uncalibrated units is 1.

For RGB images, the brightness is evaluated using the color weights (which would result in a float value) and rounded to an int. This gives 256 bins. FloatProcessor.getHistogram is not implemented (returns null).

Author:
  • Created by ijdoc2js
Returns:

int[]

getHistogram(mask)

Parameters:
Name Type Description
mask ImageProcessor

-

Author:
  • Created by ijdoc2js
Returns:

int[]

getInterpolatedPixel(x, y)

Uses the current interpolation method (BILINEAR or BICUBIC) to calculate the pixel value at real coordinates (x,y).

Parameters:
Name Type Description
x double

-

y double

-

Author:
  • Created by ijdoc2js
Returns:

double

getMax()

Returns the largest displayed pixel value.

Author:
  • Created by ijdoc2js
Returns:

double

getMin()

Returns the smallest displayed pixel value.

Author:
  • Created by ijdoc2js
Returns:

double

getPixel(x, y)

Returns the value of the pixel at (x,y). For RGB images, the argb values are packed in an int. For float images, the the value must be converted using Float.intBitsToFloat(). Returns zero if either the x or y coodinate is out of range.

Parameters:
Name Type Description
x int

-

y int

-

Author:
  • Created by ijdoc2js
Returns:

int

getPixelInterpolated(x, y)

Uses the current interpolation method to find the pixel value at real coordinates (x,y). For RGB images, the argb values are packed in an int. For float images, the value must be converted using Float.intBitsToFloat(). Returns zero if the (x, y) is not inside the image.

Parameters:
Name Type Description
x double

-

y double

-

Author:
  • Created by ijdoc2js
Returns:

int

getPixels()

Returns a reference to the byte array containing this image's pixel data. To avoid sign extension, the pixel values must be accessed using a mask (e.g. int i = pixels[j]&0xff).

Author:
  • Created by ijdoc2js
Returns:

java.lang.Object

getPixelsCopy()

Returns a copy of the pixel data. Or returns a reference to the snapshot buffer if it is not null and 'snapshotCopyMode' is true.

Author:
  • Created by ijdoc2js
Returns:

java.lang.Object

getPixelValue(x, y)

Returns the value of the pixel at (x,y). For byte and short images, returns a calibrated value if a calibration table has been set using setCalibraionTable(). For RGB images, returns the luminance value.

Parameters:
Name Type Description
x int

-

y int

-

Author:
  • Created by ijdoc2js
Returns:

float

getSnapshotPixels()

Returns a reference to the snapshot (undo) buffer, or null.

Author:
  • Created by ijdoc2js
Returns:

java.lang.Object

isBinary()

Returns 'true' if this is a binary image (8-bit-image with only 0 and 255).

Author:
  • Created by ijdoc2js
Returns:

boolean

medianFilter()

A 3x3 median filter. Requires 8-bit or RGB image.

Author:
  • Created by ijdoc2js

noise(standardDeviation)

Adds pseudorandom, Gaussian ("normally") distributed values, with mean 0.0 and the specified standard deviation, to this image or ROI.

Parameters:
Name Type Description
standardDeviation double

-

Author:
  • Created by ijdoc2js

outline()

Author:
  • Created by ijdoc2js

putPixel(x, y, value)

Stores the specified value at (x,y). Does nothing if (x,y) is outside the image boundary. Values outside the range 0-255 are clamped.

Parameters:
Name Type Description
x int

-

y int

-

value int

-

Author:
  • Created by ijdoc2js

putPixelValue(x, y, value)

Stores the specified real value at (x,y). Does nothing if (x,y) is outside the image boundary. Values outside the range 0-255 are clamped.

Parameters:
Name Type Description
x int

-

y int

-

value double

-

Author:
  • Created by ijdoc2js

reset(mask)

Restore pixels that are within roi but not part of mask.

Parameters:
Name Type Description
mask ImageProcessor

-

Author:
  • Created by ijdoc2js

reset()

Reset the image from snapshot.

Author:
  • Created by ijdoc2js

resetMinAndMax()

Resets this image's LUT.

Author:
  • Created by ijdoc2js

resize(dstWidth, dstHeight)

Creates a new ByteProcessor containing a scaled copy of this image or selection.

Parameters:
Name Type Description
dstWidth int

-

dstHeight int

-

Author:
  • Created by ijdoc2js
Returns:

ImageProcessor

rotate(angle)

Rotates the image or ROI 'angle' degrees clockwise.

Parameters:
Name Type Description
angle double

-

Author:
  • Created by ijdoc2js

scale(xScale, yScale)

Scales the image or selection using the specified scale factors.

Parameters:
Name Type Description
xScale double

-

yScale double

-

Author:
  • Created by ijdoc2js

set(x, y, value)

This is a faster version of putPixel() that does not clip out of range values and does not do bounds checking.

Parameters:
Name Type Description
x int

-

y int

-

value int

-

Author:
  • Created by ijdoc2js

set(index, value)

Parameters:
Name Type Description
index int

-

value int

-

Author:
  • Created by ijdoc2js

setBackgroundValue(value)

Sets the background fill value, where 0<=value<=255.

Parameters:
Name Type Description
value double

-

Author:
  • Created by ijdoc2js

setColor(color)

Sets the foreground drawing color.

Parameters:
Name Type Description
color java.awt.Color

-

Author:
  • Created by ijdoc2js

setf(index, value)

Parameters:
Name Type Description
index int

-

value float

-

Author:
  • Created by ijdoc2js

setf(x, y, value)

Sets the value of the pixel at (x,y) to 'value'. Does no bounds checking or clamping, making it faster than putPixel(). Due to the lack of bounds checking, (x,y) coordinates outside the image may cause an exception. Due to the lack of clamping, values outside the 0-255 range (for byte) or 0-65535 range (for short) are not handled correctly.

Parameters:
Name Type Description
x int

-

y int

-

value float

-

Author:
  • Created by ijdoc2js

setFromFloatArrays(arrays)

Parameters:
Name Type Description
arrays Array.<Array.<float>>

-

Author:
  • Created by ijdoc2js

setFromFloatProcessors(fp)

Parameters:
Name Type Description
fp Array.<FloatProcessor>

-

Author:
  • Created by ijdoc2js

setMinAndMax(min, max)

Maps the entries in this image's LUT from min-max to 0-255.

Parameters:
Name Type Description
min double

-

max double

-

Author:
  • Created by ijdoc2js

setPixels(channelNumber, fp)

Sets the pixels from a FloatProcessor, no scaling. Also the min&max values are taken from the FloatProcessor.

Parameters:
Name Type Description
channelNumber int

-

fp FloatProcessor

-

Author:
  • Created by ijdoc2js

setPixels(pixels)

Sets a new pixel array for the image. The length of the array must be equal to width*height. Use setSnapshotPixels(null) to clear the snapshot buffer.

Parameters:
Name Type Description
pixels java.lang.Object

-

Author:
  • Created by ijdoc2js

setSnapshotPixels(pixels)

Sets a new pixel array for the snapshot (undo) buffer.

Parameters:
Name Type Description
pixels java.lang.Object

-

Author:
  • Created by ijdoc2js

setThreshold(minThreshold, maxThreshold, lutUpdate)

Sets the lower and upper threshold levels. The 'lutUpdate' argument can be RED_LUT, BLACK_AND_WHITE_LUT, OVER_UNDER_LUT or NO_LUT_UPDATE. Thresholding of RGB images is not supported.

Parameters:
Name Type Description
minThreshold double

-

maxThreshold double

-

lutUpdate int

-

Author:
  • Created by ijdoc2js

setValue(value)

Sets the default fill/draw value, where 0<=value<=255.

Parameters:
Name Type Description
value double

-

Author:
  • Created by ijdoc2js

skeletonize()

Author:
  • Created by ijdoc2js

snapshot()

Make a snapshot of the current image.

Author:
  • Created by ijdoc2js

swapPixelArrays()

Swaps the pixel and snapshot (undo) arrays.

Author:
  • Created by ijdoc2js

threshold(level)

Sets pixels less than or equal to level to 0 and all other pixels to 255.

Parameters:
Name Type Description
level int

-

Author:
  • Created by ijdoc2js

toFloat(channelNumber, fp)

Returns a FloatProcessor with the same image, no scaling or calibration (pixel values 0 to 255). The roi, mask, lut (ColorModel), threshold, min&max are also set for the FloatProcessor

Parameters:
Name Type Description
channelNumber int

-

fp FloatProcessor

-

Author:
  • Created by ijdoc2js
Returns:

FloatProcessor

toFloatArrays()

Author:
  • Created by ijdoc2js
Returns:

float[][]

toFloatProcessors()

Author:
  • Created by ijdoc2js
Returns:

FloatProcessor[]

ByteProcessor

new ByteProcessor(width, height, pixels, cm)

Creates a ByteProcessor from a pixel array and IndexColorModel.

Parameters:
Name Type Description
width int

-

height int

-

pixels Array.<byte>

-

cm java.awt.image.ColorModel

-

Author:
  • Created by ijdoc2js

Methods

applyLut()

Author:
  • Created by ijdoc2js

applyTable(lut)

Transforms the image or ROI using a lookup table. The length of the table must be 256 for byte images and 65536 for short images. RGB and float images are not supported.

Parameters:
Name Type Description
lut Array.<int>

-

Author:
  • Created by ijdoc2js

convolve(kernel, kernelWidth, kernelHeight)

Performs a convolution operation using the specified kernel.

Parameters:
Name Type Description
kernel Array.<float>

-

kernelWidth int

-

kernelHeight int

-

Author:
  • Created by ijdoc2js

convolve3x3(kernel)

Convolves the image or ROI with the specified 3x3 integer convolution kernel.

Parameters:
Name Type Description
kernel Array.<int>

-

Author:
  • Created by ijdoc2js

copyBits(ip, xloc, yloc, mode)

Copies the image contained in 'ip' to (xloc, yloc) using one of the transfer modes defined in the Blitter interface.

Parameters:
Name Type Description
ip ImageProcessor

-

xloc int

-

yloc int

-

mode int

-

Author:
  • Created by ijdoc2js

createImage()

Returns a copy of this image is the form of an AWT Image.

Author:
  • Created by ijdoc2js
Returns:

java.awt.Image

createProcessor(width, height)

Returns a new, blank ByteProcessor with the specified width and height.

Parameters:
Name Type Description
width int

-

height int

-

Author:
  • Created by ijdoc2js
Returns:

ImageProcessor

crop()

Creates a new processor containing an image that corresponds to the current ROI.

Author:
  • Created by ijdoc2js
Returns:

ImageProcessor

dilate()

Dilates the image or ROI using a 3x3 minimum filter. Requires 8-bit or RGB image.

Author:
  • Created by ijdoc2js

dilate(count, background)

Parameters:
Name Type Description
count int

-

background int

-

Author:
  • Created by ijdoc2js

drawPixel(x, y)

Draws a pixel in the current foreground color.

Parameters:
Name Type Description
x int

-

y int

-

Author:
  • Created by ijdoc2js

duplicate()

Returns a duplicate of this image.

Author:
  • Created by ijdoc2js
Returns:

ImageProcessor

erode()

Erodes the image or ROI using a 3x3 maximum filter. Requires 8-bit or RGB image.

Author:
  • Created by ijdoc2js

erode(count, background)

Parameters:
Name Type Description
count int

-

background int

-

Author:
  • Created by ijdoc2js

fill(mask)

Sets pixels that are within roi and part of the mask to the foreground color. Does nothing if the mask is not the same size as the ROI.

Parameters:
Name Type Description
mask ImageProcessor

-

Author:
  • Created by ijdoc2js

filter(type)

Filters using a 3x3 neighborhood. The p1, p2, etc variables, which contain the values of the pixels in the neighborhood, are arranged as follows:

 p1 p2 p3
p4 p5 p6
p7 p8 p9
Parameters:
Name Type Description
type int

-

Author:
  • Created by ijdoc2js

flipVertical()

Flips the image or ROI vertically.

Author:
  • Created by ijdoc2js

get(index)

Parameters:
Name Type Description
index int

-

Author:
  • Created by ijdoc2js
Returns:

int

get(x, y)

This is a faster version of getPixel() that does not do bounds checking.

Parameters:
Name Type Description
x int

-

y int

-

Author:
  • Created by ijdoc2js
Returns:

int

getBackgroundValue()

Returns the background fill value.

Author:
  • Created by ijdoc2js
Returns:

double

getBitDepth()

Returns the bit depth, 8, 16, 24 (RGB) or 32. RGB images actually use 32 bits per pixel.

Author:
  • Created by ijdoc2js
Returns:

int

getBufferedImage()

Returns this image as a BufferedImage.

Author:
  • Created by ijdoc2js
Returns:

java.awt.image.BufferedImage

getf(index)

Parameters:
Name Type Description
index int

-

Author:
  • Created by ijdoc2js
Returns:

float

getf(x, y)

Returns the value of the pixel at (x,y) as a float. Faster than getPixel() because no bounds checking is done.

Parameters:
Name Type Description
x int

-

y int

-

Author:
  • Created by ijdoc2js
Returns:

float

getHistogram()

Returns the histogram of the image or ROI. Returns a luminosity histogram for RGB images and null for float images.

For 8-bit and 16-bit images, returns an array with one entry for each possible value that a pixel can have, from 0 to 255 (8-bit image) or 0-65535 (16-bit image). Thus, the array size is 256 or 65536, and the bin width in uncalibrated units is 1.

For RGB images, the brightness is evaluated using the color weights (which would result in a float value) and rounded to an int. This gives 256 bins. FloatProcessor.getHistogram is not implemented (returns null).

Author:
  • Created by ijdoc2js
Returns:

int[]

getHistogram(mask)

Parameters:
Name Type Description
mask ImageProcessor

-

Author:
  • Created by ijdoc2js
Returns:

int[]

getInterpolatedPixel(x, y)

Uses the current interpolation method (BILINEAR or BICUBIC) to calculate the pixel value at real coordinates (x,y).

Parameters:
Name Type Description
x double

-

y double

-

Author:
  • Created by ijdoc2js
Returns:

double

getMax()

Returns the largest displayed pixel value.

Author:
  • Created by ijdoc2js
Returns:

double

getMin()

Returns the smallest displayed pixel value.

Author:
  • Created by ijdoc2js
Returns:

double

getPixel(x, y)

Returns the value of the pixel at (x,y). For RGB images, the argb values are packed in an int. For float images, the the value must be converted using Float.intBitsToFloat(). Returns zero if either the x or y coodinate is out of range.

Parameters:
Name Type Description
x int

-

y int

-

Author:
  • Created by ijdoc2js
Returns:

int

getPixelInterpolated(x, y)

Uses the current interpolation method to find the pixel value at real coordinates (x,y). For RGB images, the argb values are packed in an int. For float images, the value must be converted using Float.intBitsToFloat(). Returns zero if the (x, y) is not inside the image.

Parameters:
Name Type Description
x double

-

y double

-

Author:
  • Created by ijdoc2js
Returns:

int

getPixels()

Returns a reference to the byte array containing this image's pixel data. To avoid sign extension, the pixel values must be accessed using a mask (e.g. int i = pixels[j]&0xff).

Author:
  • Created by ijdoc2js
Returns:

java.lang.Object

getPixelsCopy()

Returns a copy of the pixel data. Or returns a reference to the snapshot buffer if it is not null and 'snapshotCopyMode' is true.

Author:
  • Created by ijdoc2js
Returns:

java.lang.Object

getPixelValue(x, y)

Returns the value of the pixel at (x,y). For byte and short images, returns a calibrated value if a calibration table has been set using setCalibraionTable(). For RGB images, returns the luminance value.

Parameters:
Name Type Description
x int

-

y int

-

Author:
  • Created by ijdoc2js
Returns:

float

getSnapshotPixels()

Returns a reference to the snapshot (undo) buffer, or null.

Author:
  • Created by ijdoc2js
Returns:

java.lang.Object

isBinary()

Returns 'true' if this is a binary image (8-bit-image with only 0 and 255).

Author:
  • Created by ijdoc2js
Returns:

boolean

medianFilter()

A 3x3 median filter. Requires 8-bit or RGB image.

Author:
  • Created by ijdoc2js

noise(standardDeviation)

Adds pseudorandom, Gaussian ("normally") distributed values, with mean 0.0 and the specified standard deviation, to this image or ROI.

Parameters:
Name Type Description
standardDeviation double

-

Author:
  • Created by ijdoc2js

outline()

Author:
  • Created by ijdoc2js

putPixel(x, y, value)

Stores the specified value at (x,y). Does nothing if (x,y) is outside the image boundary. Values outside the range 0-255 are clamped.

Parameters:
Name Type Description
x int

-

y int

-

value int

-

Author:
  • Created by ijdoc2js

putPixelValue(x, y, value)

Stores the specified real value at (x,y). Does nothing if (x,y) is outside the image boundary. Values outside the range 0-255 are clamped.

Parameters:
Name Type Description
x int

-

y int

-

value double

-

Author:
  • Created by ijdoc2js

reset(mask)

Restore pixels that are within roi but not part of mask.

Parameters:
Name Type Description
mask ImageProcessor

-

Author:
  • Created by ijdoc2js

reset()

Reset the image from snapshot.

Author:
  • Created by ijdoc2js

resetMinAndMax()

Resets this image's LUT.

Author:
  • Created by ijdoc2js

resize(dstWidth, dstHeight)

Creates a new ByteProcessor containing a scaled copy of this image or selection.

Parameters:
Name Type Description
dstWidth int

-

dstHeight int

-

Author:
  • Created by ijdoc2js
Returns:

ImageProcessor

rotate(angle)

Rotates the image or ROI 'angle' degrees clockwise.

Parameters:
Name Type Description
angle double

-

Author:
  • Created by ijdoc2js

scale(xScale, yScale)

Scales the image or selection using the specified scale factors.

Parameters:
Name Type Description
xScale double

-

yScale double

-

Author:
  • Created by ijdoc2js

set(x, y, value)

This is a faster version of putPixel() that does not clip out of range values and does not do bounds checking.

Parameters:
Name Type Description
x int

-

y int

-

value int

-

Author:
  • Created by ijdoc2js

set(index, value)

Parameters:
Name Type Description
index int

-

value int

-

Author:
  • Created by ijdoc2js

setBackgroundValue(value)

Sets the background fill value, where 0<=value<=255.

Parameters:
Name Type Description
value double

-

Author:
  • Created by ijdoc2js

setColor(color)

Sets the foreground drawing color.

Parameters:
Name Type Description
color java.awt.Color

-

Author:
  • Created by ijdoc2js

setf(index, value)

Parameters:
Name Type Description
index int

-

value float

-

Author:
  • Created by ijdoc2js

setf(x, y, value)

Sets the value of the pixel at (x,y) to 'value'. Does no bounds checking or clamping, making it faster than putPixel(). Due to the lack of bounds checking, (x,y) coordinates outside the image may cause an exception. Due to the lack of clamping, values outside the 0-255 range (for byte) or 0-65535 range (for short) are not handled correctly.

Parameters:
Name Type Description
x int

-

y int

-

value float

-

Author:
  • Created by ijdoc2js

setFromFloatArrays(arrays)

Parameters:
Name Type Description
arrays Array.<Array.<float>>

-

Author:
  • Created by ijdoc2js

setFromFloatProcessors(fp)

Parameters:
Name Type Description
fp Array.<FloatProcessor>

-

Author:
  • Created by ijdoc2js

setMinAndMax(min, max)

Maps the entries in this image's LUT from min-max to 0-255.

Parameters:
Name Type Description
min double

-

max double

-

Author:
  • Created by ijdoc2js

setPixels(channelNumber, fp)

Sets the pixels from a FloatProcessor, no scaling. Also the min&max values are taken from the FloatProcessor.

Parameters:
Name Type Description
channelNumber int

-

fp FloatProcessor

-

Author:
  • Created by ijdoc2js

setPixels(pixels)

Sets a new pixel array for the image. The length of the array must be equal to width*height. Use setSnapshotPixels(null) to clear the snapshot buffer.

Parameters:
Name Type Description
pixels java.lang.Object

-

Author:
  • Created by ijdoc2js

setSnapshotPixels(pixels)

Sets a new pixel array for the snapshot (undo) buffer.

Parameters:
Name Type Description
pixels java.lang.Object

-

Author:
  • Created by ijdoc2js

setThreshold(minThreshold, maxThreshold, lutUpdate)

Sets the lower and upper threshold levels. The 'lutUpdate' argument can be RED_LUT, BLACK_AND_WHITE_LUT, OVER_UNDER_LUT or NO_LUT_UPDATE. Thresholding of RGB images is not supported.

Parameters:
Name Type Description
minThreshold double

-

maxThreshold double

-

lutUpdate int

-

Author:
  • Created by ijdoc2js

setValue(value)

Sets the default fill/draw value, where 0<=value<=255.

Parameters:
Name Type Description
value double

-

Author:
  • Created by ijdoc2js

skeletonize()

Author:
  • Created by ijdoc2js

snapshot()

Make a snapshot of the current image.

Author:
  • Created by ijdoc2js

swapPixelArrays()

Swaps the pixel and snapshot (undo) arrays.

Author:
  • Created by ijdoc2js

threshold(level)

Sets pixels less than or equal to level to 0 and all other pixels to 255.

Parameters:
Name Type Description
level int

-

Author:
  • Created by ijdoc2js

toFloat(channelNumber, fp)

Returns a FloatProcessor with the same image, no scaling or calibration (pixel values 0 to 255). The roi, mask, lut (ColorModel), threshold, min&max are also set for the FloatProcessor

Parameters:
Name Type Description
channelNumber int

-

fp FloatProcessor

-

Author:
  • Created by ijdoc2js
Returns:

FloatProcessor

toFloatArrays()

Author:
  • Created by ijdoc2js
Returns:

float[][]

toFloatProcessors()

Author:
  • Created by ijdoc2js
Returns:

FloatProcessor[]

ByteProcessor

new ByteProcessor(bi)

Creates a ByteProcessor from a TYPE_BYTE_GRAY BufferedImage.

Parameters:
Name Type Description
bi java.awt.image.BufferedImage

-

Author:
  • Created by ijdoc2js

Methods

applyLut()

Author:
  • Created by ijdoc2js

applyTable(lut)

Transforms the image or ROI using a lookup table. The length of the table must be 256 for byte images and 65536 for short images. RGB and float images are not supported.

Parameters:
Name Type Description
lut Array.<int>

-

Author:
  • Created by ijdoc2js

convolve(kernel, kernelWidth, kernelHeight)

Performs a convolution operation using the specified kernel.

Parameters:
Name Type Description
kernel Array.<float>

-

kernelWidth int

-

kernelHeight int

-

Author:
  • Created by ijdoc2js

convolve3x3(kernel)

Convolves the image or ROI with the specified 3x3 integer convolution kernel.

Parameters:
Name Type Description
kernel Array.<int>

-

Author:
  • Created by ijdoc2js

copyBits(ip, xloc, yloc, mode)

Copies the image contained in 'ip' to (xloc, yloc) using one of the transfer modes defined in the Blitter interface.

Parameters:
Name Type Description
ip ImageProcessor

-

xloc int

-

yloc int

-

mode int

-

Author:
  • Created by ijdoc2js

createImage()

Returns a copy of this image is the form of an AWT Image.

Author:
  • Created by ijdoc2js
Returns:

java.awt.Image

createProcessor(width, height)

Returns a new, blank ByteProcessor with the specified width and height.

Parameters:
Name Type Description
width int

-

height int

-

Author:
  • Created by ijdoc2js
Returns:

ImageProcessor

crop()

Creates a new processor containing an image that corresponds to the current ROI.

Author:
  • Created by ijdoc2js
Returns:

ImageProcessor

dilate()

Dilates the image or ROI using a 3x3 minimum filter. Requires 8-bit or RGB image.

Author:
  • Created by ijdoc2js

dilate(count, background)

Parameters:
Name Type Description
count int

-

background int

-

Author:
  • Created by ijdoc2js

drawPixel(x, y)

Draws a pixel in the current foreground color.

Parameters:
Name Type Description
x int

-

y int

-

Author:
  • Created by ijdoc2js

duplicate()

Returns a duplicate of this image.

Author:
  • Created by ijdoc2js
Returns:

ImageProcessor

erode()

Erodes the image or ROI using a 3x3 maximum filter. Requires 8-bit or RGB image.

Author:
  • Created by ijdoc2js

erode(count, background)

Parameters:
Name Type Description
count int

-

background int

-

Author:
  • Created by ijdoc2js

fill(mask)

Sets pixels that are within roi and part of the mask to the foreground color. Does nothing if the mask is not the same size as the ROI.

Parameters:
Name Type Description
mask ImageProcessor

-

Author:
  • Created by ijdoc2js

filter(type)

Filters using a 3x3 neighborhood. The p1, p2, etc variables, which contain the values of the pixels in the neighborhood, are arranged as follows:

 p1 p2 p3
p4 p5 p6
p7 p8 p9
Parameters:
Name Type Description
type int

-

Author:
  • Created by ijdoc2js

flipVertical()

Flips the image or ROI vertically.

Author:
  • Created by ijdoc2js

get(index)

Parameters:
Name Type Description
index int

-

Author:
  • Created by ijdoc2js
Returns:

int

get(x, y)

This is a faster version of getPixel() that does not do bounds checking.

Parameters:
Name Type Description
x int

-

y int

-

Author:
  • Created by ijdoc2js
Returns:

int

getBackgroundValue()

Returns the background fill value.

Author:
  • Created by ijdoc2js
Returns:

double

getBitDepth()

Returns the bit depth, 8, 16, 24 (RGB) or 32. RGB images actually use 32 bits per pixel.

Author:
  • Created by ijdoc2js
Returns:

int

getBufferedImage()

Returns this image as a BufferedImage.

Author:
  • Created by ijdoc2js
Returns:

java.awt.image.BufferedImage

getf(index)

Parameters:
Name Type Description
index int

-

Author:
  • Created by ijdoc2js
Returns:

float

getf(x, y)

Returns the value of the pixel at (x,y) as a float. Faster than getPixel() because no bounds checking is done.

Parameters:
Name Type Description
x int

-

y int

-

Author:
  • Created by ijdoc2js
Returns:

float

getHistogram()

Returns the histogram of the image or ROI. Returns a luminosity histogram for RGB images and null for float images.

For 8-bit and 16-bit images, returns an array with one entry for each possible value that a pixel can have, from 0 to 255 (8-bit image) or 0-65535 (16-bit image). Thus, the array size is 256 or 65536, and the bin width in uncalibrated units is 1.

For RGB images, the brightness is evaluated using the color weights (which would result in a float value) and rounded to an int. This gives 256 bins. FloatProcessor.getHistogram is not implemented (returns null).

Author:
  • Created by ijdoc2js
Returns:

int[]

getHistogram(mask)

Parameters:
Name Type Description
mask ImageProcessor

-

Author:
  • Created by ijdoc2js
Returns:

int[]

getInterpolatedPixel(x, y)

Uses the current interpolation method (BILINEAR or BICUBIC) to calculate the pixel value at real coordinates (x,y).

Parameters:
Name Type Description
x double

-

y double

-

Author:
  • Created by ijdoc2js
Returns:

double

getMax()

Returns the largest displayed pixel value.

Author:
  • Created by ijdoc2js
Returns:

double

getMin()

Returns the smallest displayed pixel value.

Author:
  • Created by ijdoc2js
Returns:

double

getPixel(x, y)

Returns the value of the pixel at (x,y). For RGB images, the argb values are packed in an int. For float images, the the value must be converted using Float.intBitsToFloat(). Returns zero if either the x or y coodinate is out of range.

Parameters:
Name Type Description
x int

-

y int

-

Author:
  • Created by ijdoc2js
Returns:

int

getPixelInterpolated(x, y)

Uses the current interpolation method to find the pixel value at real coordinates (x,y). For RGB images, the argb values are packed in an int. For float images, the value must be converted using Float.intBitsToFloat(). Returns zero if the (x, y) is not inside the image.

Parameters:
Name Type Description
x double

-

y double

-

Author:
  • Created by ijdoc2js
Returns:

int

getPixels()

Returns a reference to the byte array containing this image's pixel data. To avoid sign extension, the pixel values must be accessed using a mask (e.g. int i = pixels[j]&0xff).

Author:
  • Created by ijdoc2js
Returns:

java.lang.Object

getPixelsCopy()

Returns a copy of the pixel data. Or returns a reference to the snapshot buffer if it is not null and 'snapshotCopyMode' is true.

Author:
  • Created by ijdoc2js
Returns:

java.lang.Object

getPixelValue(x, y)

Returns the value of the pixel at (x,y). For byte and short images, returns a calibrated value if a calibration table has been set using setCalibraionTable(). For RGB images, returns the luminance value.

Parameters:
Name Type Description
x int

-

y int

-

Author:
  • Created by ijdoc2js
Returns:

float

getSnapshotPixels()

Returns a reference to the snapshot (undo) buffer, or null.

Author:
  • Created by ijdoc2js
Returns:

java.lang.Object

isBinary()

Returns 'true' if this is a binary image (8-bit-image with only 0 and 255).

Author:
  • Created by ijdoc2js
Returns:

boolean

medianFilter()

A 3x3 median filter. Requires 8-bit or RGB image.

Author:
  • Created by ijdoc2js

noise(standardDeviation)

Adds pseudorandom, Gaussian ("normally") distributed values, with mean 0.0 and the specified standard deviation, to this image or ROI.

Parameters:
Name Type Description
standardDeviation double

-

Author:
  • Created by ijdoc2js

outline()

Author:
  • Created by ijdoc2js

putPixel(x, y, value)

Stores the specified value at (x,y). Does nothing if (x,y) is outside the image boundary. Values outside the range 0-255 are clamped.

Parameters:
Name Type Description
x int

-

y int

-

value int

-

Author:
  • Created by ijdoc2js

putPixelValue(x, y, value)

Stores the specified real value at (x,y). Does nothing if (x,y) is outside the image boundary. Values outside the range 0-255 are clamped.

Parameters:
Name Type Description
x int

-

y int

-

value double

-

Author:
  • Created by ijdoc2js

reset(mask)

Restore pixels that are within roi but not part of mask.

Parameters:
Name Type Description
mask ImageProcessor

-

Author:
  • Created by ijdoc2js

reset()

Reset the image from snapshot.

Author:
  • Created by ijdoc2js

resetMinAndMax()

Resets this image's LUT.

Author:
  • Created by ijdoc2js

resize(dstWidth, dstHeight)

Creates a new ByteProcessor containing a scaled copy of this image or selection.

Parameters:
Name Type Description
dstWidth int

-

dstHeight int

-

Author:
  • Created by ijdoc2js
Returns:

ImageProcessor

rotate(angle)

Rotates the image or ROI 'angle' degrees clockwise.

Parameters:
Name Type Description
angle double

-

Author:
  • Created by ijdoc2js

scale(xScale, yScale)

Scales the image or selection using the specified scale factors.

Parameters:
Name Type Description
xScale double

-

yScale double

-

Author:
  • Created by ijdoc2js

set(x, y, value)

This is a faster version of putPixel() that does not clip out of range values and does not do bounds checking.

Parameters:
Name Type Description
x int

-

y int

-

value int

-

Author:
  • Created by ijdoc2js

set(index, value)

Parameters:
Name Type Description
index int

-

value int

-

Author:
  • Created by ijdoc2js

setBackgroundValue(value)

Sets the background fill value, where 0<=value<=255.

Parameters:
Name Type Description
value double

-

Author:
  • Created by ijdoc2js

setColor(color)

Sets the foreground drawing color.

Parameters:
Name Type Description
color java.awt.Color

-

Author:
  • Created by ijdoc2js

setf(index, value)

Parameters:
Name Type Description
index int

-

value float

-

Author:
  • Created by ijdoc2js

setf(x, y, value)

Sets the value of the pixel at (x,y) to 'value'. Does no bounds checking or clamping, making it faster than putPixel(). Due to the lack of bounds checking, (x,y) coordinates outside the image may cause an exception. Due to the lack of clamping, values outside the 0-255 range (for byte) or 0-65535 range (for short) are not handled correctly.

Parameters:
Name Type Description
x int

-

y int

-

value float

-

Author:
  • Created by ijdoc2js

setFromFloatArrays(arrays)

Parameters:
Name Type Description
arrays Array.<Array.<float>>

-

Author:
  • Created by ijdoc2js

setFromFloatProcessors(fp)

Parameters:
Name Type Description
fp Array.<FloatProcessor>

-

Author:
  • Created by ijdoc2js

setMinAndMax(min, max)

Maps the entries in this image's LUT from min-max to 0-255.

Parameters:
Name Type Description
min double

-

max double

-

Author:
  • Created by ijdoc2js

setPixels(channelNumber, fp)

Sets the pixels from a FloatProcessor, no scaling. Also the min&max values are taken from the FloatProcessor.

Parameters:
Name Type Description
channelNumber int

-

fp FloatProcessor

-

Author:
  • Created by ijdoc2js

setPixels(pixels)

Sets a new pixel array for the image. The length of the array must be equal to width*height. Use setSnapshotPixels(null) to clear the snapshot buffer.

Parameters:
Name Type Description
pixels java.lang.Object

-

Author:
  • Created by ijdoc2js

setSnapshotPixels(pixels)

Sets a new pixel array for the snapshot (undo) buffer.

Parameters:
Name Type Description
pixels java.lang.Object

-

Author:
  • Created by ijdoc2js

setThreshold(minThreshold, maxThreshold, lutUpdate)

Sets the lower and upper threshold levels. The 'lutUpdate' argument can be RED_LUT, BLACK_AND_WHITE_LUT, OVER_UNDER_LUT or NO_LUT_UPDATE. Thresholding of RGB images is not supported.

Parameters:
Name Type Description
minThreshold double

-

maxThreshold double

-

lutUpdate int

-

Author:
  • Created by ijdoc2js

setValue(value)

Sets the default fill/draw value, where 0<=value<=255.

Parameters:
Name Type Description
value double

-

Author:
  • Created by ijdoc2js

skeletonize()

Author:
  • Created by ijdoc2js

snapshot()

Make a snapshot of the current image.

Author:
  • Created by ijdoc2js

swapPixelArrays()

Swaps the pixel and snapshot (undo) arrays.

Author:
  • Created by ijdoc2js

threshold(level)

Sets pixels less than or equal to level to 0 and all other pixels to 255.

Parameters:
Name Type Description
level int

-

Author:
  • Created by ijdoc2js

toFloat(channelNumber, fp)

Returns a FloatProcessor with the same image, no scaling or calibration (pixel values 0 to 255). The roi, mask, lut (ColorModel), threshold, min&max are also set for the FloatProcessor

Parameters:
Name Type Description
channelNumber int

-

fp FloatProcessor

-

Author:
  • Created by ijdoc2js
Returns:

FloatProcessor

toFloatArrays()

Author:
  • Created by ijdoc2js
Returns:

float[][]

toFloatProcessors()

Author:
  • Created by ijdoc2js
Returns:

FloatProcessor[]

ByteProcessor

new ByteProcessor(ip, scale)

Creates a ByteProcessor from an ImageProcessor. 16-bit and 32-bit pixel data are scaled from min-max to 0-255 if 'scale' is true.

Parameters:
Name Type Description
ip ImageProcessor

-

scale boolean

-

Author:
  • Created by ijdoc2js

Methods

applyLut()

Author:
  • Created by ijdoc2js

applyTable(lut)

Transforms the image or ROI using a lookup table. The length of the table must be 256 for byte images and 65536 for short images. RGB and float images are not supported.

Parameters:
Name Type Description
lut Array.<int>

-

Author:
  • Created by ijdoc2js

convolve(kernel, kernelWidth, kernelHeight)

Performs a convolution operation using the specified kernel.

Parameters:
Name Type Description
kernel Array.<float>

-

kernelWidth int

-

kernelHeight int

-

Author:
  • Created by ijdoc2js

convolve3x3(kernel)

Convolves the image or ROI with the specified 3x3 integer convolution kernel.

Parameters:
Name Type Description
kernel Array.<int>

-

Author:
  • Created by ijdoc2js

copyBits(ip, xloc, yloc, mode)

Copies the image contained in 'ip' to (xloc, yloc) using one of the transfer modes defined in the Blitter interface.

Parameters:
Name Type Description
ip ImageProcessor

-

xloc int

-

yloc int

-

mode int

-

Author:
  • Created by ijdoc2js

createImage()

Returns a copy of this image is the form of an AWT Image.

Author:
  • Created by ijdoc2js
Returns:

java.awt.Image

createProcessor(width, height)

Returns a new, blank ByteProcessor with the specified width and height.

Parameters:
Name Type Description
width int

-

height int

-

Author:
  • Created by ijdoc2js
Returns:

ImageProcessor

crop()

Creates a new processor containing an image that corresponds to the current ROI.

Author:
  • Created by ijdoc2js
Returns:

ImageProcessor

dilate()

Dilates the image or ROI using a 3x3 minimum filter. Requires 8-bit or RGB image.

Author:
  • Created by ijdoc2js

dilate(count, background)

Parameters:
Name Type Description
count int

-

background int

-

Author:
  • Created by ijdoc2js

drawPixel(x, y)

Draws a pixel in the current foreground color.

Parameters:
Name Type Description
x int

-

y int

-

Author:
  • Created by ijdoc2js

duplicate()

Returns a duplicate of this image.

Author:
  • Created by ijdoc2js
Returns:

ImageProcessor

erode()

Erodes the image or ROI using a 3x3 maximum filter. Requires 8-bit or RGB image.

Author:
  • Created by ijdoc2js

erode(count, background)

Parameters:
Name Type Description
count int

-

background int

-

Author:
  • Created by ijdoc2js

fill(mask)

Sets pixels that are within roi and part of the mask to the foreground color. Does nothing if the mask is not the same size as the ROI.

Parameters:
Name Type Description
mask ImageProcessor

-

Author:
  • Created by ijdoc2js

filter(type)

Filters using a 3x3 neighborhood. The p1, p2, etc variables, which contain the values of the pixels in the neighborhood, are arranged as follows:

 p1 p2 p3
p4 p5 p6
p7 p8 p9
Parameters:
Name Type Description
type int

-

Author:
  • Created by ijdoc2js

flipVertical()

Flips the image or ROI vertically.

Author:
  • Created by ijdoc2js

get(index)

Parameters:
Name Type Description
index int

-

Author:
  • Created by ijdoc2js
Returns:

int

get(x, y)

This is a faster version of getPixel() that does not do bounds checking.

Parameters:
Name Type Description
x int

-

y int

-

Author:
  • Created by ijdoc2js
Returns:

int

getBackgroundValue()

Returns the background fill value.

Author:
  • Created by ijdoc2js
Returns:

double

getBitDepth()

Returns the bit depth, 8, 16, 24 (RGB) or 32. RGB images actually use 32 bits per pixel.

Author:
  • Created by ijdoc2js
Returns:

int

getBufferedImage()

Returns this image as a BufferedImage.

Author:
  • Created by ijdoc2js
Returns:

java.awt.image.BufferedImage

getf(index)

Parameters:
Name Type Description
index int

-

Author:
  • Created by ijdoc2js
Returns:

float

getf(x, y)

Returns the value of the pixel at (x,y) as a float. Faster than getPixel() because no bounds checking is done.

Parameters:
Name Type Description
x int

-

y int

-

Author:
  • Created by ijdoc2js
Returns:

float

getHistogram()

Returns the histogram of the image or ROI. Returns a luminosity histogram for RGB images and null for float images.

For 8-bit and 16-bit images, returns an array with one entry for each possible value that a pixel can have, from 0 to 255 (8-bit image) or 0-65535 (16-bit image). Thus, the array size is 256 or 65536, and the bin width in uncalibrated units is 1.

For RGB images, the brightness is evaluated using the color weights (which would result in a float value) and rounded to an int. This gives 256 bins. FloatProcessor.getHistogram is not implemented (returns null).

Author:
  • Created by ijdoc2js
Returns:

int[]

getHistogram(mask)

Parameters:
Name Type Description
mask ImageProcessor

-

Author:
  • Created by ijdoc2js
Returns:

int[]

getInterpolatedPixel(x, y)

Uses the current interpolation method (BILINEAR or BICUBIC) to calculate the pixel value at real coordinates (x,y).

Parameters:
Name Type Description
x double

-

y double

-

Author:
  • Created by ijdoc2js
Returns:

double

getMax()

Returns the largest displayed pixel value.

Author:
  • Created by ijdoc2js
Returns:

double

getMin()

Returns the smallest displayed pixel value.

Author:
  • Created by ijdoc2js
Returns:

double

getPixel(x, y)

Returns the value of the pixel at (x,y). For RGB images, the argb values are packed in an int. For float images, the the value must be converted using Float.intBitsToFloat(). Returns zero if either the x or y coodinate is out of range.

Parameters:
Name Type Description
x int

-

y int

-

Author:
  • Created by ijdoc2js
Returns:

int

getPixelInterpolated(x, y)

Uses the current interpolation method to find the pixel value at real coordinates (x,y). For RGB images, the argb values are packed in an int. For float images, the value must be converted using Float.intBitsToFloat(). Returns zero if the (x, y) is not inside the image.

Parameters:
Name Type Description
x double

-

y double

-

Author:
  • Created by ijdoc2js
Returns:

int

getPixels()

Returns a reference to the byte array containing this image's pixel data. To avoid sign extension, the pixel values must be accessed using a mask (e.g. int i = pixels[j]&0xff).

Author:
  • Created by ijdoc2js
Returns:

java.lang.Object

getPixelsCopy()

Returns a copy of the pixel data. Or returns a reference to the snapshot buffer if it is not null and 'snapshotCopyMode' is true.

Author:
  • Created by ijdoc2js
Returns:

java.lang.Object

getPixelValue(x, y)

Returns the value of the pixel at (x,y). For byte and short images, returns a calibrated value if a calibration table has been set using setCalibraionTable(). For RGB images, returns the luminance value.

Parameters:
Name Type Description
x int

-

y int

-

Author:
  • Created by ijdoc2js
Returns:

float

getSnapshotPixels()

Returns a reference to the snapshot (undo) buffer, or null.

Author:
  • Created by ijdoc2js
Returns:

java.lang.Object

isBinary()

Returns 'true' if this is a binary image (8-bit-image with only 0 and 255).

Author:
  • Created by ijdoc2js
Returns:

boolean

medianFilter()

A 3x3 median filter. Requires 8-bit or RGB image.

Author:
  • Created by ijdoc2js

noise(standardDeviation)

Adds pseudorandom, Gaussian ("normally") distributed values, with mean 0.0 and the specified standard deviation, to this image or ROI.

Parameters:
Name Type Description
standardDeviation double

-

Author:
  • Created by ijdoc2js

outline()

Author:
  • Created by ijdoc2js

putPixel(x, y, value)

Stores the specified value at (x,y). Does nothing if (x,y) is outside the image boundary. Values outside the range 0-255 are clamped.

Parameters:
Name Type Description
x int

-

y int

-

value int

-

Author:
  • Created by ijdoc2js

putPixelValue(x, y, value)

Stores the specified real value at (x,y). Does nothing if (x,y) is outside the image boundary. Values outside the range 0-255 are clamped.

Parameters:
Name Type Description
x int

-

y int

-

value double

-

Author:
  • Created by ijdoc2js

reset(mask)

Restore pixels that are within roi but not part of mask.

Parameters:
Name Type Description
mask ImageProcessor

-

Author:
  • Created by ijdoc2js

reset()

Reset the image from snapshot.

Author:
  • Created by ijdoc2js

resetMinAndMax()

Resets this image's LUT.

Author:
  • Created by ijdoc2js

resize(dstWidth, dstHeight)

Creates a new ByteProcessor containing a scaled copy of this image or selection.

Parameters:
Name Type Description
dstWidth int

-

dstHeight int

-

Author:
  • Created by ijdoc2js
Returns:

ImageProcessor

rotate(angle)

Rotates the image or ROI 'angle' degrees clockwise.

Parameters:
Name Type Description
angle double

-

Author:
  • Created by ijdoc2js

scale(xScale, yScale)

Scales the image or selection using the specified scale factors.

Parameters:
Name Type Description
xScale double

-

yScale double

-

Author:
  • Created by ijdoc2js

set(x, y, value)

This is a faster version of putPixel() that does not clip out of range values and does not do bounds checking.

Parameters:
Name Type Description
x int

-

y int

-

value int

-

Author:
  • Created by ijdoc2js

set(index, value)

Parameters:
Name Type Description
index int

-

value int

-

Author:
  • Created by ijdoc2js

setBackgroundValue(value)

Sets the background fill value, where 0<=value<=255.

Parameters:
Name Type Description
value double

-

Author:
  • Created by ijdoc2js

setColor(color)

Sets the foreground drawing color.

Parameters:
Name Type Description
color java.awt.Color

-

Author:
  • Created by ijdoc2js

setf(index, value)

Parameters:
Name Type Description
index int

-

value float

-

Author:
  • Created by ijdoc2js

setf(x, y, value)

Sets the value of the pixel at (x,y) to 'value'. Does no bounds checking or clamping, making it faster than putPixel(). Due to the lack of bounds checking, (x,y) coordinates outside the image may cause an exception. Due to the lack of clamping, values outside the 0-255 range (for byte) or 0-65535 range (for short) are not handled correctly.

Parameters:
Name Type Description
x int

-

y int

-

value float

-

Author:
  • Created by ijdoc2js

setFromFloatArrays(arrays)

Parameters:
Name Type Description
arrays Array.<Array.<float>>

-

Author:
  • Created by ijdoc2js

setFromFloatProcessors(fp)

Parameters:
Name Type Description
fp Array.<FloatProcessor>

-

Author:
  • Created by ijdoc2js

setMinAndMax(min, max)

Maps the entries in this image's LUT from min-max to 0-255.

Parameters:
Name Type Description
min double

-

max double

-

Author:
  • Created by ijdoc2js

setPixels(channelNumber, fp)

Sets the pixels from a FloatProcessor, no scaling. Also the min&max values are taken from the FloatProcessor.

Parameters:
Name Type Description
channelNumber int

-

fp FloatProcessor

-

Author:
  • Created by ijdoc2js

setPixels(pixels)

Sets a new pixel array for the image. The length of the array must be equal to width*height. Use setSnapshotPixels(null) to clear the snapshot buffer.

Parameters:
Name Type Description
pixels java.lang.Object

-

Author:
  • Created by ijdoc2js

setSnapshotPixels(pixels)

Sets a new pixel array for the snapshot (undo) buffer.

Parameters:
Name Type Description
pixels java.lang.Object

-

Author:
  • Created by ijdoc2js

setThreshold(minThreshold, maxThreshold, lutUpdate)

Sets the lower and upper threshold levels. The 'lutUpdate' argument can be RED_LUT, BLACK_AND_WHITE_LUT, OVER_UNDER_LUT or NO_LUT_UPDATE. Thresholding of RGB images is not supported.

Parameters:
Name Type Description
minThreshold double

-

maxThreshold double

-

lutUpdate int

-

Author:
  • Created by ijdoc2js

setValue(value)

Sets the default fill/draw value, where 0<=value<=255.

Parameters:
Name Type Description
value double

-

Author:
  • Created by ijdoc2js

skeletonize()

Author:
  • Created by ijdoc2js

snapshot()

Make a snapshot of the current image.

Author:
  • Created by ijdoc2js

swapPixelArrays()

Swaps the pixel and snapshot (undo) arrays.

Author:
  • Created by ijdoc2js

threshold(level)

Sets pixels less than or equal to level to 0 and all other pixels to 255.

Parameters:
Name Type Description
level int

-

Author:
  • Created by ijdoc2js

toFloat(channelNumber, fp)

Returns a FloatProcessor with the same image, no scaling or calibration (pixel values 0 to 255). The roi, mask, lut (ColorModel), threshold, min&max are also set for the FloatProcessor

Parameters:
Name Type Description
channelNumber int

-

fp FloatProcessor

-

Author:
  • Created by ijdoc2js
Returns:

FloatProcessor

toFloatArrays()

Author:
  • Created by ijdoc2js
Returns:

float[][]

toFloatProcessors()

Author:
  • Created by ijdoc2js
Returns:

FloatProcessor[]