org.jscience.media.pictures.filters
Class GaussianFilter

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

public class GaussianFilter
extends ConvolveFilter

A filter which applies Gaussian blur to an image. This is a subclass of ConvolveFilter which simply creates a kernel with a Gaussian distribution for blurring.

See Also:
Serialized Form

Field Summary
protected  int radius
          DOCUMENT ME!
 
Fields inherited from class org.jscience.media.pictures.filters.ConvolveFilter
alpha, kernel
 
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
GaussianFilter()
          Construct a Gaussian filter
GaussianFilter(int radius)
          Construct a Gaussian filter
 
Method Summary
 int getRadius()
          Get the radius of the kernel.
 void imageComplete(int status)
          DOCUMENT ME!
static Kernel makeKernel(int radius)
          DOCUMENT ME!
static Kernel[] separatedKernels(int radius)
          DOCUMENT ME!
 void setRadius(int radius)
          Set the radius of the kernel, and hence the amount of blur.
 java.lang.String toString()
          DOCUMENT ME!
 
Methods inherited from class org.jscience.media.pictures.filters.ConvolveFilter
convolve, convolve, convolveH, convolveHV, convolveV, getKernel, setKernel
 
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

radius

protected int radius
DOCUMENT ME!

Constructor Detail

GaussianFilter

public GaussianFilter()
Construct a Gaussian filter


GaussianFilter

public GaussianFilter(int radius)
Construct a Gaussian filter

Parameters:
radius - blur radius in pixels
Method Detail

setRadius

public void setRadius(int radius)
Set the radius of the kernel, and hence the amount of blur. The bigger the radius, the longer this filter will take.

Parameters:
radius - the radius of the blur in pixels.

getRadius

public int getRadius()
Get the radius of the kernel.

Returns:
the radius

imageComplete

public void imageComplete(int status)
DOCUMENT ME!

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

makeKernel

public static Kernel makeKernel(int radius)
DOCUMENT ME!

Parameters:
radius - DOCUMENT ME!
Returns:
DOCUMENT ME!

separatedKernels

public static Kernel[] separatedKernels(int radius)
DOCUMENT ME!

Parameters:
radius - DOCUMENT ME!
Returns:
DOCUMENT ME!

toString

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

Overrides:
toString in class ConvolveFilter
Returns:
DOCUMENT ME!