org.jscience.media.pictures.filters
Class ErodeFilter

java.lang.Object
  extended by java.awt.image.ImageFilter
      extended by org.jscience.media.pictures.filters.WholeImageFilter
          extended by org.jscience.media.pictures.filters.BinaryFilter
              extended by org.jscience.media.pictures.filters.ErodeFilter
All Implemented Interfaces:
java.awt.image.ImageConsumer, java.io.Serializable, java.lang.Cloneable

public class ErodeFilter
extends BinaryFilter

Given a binary image, this filter performs binary erosion, setting all removed pixels to the given 'new' color.

See Also:
Serialized Form

Field Summary
protected  int threshold
          DOCUMENT ME!
 
Fields inherited from class org.jscience.media.pictures.filters.BinaryFilter
blackFunction, colormap, iterations, newColor
 
Fields inherited from class org.jscience.media.pictures.filters.WholeImageFilter
canFilterIndexColorModel, defaultRGBModel, inBytePixels, inPixels, originalSpace, transformedSpace
 
Fields inherited from class java.awt.image.ImageFilter
consumer
 
Fields inherited from interface java.awt.image.ImageConsumer
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT
 
Constructor Summary
ErodeFilter()
          Creates a new ErodeFilter object.
 
Method Summary
 int getThreshold()
          Return the threshold - the number of neighbouring pixels for dilation to occur.
 void imageComplete(int status)
          DOCUMENT ME!
 void setThreshold(int threshold)
          Set the threshold - the number of neighbouring pixels for dilation to occur.
 java.lang.String toString()
          DOCUMENT ME!
 
Methods inherited from class org.jscience.media.pictures.filters.BinaryFilter
getBlackFunction, getColormap, getIterations, getNewColor, setBlackFunction, setColormap, setIterations, setNewColor
 
Methods inherited from class org.jscience.media.pictures.filters.WholeImageFilter
setColorModel, setDimensions, setPixels, setPixels, transformSpace
 
Methods inherited from class java.awt.image.ImageFilter
clone, getFilterInstance, resendTopDownLeftRight, setHints, setProperties
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

threshold

protected int threshold
DOCUMENT ME!

Constructor Detail

ErodeFilter

public ErodeFilter()
Creates a new ErodeFilter object.

Method Detail

setThreshold

public void setThreshold(int threshold)
Set the threshold - the number of neighbouring pixels for dilation to occur.

Parameters:
threshold - the new threshold

getThreshold

public int getThreshold()
Return the threshold - the number of neighbouring pixels for dilation to occur.

Returns:
the current threshold

imageComplete

public void imageComplete(int status)
DOCUMENT ME!

Specified by:
imageComplete in interface java.awt.image.ImageConsumer
Overrides:
imageComplete in class java.awt.image.ImageFilter
Parameters:
status - DOCUMENT ME!

toString

public java.lang.String toString()
DOCUMENT ME!

Overrides:
toString in class java.lang.Object
Returns:
DOCUMENT ME!