|
JIGL v1.6 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--jigl.image.BinaryImage
BinaryImage is implrmented by a 2-d array of byte. All the values in a BinaryImage are either 1(white) or 0(black).
| Field Summary | |
protected byte[][] |
data
Two dimensional byte array |
protected int |
X
Cartesian width |
protected int |
Y
Cartesian height |
| Constructor Summary | |
BinaryImage()
Creates an empty two dimensional BinaryImage with a height and width of zero |
|
BinaryImage(BinaryImage image)
Creates a two dimensional BinaryImage (shallow copy of data) from image. |
|
BinaryImage(byte[][] data)
Creates a BinaryImage from data. |
|
BinaryImage(GrayImage image)
Creates a two dimensional BinaryImage from a GrayImage. |
|
BinaryImage(int x,
int y)
Creates a two dimensional BinaryImage with a width and height of x and y repectively |
|
BinaryImage(int x,
int y,
byte[] data)
Creates a two dimensional BinaryImage with a width and height of x and y repectively. |
|
BinaryImage(RealGrayImage image)
Creates a two dimensional BinaryImage from a RealGrayImage. |
|
| Method Summary | |
BinaryImage |
compliment()
Computes the complement of this image |
Image |
copy()
Makes a deep copy of this image |
Image |
copy(ROI roi)
Makes a deep copy of this image in a Region of Interest |
int |
count()
Counts the number of "on" pixels |
BinaryImage |
difference(BinaryImage image)
Returns the difference of this image and a BinaryImage |
byte |
get(int x,
int y)
Returns the pixel value at the given x, y value |
byte[][] |
getData()
Returns a deep copy of the image data. |
ImageProducer |
getJavaImage()
Gets the JavaImage from a JiglImage |
BinaryImage |
intersection(BinaryImage image)
Finds the intersection between this image and another BinaryImage. |
void |
set(int x,
int y,
int value)
Sets the pixel value at x, y to a given value |
BinaryImage |
shift(int horizonal,
int vertical)
Performs a shift on this image with out wrap. |
BinaryImage |
union(BinaryImage image)
Finds the union between this image and another BinaryImage |
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, toString, wait, wait, wait |
| Methods inherited from interface jigl.image.Image |
toString |
| Field Detail |
protected byte[][] data
protected int X
protected int Y
| Constructor Detail |
public BinaryImage()
public BinaryImage(int x,
int y)
x - width of imagey - height of image
public BinaryImage(int x,
int y,
byte[] data)
data[][] > 0, 0 otherwise.
x - width of imagey - height of imagedata - one dimensional array of byte. The array is length x*y.public BinaryImage(byte[][] data)
data[][] > 0, 0 otherwise.
data - two dimensional array of byte.public BinaryImage(GrayImage image)
image - GrayImagepublic BinaryImage(RealGrayImage image)
image - RealGrayImagepublic BinaryImage(BinaryImage image)
image - BinaryImage| Method Detail |
public ImageProducer getJavaImage()
getJavaImage in interface ImageImageProducerpublic byte[][] getData()
public Image copy()
copy in interface Imagepublic Image copy(ROI roi)
copy in interface Imageroi - Region of Interest of the image
public final int X()
X in interface Imagepublic final int Y()
Y in interface Image
public final byte get(int x,
int y)
x - the X coordinatey - the Y coordinate
public final void set(int x,
int y,
int value)
x - the X coordinatey - the Y coordinatevalue - the value to set the pixel to if greater than zero, it is given a value of 1, and 0 otherwise.public final BinaryImage union(BinaryImage image)
image - BinaryImage
public final BinaryImage intersection(BinaryImage image)
image - BinaryImage
public final BinaryImage compliment()
public final int count()
public final BinaryImage difference(BinaryImage image)
image - BinaryImage
public final BinaryImage shift(int horizonal,
int vertical)
horizonal - for right shift horizonal is positive for left it is negativevertical - for down shift vertical is positive for up it is negative
|
JIGL v1.6 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||