|
JIGL v1.6 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--jigl.image.ColorImage
A color image is a set of three GrayImage planes.
| Field Summary | |
static int |
CMY
CMY Color Model |
protected int |
colorModel
Current Color Model; Default is RGB |
static int |
HLS
HLS Color Model |
static int |
HSV
HSV Color Model |
protected GrayImage[] |
planes
Set of 3 GrayImages |
static int |
RGB
RGB Color Model |
protected int |
X
Cartesian width |
protected int |
Y
Cartesian height |
static int |
YIQ
YIQ Color Model |
| Constructor Summary | |
ColorImage()
Creates an empty two dimensional ColorImage with a height and width of zero |
|
ColorImage(ColorImage img)
Creates a two dimensional ColorImage from img. |
|
ColorImage(Image img)
Creates a two dimensional GrayImage from the standard java.awt.Image |
|
ColorImage(int x,
int y)
Creates a two dimensional ColorImage with a height and width of x and y repectively |
|
| Method Summary | |
int[] |
absSum()
Adds absolute value of all the values together |
ColorImage |
add(ColorImage im)
Adds another ColorImage to this image |
ColorImage |
add(ColorImage im,
ROI sourceROI,
ROI destROI)
Adds a Region of Interest (sourceROI) in another ColorImage to a Region of Interest (destROI) of this image |
ColorImage |
add(int[] v)
Adds triplet to all the pixels in this image |
ColorImage |
add(int[] v,
ROI roi)
Adds triplet to all the pixels in a Region of Interest |
ColorImage |
add(int planeIndex,
int v)
Adds a value to all the pixels in a plane of this image |
ColorImage |
add(int val0,
int val1,
int val2)
Adds triplet to all the pixels in this image |
void |
add(int x,
int y,
int[] value)
Adds a triplet to a single pixel |
void |
add(int x,
int y,
int[] value,
ROI roi)
Adds a triplet to a single pixel in a Region of Interest |
void |
add(int x,
int y,
int val0,
int val1,
int val2)
Adds a triplet to a single pixel |
void |
add(int x,
int y,
int val0,
int val1,
int val2,
ROI roi)
Adds a triplet to a single pixel in a Region of Interest |
ColorImage |
add(int val0,
int val1,
int val2,
ROI roi)
Adds triplet to all the pixels in this image in a Region of Interest |
ColorImage |
add(int planeIndex,
int v,
ROI roi)
Adds a value to all the pixels in a plane in a Region of Interest |
ColorImage |
addbuffer(int w,
int h,
int[] color)
Makes a copy of this image with a buffer so the resulting image has a width w and height h |
ColorImage |
addbuffer(int w,
int h,
int xoff,
int yoff,
int[] color)
Makes a copy of this image with a buffer so the resulting image has a width w and height h |
int[] |
addSum()
Adds all the values together |
void |
byteSize()
Scales the range of this image to byte (0..255) |
void |
byteSize(ROI roi)
Scales the range of a Region of Interest of this image to byte (0..255) |
void |
clear()
Clears the image to zero |
void |
clear(int v)
Clears the image to a value |
void |
clip(int min,
int max)
Clips the range of this image to an arbitrary min/max |
void |
clip(int min,
int max,
ROI roi)
Clips the range of this image to an arbitrary min/max in a Region of Interest |
Image |
copy()
Makes a deep copy of this image |
Image |
copy(ROI roi)
Makes a deep copy of a Region of Interest |
ColorImage |
diff(ColorImage im)
Subtracts a ColorImage from this image and returns the absolute value. |
ColorImage |
divide(ColorImage im)
Divides this image by a ColorImage and returns a new ColorImage. |
ColorImage |
divide(ColorImage im,
ROI sourceROI,
ROI destROI)
Divides a Region of Interest (sourceROI) in this image by a Region of Interest (destROI) from another ColorImage |
ColorImage |
divide(int[] v)
Divides all the pixels of this image by a triplet |
ColorImage |
divide(int[] v,
ROI roi)
Divides all the pixels in a Region of Interest by a triplet |
ColorImage |
divide(int planeIndex,
int v)
Divides all the pixels in a plane of this image by a value |
ColorImage |
divide(int val0,
int val1,
int val2)
Divides all the pixels of this image by a triplet |
void |
divide(int x,
int y,
int[] value)
Divides a single pixel by a triplet |
void |
divide(int x,
int y,
int[] value,
ROI roi)
Divides a single pixel by a triplet in a Region of Interest |
void |
divide(int x,
int y,
int val0,
int val1,
int val2)
Divides a single pixel by a triplet |
void |
divide(int x,
int y,
int val0,
int val1,
int val2,
ROI roi)
Divides a single pixel by a triplet in a Region of Interest |
ColorImage |
divide(int val0,
int val1,
int val2,
ROI roi)
Divides all the pixels in a Region of Interest by a triplet |
ColorImage |
divide(int planeIndex,
int v,
ROI roi)
Divides all the pixels in a plane in a Region of Interest by a value |
int[] |
get(int x,
int y)
Returns the pixel value at the given x, y value as a triplet |
int[] |
get(int x,
int y,
ROI roi)
Returns the pixel value at the given x, y value as a triplet in a Region of Interest |
int |
getColorModel()
Returns the color model. |
ImageProducer |
getJavaImage()
Turns this image into a Java Image (java.awt.Image). |
void |
InitFromImage(Image img,
int x,
int y,
int w,
int h)
initializes plane data from a Java image. |
int |
max()
Finds the maximum value of all the planes of this image |
int |
max(int planeIndex)
Finds the maximum value of a single plane of this image |
int |
max(int planeIndex,
ROI roi)
Finds the maximum value of a single plane in a Region of Interest |
int |
max(ROI roi)
Finds the maximum value of all the planes in a Region of Interest |
int |
min()
Finds the minimum value of all the planes of this image |
int |
min(int planeIndex)
Finds the minimum value of a single plane of this image |
int |
min(int planeIndex,
ROI roi)
Finds the minimum value of a single plane in a Region of Interest |
int |
min(ROI roi)
Finds the minimum value of all the planes in a Region of Interest |
ColorImage |
multiply(ColorImage im)
Multiplies a ColorImage by this image and returns a new ColorImage. |
ColorImage |
multiply(ColorImage im,
ROI sourceROI,
ROI destROI)
Multiplies a Region of Interest (sourceROI) from another ColorImage by a Region of Interest (destROI) of this image |
ColorImage |
multiply(int[] v)
Multiplies a triplet by all the pixels of this image |
ColorImage |
multiply(int[] v,
ROI roi)
Multiplies a triplet by all the pixels in a Region of Interest |
ColorImage |
multiply(int planeIndex,
int v)
Multiplies all the pixels in a plane of this image by a value |
ColorImage |
multiply(int val0,
int val1,
int val2)
Multiplies a triplet by all the pixels of this image |
void |
multiply(int x,
int y,
int[] value)
Multiplies a triplet with a single pixel |
void |
multiply(int x,
int y,
int[] value,
ROI roi)
Multiplies a triplet with a single pixel in a Region of Interest |
void |
multiply(int x,
int y,
int val0,
int val1,
int val2)
Multiplies a triplet with a single pixel |
void |
multiply(int x,
int y,
int val0,
int val1,
int val2,
ROI roi)
Multiplies a triplet with a single pixel in a Region of Interest |
ColorImage |
multiply(int val0,
int val1,
int val2,
ROI roi)
Multiplies a triplet by all the pixels of this image in a Region of Interest |
ColorImage |
multiply(int planeIndex,
int v,
ROI roi)
Multiplies all the pixels in a plane in a Region of Interest by a value |
GrayImage |
plane(int planeIndex)
Returns the plane of this image. |
void |
set(int x,
int y,
int[] v)
Sets the pixel value at x, y to a value as a triplet |
void |
set(int x,
int y,
int[] v,
ROI roi)
Sets the pixel value at the given x, y value as a triplet in a Region of Interest |
void |
setColorModel(int cm)
sets the color model. |
void |
setPlane(int planeIndex,
GrayImage pl)
Set the plane to a GrayImage pl |
long[] |
sqrSum()
Adds the square of all the values together |
ColorImage |
subtract(ColorImage im)
Subtracts a ColorImage from this image |
ColorImage |
subtract(ColorImage im,
ROI sourceROI,
ROI destROI)
Subtracts a Region of Interest (sourceROI) from another ColorImage from a Region of Interest (destROI) of this image |
ColorImage |
subtract(int[] v)
Subtracts a triplet from all the pixels of this image |
ColorImage |
subtract(int[] v,
ROI roi)
Subtracts a triplet from all the pixels in a Region of Interest |
ColorImage |
subtract(int planeIndex,
int v)
Subtracts a value from all the pixels in a plane of this image |
ColorImage |
subtract(int val0,
int val1,
int val2)
Subtracts a triplet from all the pixels of this image |
void |
subtract(int x,
int y,
int[] value)
Subtracts a triplet from a single pixel |
void |
subtract(int x,
int y,
int[] value,
ROI roi)
Subtracts a triplet from a single pixel in a Region of Interest |
void |
subtract(int x,
int y,
int val0,
int val1,
int val2)
Subtracts a triplet from a single pixel |
void |
subtract(int x,
int y,
int val0,
int val1,
int val2,
ROI roi)
Subtracts a triplet from a single pixel in a Region of Interest |
ColorImage |
subtract(int val0,
int val1,
int val2,
ROI roi)
Subtracts a triplet from all the pixels in a Region of Interest |
ColorImage |
subtract(int planeIndex,
int v,
ROI roi)
Subtracts a value from all the pixels in a Region of Interest |
String |
toString()
Prints the image in integer format. |
String |
toString(ROI roi)
Prints a Region of Interest in integer format. |
int |
X()
Returns the width (maximum X value) |
int |
Y()
Returns the height (maximum Y value) |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected GrayImage[] planes
protected int X
protected int Y
public static final int RGB
public static final int CMY
public static final int YIQ
public static final int HSV
public static final int HLS
protected int colorModel
| Constructor Detail |
public ColorImage()
public ColorImage(int x,
int y)
public ColorImage(ColorImage img)
public ColorImage(Image img)
| Method Detail |
public Image copy()
copy in interface Imagepublic final int X()
X in interface Imagepublic final int Y()
Y in interface Imagepublic final int getColorModel()
public final void setColorModel(int cm)
cm - ColorModel
public final GrayImage plane(int planeIndex)
If this were an RGB image, plane(0) would return the red plane.
planeIndex - the plane of this image
public void setPlane(int planeIndex,
GrayImage pl)
planeIndex - the plane of this imagepl - GrayImage to set the plane to
public void InitFromImage(Image img,
int x,
int y,
int w,
int h)
public final int[] get(int x,
int y)
x - the X coordinatey - the Y coordinate
public final void set(int x,
int y,
int[] v)
x - the X coordinatey - the Y coordinatev - array of three integers holding the values for the set
public ColorImage addbuffer(int w,
int h,
int[] color)
w - width of buffered imageh - height of buffered imagecolor - array of 3 integers that is the default color to buffer with
public ColorImage addbuffer(int w,
int h,
int xoff,
int yoff,
int[] color)
w - width of buffered imageh - height of buffered imagexoff - x offset of this image in the buffered imageyoff - y offset of this image in the buffered imagecolor - array of 3 integers that is the default color to buffer with
public final void add(int x,
int y,
int[] value)
x - X-coordinatey - Y-coordinatevalue - triplet to add to the pixel
public final void add(int x,
int y,
int val0,
int val1,
int val2)
x - X-coordinatey - Y-coordinateval0 - value to add to the pixel in the first planeval1 - value to add to the pixel in the second planeval2 - value to add to the pixel in the third plane
public final void subtract(int x,
int y,
int[] value)
x - X-coordinatey - Y-coordinatevalue - triplet to subtract from the pixel
public final void subtract(int x,
int y,
int val0,
int val1,
int val2)
x - X-coordinatey - Y-coordinateval0 - value to subtract from the pixel in the first planeval1 - value to subtract from the pixel in the second planeval2 - value to subtract from the pixel in the third plane
public final void multiply(int x,
int y,
int[] value)
x - X-coordinatey - Y-coordinatevalue - triplet to multiply the pixel by
public final void multiply(int x,
int y,
int val0,
int val1,
int val2)
x - X-coordinatey - Y-coordinateval0 - value to multiply the pixel by in the first planeval1 - value to multiply the pixel by in the second planeval2 - value to multiply the pixel by in the third plane
public final void divide(int x,
int y,
int[] value)
x - X-coordinatey - Y-coordinatevalue - triplet to add to the pixel
public final void divide(int x,
int y,
int val0,
int val1,
int val2)
x - X-coordinateval0 - value to divide by the pixel in the first planeval1 - value to divide by the pixel in the second planeval2 - value to divide by the pixel in the third planepublic final int min()
public final int min(int planeIndex)
planeIndex - the plane
public final int max()
public final int max(int planeIndex)
planeIndex - the plane
public final ColorImage add(int val0,
int val1,
int val2)
val0 - value to add to the pixel in the first planeval1 - value to add to the pixel in the second planeval2 - value to add to the pixel in the third plane
public final ColorImage add(int[] v)
v - triplet to be added to the pixels
public final ColorImage add(int planeIndex,
int v)
planeIndex - the planev - value to be added to the pixels
public final ColorImage subtract(int val0,
int val1,
int val2)
val0 - value to subtract from the pixel in the first planeval1 - value to subtract from the pixel in the second planeval2 - value to subtract from the pixel in the third plane
public final ColorImage subtract(int[] v)
v - triplet to be subtracted from the pixels
public final ColorImage subtract(int planeIndex,
int v)
planeIndex - the planev - value to be added to the pixels
public final ColorImage multiply(int[] v)
v - triplet to be multiplied by
public final ColorImage multiply(int val0,
int val1,
int val2)
val0 - value to multiply the pixel by in the first planeval1 - value to multiply the pixel by in the second planeval2 - value to multiply the pixel by in the third plane
public final ColorImage multiply(int planeIndex,
int v)
planeIndex - the planev - value to be added to the pixels
public final ColorImage divide(int[] v)
v - triplet to be divided by
public final ColorImage divide(int val0,
int val1,
int val2)
val0 - value to divide by the pixel in the first planeval1 - value to divide by the pixel in the second planeval2 - value to divide by the pixel in the third plane
public final ColorImage divide(int planeIndex,
int v)
planeIndex - the planev - value to be added to the pixels
public final int[] addSum()
public final int[] absSum()
public final long[] sqrSum()
public final ColorImage add(ColorImage im)
im - the ColorImage to add
public final ColorImage subtract(ColorImage im)
im - the ColorImage to subtract
public final ColorImage diff(ColorImage im)
im - the RealColorImage to diff
public final ColorImage multiply(ColorImage im)
im - the ColorImage to multiply
public final ColorImage divide(ColorImage im)
im - the ColorImage to divide
public final String toString()
toString in interface ImagetoString in class Objectpublic final ImageProducer getJavaImage()
getJavaImage in interface ImageImageProducerpublic void byteSize()
public final void clip(int min,
int max)
min - minimum valuemax - maximum valuepublic final void clear()
public final void clear(int v)
v - value to clear topublic Image copy(ROI roi)
copy in interface Imageroi - Region of Interest
public final int[] get(int x,
int y,
ROI roi)
x - the X coordinatey - the Y coordinateroi - Region of Interest
public final void set(int x,
int y,
int[] v,
ROI roi)
x - the X coordinatey - the Y coordinatev - array of three integers holding the values for the setroi - Region of Interest
public final void add(int x,
int y,
int val0,
int val1,
int val2,
ROI roi)
x - X-coordinatey - Y-coordinateval0 - value to add to the pixel in the first planeval1 - value to add to the pixel in the second planeval2 - value to add to the pixel in the third planeroi - Region of Interest
public final void add(int x,
int y,
int[] value,
ROI roi)
x - X-coordinatey - Y-coordinatevalue - triplet to subtract from the pixelroi - Region of Interest
public final void subtract(int x,
int y,
int val0,
int val1,
int val2,
ROI roi)
x - X-coordinatey - Y-coordinateval0 - value to subtract from the pixel in the first planeval1 - value to subtract from the pixel in the second planeval2 - value to subtract from the pixel in the third planeroi - Region of Interest
public final void subtract(int x,
int y,
int[] value,
ROI roi)
x - X-coordinatey - Y-coordinatevalue - triplet to subtract from to the pixelroi - Region of Interest
public final void multiply(int x,
int y,
int val0,
int val1,
int val2,
ROI roi)
x - X-coordinatey - Y-coordinateval0 - value to multiply the pixel by in the first planeval1 - value to multiply the pixel by in the second planeval2 - value to multiply the pixel by in the third planeroi - Region of Interest
public final void multiply(int x,
int y,
int[] value,
ROI roi)
x - X-coordinatey - Y-coordinatevalue - triplet to multiply by the pixelroi - Region of Interest
public final void divide(int x,
int y,
int[] value,
ROI roi)
x - X-coordinatey - Y-coordinatevalue - triplet to add to the pixelroi - Region of Interest
public final void divide(int x,
int y,
int val0,
int val1,
int val2,
ROI roi)
x - X-coordinateval0 - value to divide by the pixel in the first planeval1 - value to divide by the pixel in the second planeval2 - value to divide by the pixel in the third planeroi - Region of Interestpublic final int min(ROI roi)
roi - Region of Interest
public final int min(int planeIndex,
ROI roi)
planeIndex - the planeroi - Region of Interest
public final int max(ROI roi)
roi - Region of Interest
public final int max(int planeIndex,
ROI roi)
planeIndex - the planeroi - Region of Interest
public final ColorImage add(int[] v,
ROI roi)
v - triplet to be added to the pixelsroi - Region of Interest
public final ColorImage add(int val0,
int val1,
int val2,
ROI roi)
val0 - value to add to the pixel in the first planeval1 - value to add to the pixel in the second planeval2 - value to add to the pixel in the third planeroi - Region of Interest
public final ColorImage add(int planeIndex,
int v,
ROI roi)
planeIndex - the planev - value to be added to the pixelsroi - Region of Interest
public final ColorImage subtract(int[] v,
ROI roi)
v - triplet to be subtracted from the pixelsroi - Region of Interest
public final ColorImage subtract(int val0,
int val1,
int val2,
ROI roi)
val0 - value to subtract from the pixel in the first planeval1 - value to subtract from the pixel in the second planeval2 - value to subtract from the pixel in the third planeroi - Region of Interest
public final ColorImage subtract(int planeIndex,
int v,
ROI roi)
planeIndex - the planev - value to be added to the pixelsroi - Region of Interest
public final ColorImage multiply(int[] v,
ROI roi)
v - triplet to be multiplied byroi - Region of Interest
public final ColorImage multiply(int val0,
int val1,
int val2,
ROI roi)
val0 - value to multiply the pixel by in the first planeval1 - value to multiply the pixel by in the second planeval2 - value to multiply the pixel by in the third planeroi - Region of Interest
public final ColorImage multiply(int planeIndex,
int v,
ROI roi)
planeIndex - the planev - value to be added to the pixelsroi - Region of Interest
public final ColorImage divide(int[] v,
ROI roi)
v - triplet to be divided byroi - Region of Interest
public final ColorImage divide(int val0,
int val1,
int val2,
ROI roi)
val0 - value to divide by the pixel in the first planeval1 - value to divide by the pixel in the second planeval2 - value to divide by the pixel in the third planeroi - Region of Interest
public final ColorImage divide(int planeIndex,
int v,
ROI roi)
planeIndex - the plane indexv - value to be added to the pixelsroi - Region of Interest
public final ColorImage add(ColorImage im,
ROI sourceROI,
ROI destROI)
im - the ColorImage to addsourceROI - Region of Interest for the Source ImagedestROI - Region of Interest for the Destination Image
public final ColorImage subtract(ColorImage im,
ROI sourceROI,
ROI destROI)
im - the ColorImage to subtractsourceROI - Region of Interest for the Source ImagedestROI - Region of Interest for the Destination Image
public final ColorImage multiply(ColorImage im,
ROI sourceROI,
ROI destROI)
im - the ColorImage to multiplysourceROI - Region of Interest for the Source ImagedestROI - Region of Interest for the Destination Image
public final ColorImage divide(ColorImage im,
ROI sourceROI,
ROI destROI)
im - the ColorImage to dividesourceROI - Region of Interest for the Source ImagedestROI - Region of Interest for the Destination Image
public final String toString(ROI roi)
roi - Region of Interestpublic void byteSize(ROI roi)
roi - Region of Interest of image.
public final void clip(int min,
int max,
ROI roi)
min - minimum valuemax - maximum valueroi - Region of Interest+
|
JIGL v1.6 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||