|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.grelf.grip.ImProcess
public class ImProcess
This class contains only static methods for processing images. It cannot be instantiated.
Field Summary | |
---|---|
static boolean |
batchCropping
Controls whether the user will be prompted to confirm the crop rectangle. |
Method Summary | |
---|---|
static void |
add(java.awt.image.BufferedImage bim1,
java.awt.image.BufferedImage bim2)
Add bim2 into bim1, pixel by pixel |
static void |
add(java.awt.image.BufferedImage bim1,
java.awt.image.BufferedImage bim2,
double f1,
double f2)
Add bim2 into bim1, pixel by pixel, taking fraction f1 of image 1 and fraction f2 of image 2. |
static void |
add(ImFrame imf1,
ImFrame imf2)
Add imf2 into imf1, pixel by pixel |
static void |
add(ImFrame imf1,
ImFrame imf2,
double f1,
double f2)
Add imf2 into imf1, pixel by pixel, taking fraction f1 of image 1 and fraction f2 of image 2. |
static java.awt.image.BufferedImage |
autoCrop(java.awt.image.BufferedImage srcBim)
Automatically remove any rectangular margin of black (0, 0, 0) pixels from the image, thereby cropping it. |
static void |
autoCrop(ImFrame imf)
Automatically remove any rectangular margin of black (0, 0, 0) pixels from the image, thereby cropping it. |
static void |
autoStretch(java.awt.image.BufferedImage bim,
boolean allChannelsSame)
Stretch the contrast in the image so the full range of levels is used. |
static void |
autoStretch(java.awt.image.BufferedImage bim,
boolean allChannelsSame,
java.awt.Point topLeft,
java.awt.Point bottomRight)
Stretch the contrast in the image so the full range of levels is used. |
static void |
autoStretch(ImFrame imf)
Stretch the contrast in the image so the full range of levels is used. |
static byte[][] |
autoThreshold(java.awt.image.BufferedImage bim)
Threshold automatically. |
static byte[][] |
autoThreshold(ImFrame imf)
Threshold automatically. |
static boolean |
averageShift(java.awt.image.BufferedImage bim,
int imNo,
int middleImNo,
java.util.List<MatchPair> matches,
BlobMeas[][] lookup,
int nBrightest)
For image imNo of a sequence, shift the image so that matched point pairs are at the same position as in middleImNo. |
static void |
averageVertically(java.awt.image.BufferedImage bim)
Replace every pixel of every vertical line in the image by the average of the levels along the line. |
static void |
averageVertically(java.awt.image.BufferedImage bim,
int yMin,
int yMax)
Replace every pixel of every vertical line in the image by the average of the levels along the line, within two y coordinate limits. |
static void |
averageVertically(ImFrame imf)
Replace every pixel of every vertical line in the image by the average levels along the line. |
static java.awt.image.BufferedImage |
convertTo16BitsPerChannel(java.awt.image.BufferedImage srcBim)
Convert the image to 16 bits per channel (only useful if the image was 8 bits per channel). |
static void |
convertTo16BitsPerChannel(ImFrame imf)
Convert the image or accumulator to 16 bits per channel. |
static void |
convertTo32BitsPerChannel(ImFrame imf)
Convert the image to 32 bits per channel (only useful if the image was 16 bits per channel). |
static java.awt.image.BufferedImage |
convertTo8BitsPerChannel(java.awt.image.BufferedImage srcBim)
Convert the image to 8 bits per channel (only useful if the image was 16 bits per channel). |
static void |
convertTo8BitsPerChannel(ImFrame imf)
Convert the image to 8 bits per channel (only useful if the image was 16 bits per channel). |
static void |
convertToMonochrome(java.awt.image.BufferedImage bim)
Convert the image to monochrome, using 0.325 x red + 0.5 * green + 0.175 * blue. |
static void |
convertToMonochrome(java.awt.image.BufferedImage bim,
double... f)
Convert the image to monochrome, using given fractions of each channel. |
static void |
convertToMonochrome(ImFrame imf)
Convert the RGB image to monochrome, using 0.325 x red + 0.5 * green + 0.175 * blue. |
static void |
convertToMonochrome(ImFrame imf,
double... f)
Convert the multi-channel image to monochrome, using the factors f to determine ratios of channels. |
static void |
correctBackground(java.awt.image.BufferedImage im)
Level the background of the image by dividing the image into n x n cells and using the modal values of the histogram in every cell. |
static void |
correctBackground(ImFrame imf)
Level the background of the image by dividing the image into n x n cells and using the modal values of the histogram in every cell. |
static java.awt.image.BufferedImage |
crop(java.awt.Point pt1,
java.awt.Point pt2,
java.awt.image.BufferedImage srcBim)
Crop the image by a rectangle defined by the diagonally opposite points. |
static void |
crop(java.awt.Point pt1,
java.awt.Point pt2,
ImFrame imf)
Crop the image by a drawn rectangle. |
static void |
crop(java.awt.Point pt1,
java.awt.Point pt2,
ImFrame imf,
boolean promptToConfirm)
Crop the image by a drawn rectangle and adjust any BlobMeasList it may have. |
static void |
divideAmplitudeByN(java.awt.image.BufferedImage bim,
int n)
Divide the value of every pixel by n |
static void |
divideAmplitudeByN(ImFrame imf,
int n)
Divide the value of every pixel by n |
static void |
divideByFlatField(java.awt.image.BufferedImage bim1,
java.awt.image.BufferedImage bim2)
Divide bim1 by flat field bim2, pixel by pixel. |
static void |
divideByFlatField(ImFrame imf1,
ImFrame imf2)
Divide image in imf1 by flat field in imf2, pixel by pixel |
static void |
doOpInBackground(java.lang.String op,
ImFrame frame)
For particularly long operations, run them on a worker thread rather than clog up swing's event dispatch thread. |
static java.awt.image.BufferedImage |
fit(java.awt.image.BufferedImage srcBim,
int width,
int height)
Scale the image so it fits into the given width and height (in pixels), without changing its proportions. |
static void |
fit(ImFrame imf,
int width,
int height)
Scale the image so it fits into the given width and height (in pixels), without changing its proportions. |
static void |
flipHorizontal(java.awt.image.BufferedImage bim)
Flip the image horizontally. |
static void |
flipHorizontal(ImFrame imf)
Flip the image horizontally. |
static void |
flipVertical(java.awt.image.BufferedImage bim)
Flip the image vertically. |
static void |
flipVertical(ImFrame imf)
Flip the image vertically. |
static javax.swing.ProgressMonitor |
getMonitor()
For developers to be able to setProgress () and test isCanceled () periodically and then close () when done. |
static void |
invert(java.awt.image.BufferedImage im)
Invert the colour at every pixel in the image. |
static void |
invert(ImFrame imf)
Invert the colour at every pixel in the image. |
static java.awt.image.BufferedImage |
meanFilter(java.awt.image.BufferedImage srcBim,
int halfWidth)
Replace every pixel in the image by the mean value of its n x n neighbourhood, where n = 2.halfWidth + 1. |
static void |
meanFilter(ImFrame imf)
Ask for neighbourhood size and replace every pixel in the image by the mean value of its neighbourhood. |
static java.awt.image.BufferedImage |
medianFilter(java.awt.image.BufferedImage srcBim,
int halfWidth)
Replace every pixel in the image by the median value of its n x n neighbourhood, where n = 2.halfWidth + 1. |
static void |
medianFilter(ImFrame imf)
Ask for neighbourhood size and replace every pixel in the image by the median value of its neighbourhood. |
static void |
multiply(java.awt.image.BufferedImage bim1,
java.awt.image.BufferedImage bim2)
Multiply bim2 into bim1, pixel by pixel |
static void |
multiply(ImFrame imf1,
ImFrame imf2)
Multiply imf2 into imf1, pixel by pixel |
static java.awt.image.BufferedImage |
nearestExtremeFilter(java.awt.image.BufferedImage srcBim,
int halfWidth)
Replace every pixel in the image by the nearest of the max and min of its n x n neighbourhood, where n = 2.halfWidth + 1. |
static void |
nearestExtremeFilter(ImFrame imf)
Ask for neighbourhood size and replace every pixel in the image by the nearest of the max and min of its neighbourhood. |
static void |
neutraliseBackground(java.awt.image.BufferedImage bim)
Automatically adjust colour balance by equating the modes of all channels. |
static void |
neutraliseBackground(ImFrame imf)
Automatically adjust colour balance by equating the modes of all channels. |
static java.awt.image.BufferedImage |
rankFilter(java.awt.image.BufferedImage srcBim,
int halfWidth)
Replace every pixel in the image by its rank in its n x n neighbourhood, where n = 2.halfWidth + 1. |
static void |
rankFilter(ImFrame imf)
Replace every pixel in the image by its rank in its n x n neighbourhood, where n = 2.halfWidth + 1. |
static java.awt.image.BufferedImage |
rotate(java.awt.image.BufferedImage srcBim,
double angle)
Rotate the image anticlockwise by the given angle (in degrees). |
static void |
rotate(ImFrame imf)
Ask the user for an angle (in degrees), then rotate the image anticlockwise by that angle. |
static void |
rotate(ImFrame imf,
double angle)
Rotate the image anticlockwise by the given angle (in degrees). |
static java.awt.image.BufferedImage |
scale(java.awt.image.BufferedImage srcBim,
double factor,
boolean interpolating)
Scale the image by the given factor |
static void |
scale(ImFrame imf)
Ask the user for a factor, then scale the image by that factor. |
static void |
scale(ImFrame imf,
double factor,
boolean interpolating)
Scale the image by the given factor |
static void |
splitChannels(ImFrame imf)
Create 3 new images, one containing each of the channels of the original image, displaying them as new ImFrames. |
static void |
splitIntensity(ImFrame imf)
Create a monochrome image in which each pixel has the value I = sum of the band levels of the current image plus a colour image in which the pixel in each band has the value maxLevel * bandLevel / I. |
static void |
stereo(java.awt.image.BufferedImage bim1,
java.awt.image.BufferedImage bim2)
Replace bim1 by the red - green stereo version of the 2 images. |
static void |
stereo(ImFrame imf1,
ImFrame imf2)
Use imf1 to display in red - green stereo the two images from imf1 and imf2. |
static void |
stretch(java.awt.image.BufferedImage im,
int[] minima,
int[] maxima)
Stretch the contrast in the image between limits given for each channel. |
static void |
stretch(ImFrame imf,
int[] minima,
int[] maxima)
Stretch the contrast in the image between limits given for each channel. |
static void |
sub(java.awt.image.BufferedImage bim1,
java.awt.image.BufferedImage bim2)
Subtract bim2 from bim1, pixel by pixel, the result being about the half-way brightness level so that both negative and positive results can be seen. |
static void |
sub(ImFrame imf1,
ImFrame imf2)
Subtract imf2 from imf1, pixel by pixel, the result being about the half-way brightness level so that both negative and positive results can be seen. |
static void |
subToZero(java.awt.image.BufferedImage bim1,
java.awt.image.BufferedImage bim2)
Subtract bim2 from bim1, pixel by pixel, keeping only positive results, base level 0. |
static void |
subToZero(ImFrame imf1,
ImFrame imf2)
Subtract imf2 from imf1, pixel by pixel, keeping only positive results, base level 0. |
static byte[][] |
threshold(java.awt.image.BufferedImage bim,
Threshold thresh)
Threshold the image to detect pixels in the range(s) specified by the given threshold. |
static Threshold |
threshold(ImFrame imf)
Display dialogue for user to set thresholds (RGB or monochrome), then threshold the image. 9.11.26: changed to return the Threshold that was set (previously returned void). |
static void |
threshold(ImFrame imf,
Threshold thresh)
Threshold the image to detect pixels brighter than the given thresholds. |
static java.awt.image.BufferedImage |
translate(java.awt.image.BufferedImage srcBim,
double dx,
double dy)
Displace the image content by the given offset vector. |
static java.awt.image.BufferedImage |
translate(java.awt.image.BufferedImage srcBim,
int dx,
int dy)
Displace the image content by the given offset vector. |
static void |
translate(ImFrame imf)
Ask the user for x and y displacements and then translate the image accordingly. |
static void |
translate(ImFrame imf,
int dx,
int dy)
Displace the image within its frame by the given offset vector. |
static java.awt.image.BufferedImage |
varianceFilter(java.awt.image.BufferedImage srcBim,
int halfWidth)
Replace every pixel in the image by the variance of its n x n neighbourhood, where n = 2.halfWidth + 1. |
static void |
varianceFilter(ImFrame imf)
Ask for neighbourhood size and replace every pixel in the image by the variance of its neighbourhood. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean batchCropping
Method Detail |
---|
public static void add(ImFrame imf1, ImFrame imf2)
public static void add(java.awt.image.BufferedImage bim1, java.awt.image.BufferedImage bim2)
public static void add(ImFrame imf1, ImFrame imf2, double f1, double f2)
public static void add(java.awt.image.BufferedImage bim1, java.awt.image.BufferedImage bim2, double f1, double f2)
public static void neutraliseBackground(ImFrame imf)
public static void neutraliseBackground(java.awt.image.BufferedImage bim)
public static void autoCrop(ImFrame imf)
public static java.awt.image.BufferedImage autoCrop(java.awt.image.BufferedImage srcBim)
public static void autoStretch(ImFrame imf)
public static void autoStretch(java.awt.image.BufferedImage bim, boolean allChannelsSame)
public static void autoStretch(java.awt.image.BufferedImage bim, boolean allChannelsSame, java.awt.Point topLeft, java.awt.Point bottomRight)
public static byte[][] autoThreshold(ImFrame imf)
public static byte[][] autoThreshold(java.awt.image.BufferedImage bim)
public static boolean averageShift(java.awt.image.BufferedImage bim, int imNo, int middleImNo, java.util.List<MatchPair> matches, BlobMeas[][] lookup, int nBrightest)
public static void averageVertically(ImFrame imf)
public static void averageVertically(java.awt.image.BufferedImage bim)
public static void averageVertically(java.awt.image.BufferedImage bim, int yMin, int yMax)
public static void convertTo16BitsPerChannel(ImFrame imf)
public static java.awt.image.BufferedImage convertTo16BitsPerChannel(java.awt.image.BufferedImage srcBim)
public static void convertTo32BitsPerChannel(ImFrame imf)
public static void convertTo8BitsPerChannel(ImFrame imf)
public static java.awt.image.BufferedImage convertTo8BitsPerChannel(java.awt.image.BufferedImage srcBim)
public static void convertToMonochrome(ImFrame imf)
public static void convertToMonochrome(ImFrame imf, double... f)
public static void convertToMonochrome(java.awt.image.BufferedImage bim)
public static void convertToMonochrome(java.awt.image.BufferedImage bim, double... f)
public static void correctBackground(ImFrame imf)
public static void correctBackground(java.awt.image.BufferedImage im)
public static void crop(java.awt.Point pt1, java.awt.Point pt2, ImFrame imf)
public static void crop(java.awt.Point pt1, java.awt.Point pt2, ImFrame imf, boolean promptToConfirm)
public static java.awt.image.BufferedImage crop(java.awt.Point pt1, java.awt.Point pt2, java.awt.image.BufferedImage srcBim)
public static void divideAmplitudeByN(ImFrame imf, int n)
public static void divideAmplitudeByN(java.awt.image.BufferedImage bim, int n)
public static void divideByFlatField(ImFrame imf1, ImFrame imf2)
public static void divideByFlatField(java.awt.image.BufferedImage bim1, java.awt.image.BufferedImage bim2)
public static void fit(ImFrame imf, int width, int height)
public static java.awt.image.BufferedImage fit(java.awt.image.BufferedImage srcBim, int width, int height)
public static void flipHorizontal(ImFrame imf)
public static void flipHorizontal(java.awt.image.BufferedImage bim)
public static void flipVertical(ImFrame imf)
public static void flipVertical(java.awt.image.BufferedImage bim)
public static void invert(ImFrame imf)
public static void invert(java.awt.image.BufferedImage im)
public static void meanFilter(ImFrame imf)
public static java.awt.image.BufferedImage meanFilter(java.awt.image.BufferedImage srcBim, int halfWidth)
public static void medianFilter(ImFrame imf)
public static java.awt.image.BufferedImage medianFilter(java.awt.image.BufferedImage srcBim, int halfWidth)
public static void multiply(ImFrame imf1, ImFrame imf2)
public static void multiply(java.awt.image.BufferedImage bim1, java.awt.image.BufferedImage bim2)
public static void nearestExtremeFilter(ImFrame imf)
public static java.awt.image.BufferedImage nearestExtremeFilter(java.awt.image.BufferedImage srcBim, int halfWidth)
public static void rankFilter(ImFrame imf)
public static java.awt.image.BufferedImage rankFilter(java.awt.image.BufferedImage srcBim, int halfWidth)
public static void rotate(ImFrame imf)
public static void rotate(ImFrame imf, double angle)
public static java.awt.image.BufferedImage rotate(java.awt.image.BufferedImage srcBim, double angle)
public static void scale(ImFrame imf)
public static void scale(ImFrame imf, double factor, boolean interpolating)
public static java.awt.image.BufferedImage scale(java.awt.image.BufferedImage srcBim, double factor, boolean interpolating)
public static void splitChannels(ImFrame imf)
public static void splitIntensity(ImFrame imf)
public static void stereo(ImFrame imf1, ImFrame imf2)
public static void stereo(java.awt.image.BufferedImage bim1, java.awt.image.BufferedImage bim2)
public static void stretch(ImFrame imf, int[] minima, int[] maxima)
public static void stretch(java.awt.image.BufferedImage im, int[] minima, int[] maxima)
public static void sub(ImFrame imf1, ImFrame imf2)
public static void sub(java.awt.image.BufferedImage bim1, java.awt.image.BufferedImage bim2)
public static void subToZero(ImFrame imf1, ImFrame imf2)
public static void subToZero(java.awt.image.BufferedImage bim1, java.awt.image.BufferedImage bim2)
public static Threshold threshold(ImFrame imf)
public static void threshold(ImFrame imf, Threshold thresh)
public static byte[][] threshold(java.awt.image.BufferedImage bim, Threshold thresh)
public static void translate(ImFrame imf)
public static void translate(ImFrame imf, int dx, int dy)
public static java.awt.image.BufferedImage translate(java.awt.image.BufferedImage srcBim, int dx, int dy)
public static java.awt.image.BufferedImage translate(java.awt.image.BufferedImage srcBim, double dx, double dy)
public static void varianceFilter(ImFrame imf)
public static java.awt.image.BufferedImage varianceFilter(java.awt.image.BufferedImage srcBim, int halfWidth)
public static void doOpInBackground(java.lang.String op, ImFrame frame)
public static javax.swing.ProgressMonitor getMonitor()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |