|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jm.jigl.RealGrayImage
RealGrayImage is a 2-d array of floats
jigl.image.RealGrayImage
Field Summary | |
protected float[][] |
data
Two dimensional float array |
protected int |
X
Cartesian width |
protected int |
Y
Cartesian height |
Constructor Summary | |
RealGrayImage()
Creates an empty two dimensional RealGrayImage with a height and width of zero |
|
RealGrayImage(float[][] dat)
Creates a two dimensional GrayImage from a two dimensional array |
|
RealGrayImage(java.awt.Image img)
Creates a two dimensional RealGrayImage from the standard java.awt.Image |
|
RealGrayImage(int x,
int y)
Creates a two dimensional RealGrayImage with a height and width of x and y repectively |
|
RealGrayImage(int x,
int y,
float[] dat)
Creates a two dimensional GrayImage with a height and width of x and y repectively |
|
RealGrayImage(RealGrayImage img)
Creates an two dimensional RealGrayImage (shallow copy) from RealGrayImage img |
Method Summary | |
float |
absSum()
Adds absolute value of all the values together |
RealGrayImage |
add(float v)
Adds a value to all the pixels in this image |
RealGrayImage |
add(float v,
ROI r)
Adds a value to all the pixels in a Region of Interest |
void |
add(int x,
int y,
float value)
Adds a value to a single pixel |
void |
add(int x,
int y,
float value,
ROI r)
Adds a value to a single pixel in a Region of Interest |
RealGrayImage |
add(RealGrayImage im)
Adds another RealGrayImage to this image |
RealGrayImage |
add(RealGrayImage im,
ROI sourceImage,
ROI destImage)
Adds a Region of Interest in another RealGrayImage to a Region of Interest of this image |
float |
addSum()
Adds all the values together |
void |
byteSize()
Scales the range of this image to byte (0..255) |
RealGrayImage |
clear()
Clears the image to zero |
RealGrayImage |
clear(float val)
Clears to constant 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 r)
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 r)
Makes a deep copy of a Region of Interest |
RealGrayImage |
diff(RealGrayImage im)
Subtracts the second image from the first and returns the absolute value |
RealGrayImage |
divide(float v)
Divides all the pixels in this image by a value |
RealGrayImage |
divide(float v,
ROI r)
Divides all the pixels by a value in a Region of Interest |
void |
divide(int x,
int y,
float value)
Divides a single pixel by a value |
void |
divide(int x,
int y,
float value,
ROI r)
Divides a single pixel by a value in a Region of Interest |
RealGrayImage |
divide(RealGrayImage im)
Divides this image by a RealGrayImage |
RealGrayImage |
divide(RealGrayImage im,
ROI sourceImage,
ROI destImage)
Divides by a Region of Interest in this image by a Region of Interest of another RealGrayImage |
float |
get(int x,
int y)
Returns the pixel value at the given x, y value |
java.awt.image.ImageProducer |
getJavaImage()
Turns this image into a Java Image (java.awt.Image). |
float |
max()
Finds the maximum value of this image |
float |
max(ROI r)
Finds the maximum value in a Region of Interest |
void |
median(int size)
Performs median filter on this image |
void |
median(int size,
ROI r)
Performs median filter in a Region of Interest |
float |
min()
Finds the minimum value of this image |
float |
min(ROI r)
Finds the minimum value in a Region of Interest |
RealGrayImage |
multiply(float v)
Multiplies all the pixels in this image by a value |
RealGrayImage |
multiply(float v,
ROI r)
Multiplies all the pixels in a Region of Interest by a value |
void |
multiply(int x,
int y,
float value)
Mutiplies a single pixel by a value |
void |
multiply(int x,
int y,
float value,
ROI r)
Mutiplies a single pixel by a value in a Region of Interest |
RealGrayImage |
multiply(RealGrayImage im)
Multiplies a RealGrayImage by this image |
RealGrayImage |
multiply(RealGrayImage im,
ROI sourceImage,
ROI destImage)
Multiplies a Region of Interest of another RealGrayImage by a Region of Interest of this image |
void |
set(int x,
int y,
float value)
Sets the pixel value at x, y to a given value |
void |
set(int x,
int y,
float value,
ROI r)
Sets the pixel value at x, y to a given value in a Region of Interest |
double |
sqrSum()
Adds the square of all the values together |
RealGrayImage |
subtract(float v)
Subtracts a value from all the pixels in this image |
RealGrayImage |
subtract(float v,
ROI r)
Subtracts a value from all the pixels in a Region of Interest |
void |
subtract(int x,
int y,
float value)
Subtracts a value from a single pixel |
void |
subtract(int x,
int y,
float value,
ROI r)
Subtracts a value from a single pixel in a Region of Interest |
RealGrayImage |
subtract(RealGrayImage im)
Subtracts a RealGrayImage from this image |
RealGrayImage |
subtract(RealGrayImage im,
ROI sourceImage,
ROI destImage)
Subtracts a Region of Interest in another RealGrayImage from a Region of Interest of this image |
java.lang.String |
toString()
Prints the string in integer format. |
java.lang.String |
toString(ROI r)
Prints the string in integer format in a Region of Interest. |
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 float[][] data
protected int X
protected int Y
Constructor Detail |
public RealGrayImage()
public RealGrayImage(int x, int y)
public RealGrayImage(int x, int y, float[] dat)
x
- width of imagey
- height of imagedat
- one dimensional array of float. The array is length x*y.public RealGrayImage(float[][] dat)
dat
- two dimensional array of shortpublic RealGrayImage(RealGrayImage img)
public RealGrayImage(java.awt.Image img)
Method Detail |
public Image copy()
copy
in interface Image
public final int X()
X
in interface Image
public final int Y()
Y
in interface Image
public final float get(int x, int y)
x
- the X coordinanty
- the Y coordinantpublic final void set(int x, int y, float value)
x
- the X coordinanty
- the Y coordinantvalue
- the value to set the pixel topublic final RealGrayImage clear()
public final RealGrayImage clear(float val)
val
- the value to "clear" the image topublic final void add(int x, int y, float value)
x
- X-coordinanty
- Y-coordinantvalue
- the value to add to the pixelpublic final void subtract(int x, int y, float value)
x
- X-coordinanty
- Y-coordinantvalue
- the value to subtract from the pixelpublic final void multiply(int x, int y, float value)
x
- X-coordinanty
- Y-coordinantvalue
- - the value to mutiply to the pixelpublic final void divide(int x, int y, float value)
x
- X-coordinanty
- Y-coordinantvalue
- - the value to mutiply to the pixelpublic final float min()
public final float max()
public final float addSum()
public final float absSum()
public final double sqrSum()
public final RealGrayImage add(float v)
v
- value to be added to the pixels
public final RealGrayImage subtract(float v)
v
- value to be added to the pixels
public final RealGrayImage multiply(float v)
v
- value to be added to the pixels
public final RealGrayImage divide(float v)
v
- value to be added to the pixels
public final RealGrayImage add(RealGrayImage im)
im
- the RealGrayImage to add
public final RealGrayImage subtract(RealGrayImage im)
im
- the RealGrayImage to subtract
public final RealGrayImage diff(RealGrayImage im)
public final RealGrayImage multiply(RealGrayImage im)
im
- the RealGrayImage to multiply
public final RealGrayImage divide(RealGrayImage im)
im
- the RealGrayImage to divide
public java.lang.String toString()
toString
in interface Image
toString
in class java.lang.Object
public java.awt.image.ImageProducer getJavaImage()
getJavaImage
in interface Image
java.awt.ImageProducer
public void byteSize()
public void clip(int min, int max)
min
- minimum valuemax
- maximum valuepublic void median(int size)
size
- the size of the median filterpublic Image copy(ROI r)
copy
in interface Image
r
- Region of Interest
public final void set(int x, int y, float value, ROI r)
x
- the X coordinanty
- the Y coordinantvalue
- the value to set the pixel tor
- Region of Interestpublic final void add(int x, int y, float value, ROI r)
x
- X-coordinanty
- Y-coordinantvalue
- the value to add to the pixelr
- Region of Interestpublic final void subtract(int x, int y, float value, ROI r)
x
- X-coordinanty
- Y-coordinantvalue
- the value to subtract from the pixelr
- Region of Interestpublic final void multiply(int x, int y, float value, ROI r)
x
- X-coordinanty
- Y-coordinantvalue
- - the value to mutiply to the pixelr
- Region of Interestpublic final void divide(int x, int y, float value, ROI r)
x
- X-coordinanty
- Y-coordinantvalue
- - the value to mutiply to the pixelr
- Region of Interestpublic final float min(ROI r)
r
- Region of Interest
public final float max(ROI r)
r
- Region of Interest
public final RealGrayImage add(float v, ROI r)
v
- value to be added to the pixelsr
- Region of Interest
public final RealGrayImage subtract(float v, ROI r)
v
- value to be added to the pixelsr
- Region of Interest
public final RealGrayImage multiply(float v, ROI r)
v
- value to be added to the pixelsr
- Region of Interest
public final RealGrayImage divide(float v, ROI r)
v
- value to be added to the pixelsr
- Region of Interest
public final RealGrayImage add(RealGrayImage im, ROI sourceImage, ROI destImage)
im
- the RealGrayImage to addsourceImage
- Region of Interest for the Source ImagedestImage
- Region of Interest for the Destination Image
public final RealGrayImage subtract(RealGrayImage im, ROI sourceImage, ROI destImage)
im
- the RealGrayImage to subtractsourceImage
- Region of Interest for the Source ImagedestImage
- Region of Interest for the Destination Image
public final RealGrayImage multiply(RealGrayImage im, ROI sourceImage, ROI destImage)
im
- the RealGrayImage to multiplysourceImage
- Region of Interest for the Source ImagedestImage
- Region of Interest for the Destination Image
public final RealGrayImage divide(RealGrayImage im, ROI sourceImage, ROI destImage)
im
- the RealGrayImage to dividesourceImage
- Region of Interest for the Source ImagedestImage
- Region of Interest for the Destination Image
public java.lang.String toString(ROI r)
r
- Region of Interest
public void clip(int min, int max, ROI r)
min
- minimum valuemax
- maximum valuer
- Region of Interestpublic void median(int size, ROI r)
size
- the size of the median filterr
- Region of Interest
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |