|
|||||||||
| 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.GreyStructElement
A structuring element for the morphological processing of greyscale images.
| Fields inherited from class com.pearsoneduc.ip.op.StructElement |
height,
origin,
pixel,
width |
| Constructor Summary | |
GreyStructElement(int value)
Creates a 3x3 square SE with pixels set to the specified value. |
|
GreyStructElement(int w,
int h,
int value)
Creates a rectangular GreyStructElement with the specified dimensions and pixel value. |
|
GreyStructElement(int w,
int h,
java.awt.Point p,
int value)
Creates an instance of a GreyStructElement with the specified dimensions, origin and pixel value. |
|
GreyStructElement(java.io.Reader source)
Creates an instance of a GreyStructElement by reading data. |
|
| Method Summary | |
int |
above(java.awt.image.Raster raster,
int x,
int y)
Calculates the minimum distance that a rotated SE would need to be pushed up so as to be above the image. |
int |
below(java.awt.image.Raster raster,
int x,
int y)
Calculates the maximum distance that the SE can be pushed up whilst remaining beneath an image. |
java.lang.Object |
clone()
|
boolean |
equals(java.lang.Object obj)
Tests for equality with another GreyStructElement. |
GreyStructElement |
getRotatedVersion()
|
void |
setPixel(int x,
int y,
int value)
Sets a pixel in the structuring element to the specified value. |
void |
setPixels(int value)
Sets all pixels of the SE to the specified value. |
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 GreyStructElement(int value)
throws StructElementException
value - SE pixel value
public GreyStructElement(int w,
int h,
int value)
throws StructElementException
w - desired SE width (greater than 0)h - desired SE height (greater than 0)value - SE pixel value
public GreyStructElement(int w,
int h,
java.awt.Point p,
int value)
throws StructElementException
w - desired SE width (greater than 0)h - desired SE height (greater than 0)p - java.awt.Point object representing origin of SEvalue - SE pixel value
public GreyStructElement(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 GreyStructElement object
public void setPixel(int x,
int y,
int value)
x - x coordinate of SE pixely - y coordinate of SE pixelvalue - new value for SE pixelpublic void setPixels(int value)
value - new value for SE pixels
public void setPixels(int[] value)
throws StructElementException
value - array of values to be copied into the SE
public void setPixels(int[][] value)
throws StructElementException
value - array of values to be copied into SE
public void setPixels(java.lang.String valueString)
throws StructElementException
valueString - String of values 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 int below(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 on which the SE will operatex - x coordinate of pixel where SE will be placedy - y coordinate of pixel where SE will be placed
public int above(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 on which the SE will operatex - x coordinate of pixel where SE will be placedy - y coordinate of pixel where SE will be placedpublic GreyStructElement getRotatedVersion()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||