|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.pearsoneduc.ip.op.StructElement
|
+--com.pearsoneduc.ip.op.BinaryStructElement
A structuring element for the morphological processing of binary images.
| Fields inherited from class com.pearsoneduc.ip.op.StructElement |
height,
origin,
pixel,
width |
| Constructor Summary | |
BinaryStructElement()
Creates a 3x3 square SE. |
|
BinaryStructElement(int type)
Creates an instance of a standard BinaryStructElement, one of the types defined in the MorphologicalConstants interface. |
|
BinaryStructElement(int w,
int h)
Creates an instance of a BinaryStructElement with the specified dimensions. |
|
BinaryStructElement(int w,
int h,
java.awt.Point p)
Creates an instance of a BinaryStructElement with the specified dimensions and origin. |
|
BinaryStructElement(java.io.Reader source)
Creates an instance of a BinaryStructElement by reading data. |
|
| Method Summary | |
void |
clearPixel(int x,
int y)
Clears a pixel in the structuring element (i.e., gives it a value of 0). |
java.lang.Object |
clone()
|
boolean |
equals(java.lang.Object obj)
Tests for equality with another BinaryStructElement. |
boolean |
fits(java.awt.image.Raster raster,
int x,
int y)
Tests whether the SE fits within an image at the specified coordinates. |
boolean |
fitsComplement(java.awt.image.Raster raster,
int x,
int y)
Tests whether the SE fits within the complement of an image at the specified coordinates. |
BinaryStructElement |
getRotatedVersion()
|
boolean |
hits(java.awt.image.Raster raster,
int x,
int y)
Tests whether the SE hits an image when it is placed at the specified coordinates. |
void |
setPixel(int x,
int y)
Sets a pixel in the structuring element to 1. |
void |
setPixels()
Sets all pixels of the SE to 1. |
void |
setPixels(int[] value)
Copies values from a one-dimensional array into the SE. |
void |
setPixels(int[][] value)
Copies values from a two-dimensional array into the SE. |
void |
setPixels(java.lang.String valueString)
Copies values from a String into the SE. |
void |
write(java.io.Writer destination)
Writes SE data, including a header, to the specified destination. |
void |
writePixels(java.io.Writer destination)
Writes SE pixel values to the specified destination. |
| Methods inherited from class com.pearsoneduc.ip.op.StructElement |
getHeight,
getOrigin,
getPixel,
getWidth,
readInt,
setOrigin,
toString |
| Methods inherited from class java.lang.Object |
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public BinaryStructElement()
throws StructElementException
public BinaryStructElement(int w,
int h)
throws StructElementException
w - desired SE width (greater than 0)h - desired SE height (greater than 0)
public BinaryStructElement(int w,
int h,
java.awt.Point p)
throws StructElementException
w - desired SE width (greater than 0)h - desired SE height (greater than 0)p - java.awt.Point object representing origin of SE
public BinaryStructElement(int type)
throws StructElementException
type - integer specifying SE typeStructElementTypes
public BinaryStructElement(java.io.Reader source)
throws java.io.IOException,
StructElementException
source - Reader representing source of SE data| Method Detail |
public java.lang.Object clone()
public boolean equals(java.lang.Object obj)
obj - a BinaryStructElement object
public void setPixel(int x,
int y)
x - x coordinate of SE pixely - y coordinate of SE pixel
public void clearPixel(int x,
int y)
x - x coordinate of SE pixely - y coordinate of SE pixelpublic void setPixels()
public void setPixels(int[] value)
throws StructElementException
value - array of values to be copied into SE
public void setPixels(int[][] value)
throws StructElementException
value - array of values (1 or 0) to be copied into SE
public void setPixels(java.lang.String valueString)
throws StructElementException
valueString - String of ones and zeroes to be copied into SEpublic void writePixels(java.io.Writer destination)
destination - Writer acting as destination for the SE data
public void write(java.io.Writer destination)
throws java.io.IOException
destination - Writer acting as a destination for the SE
public boolean fits(java.awt.image.Raster raster,
int x,
int y)
Note: this method does not check whether SE pixels lie beyond the bounds of the image!
raster - Raster of the image into which the SE will be fittedx - x coordinate of pixel where SE will be placedy - y coordinate of pixel where SE will be placed
public boolean fitsComplement(java.awt.image.Raster raster,
int x,
int y)
Note: this method does not check whether SE pixels lie beyond the bounds of the image!
raster - Raster of the image into which the SE will be fittedx - x coordinate of pixel where SE will be placedy - y coordinate of pixel where SE will be placed
public boolean hits(java.awt.image.Raster raster,
int x,
int y)
Note: this method does not check whether SE pixels lie beyond the bounds of the image!
raster - Raster of the image with which the SE will be intersectedx - x coordinate of pixel where SE will be placedy - y coordinate of pixel where SE will be placedpublic BinaryStructElement getRotatedVersion()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||