no.hiof.imagepr.morphology
Class StructElement

java.lang.Object
  extended byno.hiof.imagepr.morphology.StructElement
Direct Known Subclasses:
OvalStructEl, RectangStructEl, RingStructEl

public class StructElement
extends java.lang.Object

A StructElement object models a structure element used in morphologic processes.

Author:
Per-Olav Rusås
See Also:
Morphology

Field Summary
protected  short[][] elementMatrix
           
protected  int hCenter
           
protected  int vCenter
           
 
Constructor Summary
StructElement()
          Constructs an empty structure element.
StructElement(short[][] elementMatrix, int hCenter, int vCenter)
          Constructs a structure element with a given element matrix and center postition.
 
Method Summary
 StructElement createReflectStruct()
          Creates the reflection of the structure element.
 short[][] getElementMatrix()
          Gets the element matrix of the structure element.
 int getHCenter()
          Gets the horizontal coordinate of the center of the structure element.
 int getHeight()
          Gets the height of the element matrix.
 int getVCenter()
          Gets the vertical coordinate of the center of the structure element.
 int getWidth()
          Gets the width of the element matrix.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

elementMatrix

protected short[][] elementMatrix

hCenter

protected int hCenter

vCenter

protected int vCenter
Constructor Detail

StructElement

public StructElement()
Constructs an empty structure element.


StructElement

public StructElement(short[][] elementMatrix,
                     int hCenter,
                     int vCenter)
Constructs a structure element with a given element matrix and center postition.

Parameters:
elementMatrix - The element matrix.
hCenter - The horizontal position of the center.
vCenter - The horizontal position of the center.
Method Detail

getHCenter

public int getHCenter()
Gets the horizontal coordinate of the center of the structure element.

Returns:
The horizontal coordinate of the center.

getVCenter

public int getVCenter()
Gets the vertical coordinate of the center of the structure element.

Returns:
The vertical coordinate of the center.

getHeight

public int getHeight()
Gets the height of the element matrix.

Returns:
The height of the structure element.

getWidth

public int getWidth()
Gets the width of the element matrix.

Returns:
The width of the structure element.

getElementMatrix

public short[][] getElementMatrix()
Gets the element matrix of the structure element.

Returns:
The element matrix.

createReflectStruct

public StructElement createReflectStruct()
Creates the reflection of the structure element.

Returns:
The reflection of the structure element.