org.jscience.media.pictures.filters
Class RippleFilter

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

public class RippleFilter
extends TransformFilter

A filter which distorts an image by rippling it in the X or Y directions. The amplitude and wavelength of rippling can be specified as well as whether pixels going off the edges are wrapped or not.

See Also:
Serialized Form

Field Summary
static int NOISE
          DOCUMENT ME!
static int SAWTOOTH
          DOCUMENT ME!
static int SINE
          DOCUMENT ME!
static int TRIANGLE
          DOCUMENT ME!
 float xAmplitude
          DOCUMENT ME!
 float xWavelength
          DOCUMENT ME!
 float yAmplitude
          DOCUMENT ME!
 float yWavelength
          DOCUMENT ME!
 
Fields inherited from class org.jscience.media.pictures.filters.TransformFilter
CLAMP, edgeAction, WRAP, ZERO
 
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
RippleFilter()
          Construct a RIppleFIlter
 
Method Summary
 int getWaveType()
          DOCUMENT ME!
 float getXAmplitude()
          Get the amplitude of ripple in the X direction.
 float getXWavelength()
          Get the wavelength of ripple in the X direction.
 float getYAmplitude()
          Get the amplitude of ripple in the Y direction.
 float getYWavelength()
          Get the wavelength of ripple in the Y direction.
 void setWaveType(int waveType)
          DOCUMENT ME!
 void setXAmplitude(float xAmplitude)
          Set the amplitude of ripple in the X direction.
 void setXWavelength(float xWavelength)
          Set the wavelength of ripple in the X direction.
 void setYAmplitude(float yAmplitude)
          Set the amplitude of ripple in the Y direction.
 void setYWavelength(float yWavelength)
          Set the wavelength of ripple in the Y direction.
 java.lang.String toString()
          DOCUMENT ME!
protected  void transformInverse(int x, int y, float[] out)
          DOCUMENT ME!
protected  void transformSpace(java.awt.Rectangle r)
          DOCUMENT ME!
 
Methods inherited from class org.jscience.media.pictures.filters.TransformFilter
getEdgeAction, imageComplete, setEdgeAction
 
Methods inherited from class org.jscience.media.pictures.filters.WholeImageFilter
setColorModel, setDimensions, setPixels, setPixels
 
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

SINE

public static final int SINE
DOCUMENT ME!

See Also:
Constant Field Values

SAWTOOTH

public static final int SAWTOOTH
DOCUMENT ME!

See Also:
Constant Field Values

TRIANGLE

public static final int TRIANGLE
DOCUMENT ME!

See Also:
Constant Field Values

NOISE

public static final int NOISE
DOCUMENT ME!

See Also:
Constant Field Values

xAmplitude

public float xAmplitude
DOCUMENT ME!


yAmplitude

public float yAmplitude
DOCUMENT ME!


xWavelength

public float xWavelength
DOCUMENT ME!


yWavelength

public float yWavelength
DOCUMENT ME!

Constructor Detail

RippleFilter

public RippleFilter()
Construct a RIppleFIlter

Method Detail

setXAmplitude

public void setXAmplitude(float xAmplitude)
Set the amplitude of ripple in the X direction.

Parameters:
xAmplitude - the amplitude (in pixels).

getXAmplitude

public float getXAmplitude()
Get the amplitude of ripple in the X direction.

Returns:
the amplitude (in pixels).

setXWavelength

public void setXWavelength(float xWavelength)
Set the wavelength of ripple in the X direction.

Parameters:
xWavelength - the wavelength (in pixels).

getXWavelength

public float getXWavelength()
Get the wavelength of ripple in the X direction.

Returns:
the wavelength (in pixels).

setYAmplitude

public void setYAmplitude(float yAmplitude)
Set the amplitude of ripple in the Y direction.

Parameters:
yAmplitude - the amplitude (in pixels).

getYAmplitude

public float getYAmplitude()
Get the amplitude of ripple in the Y direction.

Returns:
the amplitude (in pixels).

setYWavelength

public void setYWavelength(float yWavelength)
Set the wavelength of ripple in the Y direction.

Parameters:
yWavelength - the wavelength (in pixels).

getYWavelength

public float getYWavelength()
Get the wavelength of ripple in the Y direction.

Returns:
the wavelength (in pixels).

setWaveType

public void setWaveType(int waveType)
DOCUMENT ME!

Parameters:
waveType - DOCUMENT ME!

getWaveType

public int getWaveType()
DOCUMENT ME!

Returns:
DOCUMENT ME!

transformSpace

protected void transformSpace(java.awt.Rectangle r)
DOCUMENT ME!

Overrides:
transformSpace in class TransformFilter
Parameters:
r - DOCUMENT ME!

transformInverse

protected void transformInverse(int x,
                                int y,
                                float[] out)
DOCUMENT ME!

Specified by:
transformInverse in class TransformFilter
Parameters:
x - DOCUMENT ME!
y - DOCUMENT ME!
out - DOCUMENT ME!

toString

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

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