|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.pearsoneduc.ip.op.StructElement
Abstract base class for structuring elements used in morphological image processing.
| Field Summary | |
protected int |
height
Height of structuring element. |
protected java.awt.Point |
origin
Origin of structuring element, relative to upper-left corner. |
protected int[][] |
pixel
Structuring element data (1 or 0 for binary SE, arbitrary integers for grey SE). |
protected int |
width
Width of structuring element. |
| Constructor Summary | |
StructElement()
|
|
StructElement(int w,
int h)
Creates an SE with the specified dimensions. |
|
StructElement(int w,
int h,
java.awt.Point p)
Creates an SE with the specified dimensions and origin. |
|
| Method Summary | |
boolean |
equals(java.lang.Object obj)
Tests for equality with another StructElement object. |
int |
getHeight()
|
java.awt.Point |
getOrigin(java.awt.Point p)
|
int |
getPixel(int x,
int y)
Retrieves a value from the specified pixel in the SE. |
int |
getWidth()
|
protected int |
readInt(java.io.BufferedReader source,
java.lang.String key)
Reads the value of an SE parameter from the specified source. |
void |
setOrigin(java.awt.Point p)
Changes the origin of the SE. |
abstract void |
setPixels(int[] value)
Initialises SE pixels using values in a one-dimensional array. |
abstract void |
setPixels(int[][] value)
Initialises SE pixels using values in a two-dimensional array. |
abstract void |
setPixels(java.lang.String valueString)
Initialises SE pixels using values in a String. |
java.lang.String |
toString()
Creates a string indicating the type of structuring element, its dimensions and its origin. |
abstract void |
write(java.io.Writer destination)
Writes SE data, including a header, to the specified destination. |
abstract void |
writePixels(java.io.Writer destination)
Writes SE pixel values to the specified destination. |
| Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
protected int width
protected int height
protected java.awt.Point origin
protected int[][] pixel
| Constructor Detail |
public StructElement()
public StructElement(int w,
int h)
throws StructElementException
w - desired width of SEh - desired height of SE
public StructElement(int w,
int h,
java.awt.Point p)
throws StructElementException
w - desired width of SEh - desired height of SEp - position of SE's origin| Method Detail |
public boolean equals(java.lang.Object obj)
public java.lang.String toString()
public int getWidth()
public int getHeight()
public java.awt.Point getOrigin(java.awt.Point p)
public void setOrigin(java.awt.Point p)
p - a java.awt.Point object representing the new origin.
public int getPixel(int x,
int y)
x - x coordinate of SE pixely - y coordinate of SE pixel
public abstract void setPixels(int[] value)
throws StructElementException
value - array of SE pixel values
public abstract void setPixels(int[][] value)
throws StructElementException
value - array of SE pixel values
public abstract void setPixels(java.lang.String valueString)
throws StructElementException
valueString - a string of values for SE pixels, given row-by-rowpublic abstract void writePixels(java.io.Writer destination)
destination - Writer acting as destination for SE data
public abstract void write(java.io.Writer destination)
throws java.io.IOException
destination - Writer acting as destination for SE data
protected int readInt(java.io.BufferedReader source,
java.lang.String key)
throws java.io.IOException,
StructElementException
source - Reader acting as the source of SE datakey - String of the form "# param=", to match with what is
read from the input
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||