org.jscience.media.pictures.filters
Class CellularFilter

java.lang.Object
  extended by java.awt.image.ImageFilter
      extended by org.jscience.media.pictures.filters.WholeImageFilter
          extended by org.jscience.media.pictures.filters.CellularFilter
All Implemented Interfaces:
java.awt.image.ImageConsumer, java.io.Serializable, java.lang.Cloneable, Function2D, MutatableFilter
Direct Known Subclasses:
CrystalizeFilter

public class CellularFilter
extends WholeImageFilter
implements Function2D, MutatableFilter, java.lang.Cloneable, java.io.Serializable

DOCUMENT ME!

See Also:
Serialized Form

Nested Class Summary
 class CellularFilter.Point
          DOCUMENT ME!
 
Field Summary
 float amount
          DOCUMENT ME!
protected  float angle
          DOCUMENT ME!
protected  float angleCoefficient
          DOCUMENT ME!
 float bias
          DOCUMENT ME!
protected  float[] coefficients
          DOCUMENT ME!
protected  Colormap colormap
          DOCUMENT ME!
 float distancePower
          DOCUMENT ME!
 float gain
          DOCUMENT ME!
protected  int gridType
          DOCUMENT ME!
static int HEXAGONAL
          DOCUMENT ME!
protected  float m00
          DOCUMENT ME!
protected  float m01
          DOCUMENT ME!
protected  float m10
          DOCUMENT ME!
protected  float m11
          DOCUMENT ME!
static int OCTAGONAL
          DOCUMENT ME!
protected  java.util.Random random
          DOCUMENT ME!
static int RANDOM
          DOCUMENT ME!
protected  float randomness
          DOCUMENT ME!
protected  CellularFilter.Point[] results
          DOCUMENT ME!
protected  float scale
          DOCUMENT ME!
static int SQUARE
          DOCUMENT ME!
protected  float stretch
          DOCUMENT ME!
static int TRIANGULAR
          DOCUMENT ME!
 float turbulence
          DOCUMENT ME!
 boolean useColor
          DOCUMENT ME!
 
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
CellularFilter()
          Creates a new CellularFilter object.
 
Method Summary
 java.lang.Object clone()
          DOCUMENT ME!
 float evaluate(float x, float y)
          DOCUMENT ME!
 float getAmount()
          DOCUMENT ME!
 float getAngle()
          DOCUMENT ME!
 float getAngleCoefficient()
          DOCUMENT ME!
 float getCoefficient(int i)
          DOCUMENT ME!
 Colormap getColormap()
          DOCUMENT ME!
 float getDistancePower()
          DOCUMENT ME!
 float getGradientCoefficient()
          DOCUMENT ME!
 int getGridType()
          DOCUMENT ME!
 int getPixel(int x, int y, int[] inPixels, int width, int height)
          DOCUMENT ME!
 float getRandomness()
          DOCUMENT ME!
 float getScale()
          DOCUMENT ME!
 float getStretch()
          DOCUMENT ME!
 float getTurbulence()
          DOCUMENT ME!
 void imageComplete(int status)
          DOCUMENT ME!
 void mutate(int amount, java.awt.image.ImageFilter d, boolean keepShape, boolean keepColors)
          DOCUMENT ME!
 void setAmount(float amount)
          DOCUMENT ME!
 void setAngle(float angle)
          DOCUMENT ME!
 void setAngleCoefficient(float angleCoefficient)
          DOCUMENT ME!
 void setCoefficient(int i, float v)
          DOCUMENT ME!
 void setColormap(Colormap colormap)
          DOCUMENT ME!
 void setDistancePower(float distancePower)
          DOCUMENT ME!
 void setGradientCoefficient(float gradientCoefficient)
          DOCUMENT ME!
 void setGridType(int gridType)
          DOCUMENT ME!
 void setRandomness(float randomness)
          DOCUMENT ME!
 void setScale(float scale)
          DOCUMENT ME!
 void setStretch(float stretch)
          DOCUMENT ME!
 void setTurbulence(float turbulence)
          DOCUMENT ME!
 java.lang.String toString()
          DOCUMENT ME!
 float turbulence2(float x, float y, float freq)
          DOCUMENT ME!
 
Methods inherited from class org.jscience.media.pictures.filters.WholeImageFilter
setColorModel, setDimensions, setPixels, setPixels, transformSpace
 
Methods inherited from class java.awt.image.ImageFilter
getFilterInstance, resendTopDownLeftRight, setHints, setProperties
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RANDOM

public static final int RANDOM
DOCUMENT ME!

See Also:
Constant Field Values

SQUARE

public static final int SQUARE
DOCUMENT ME!

See Also:
Constant Field Values

HEXAGONAL

public static final int HEXAGONAL
DOCUMENT ME!

See Also:
Constant Field Values

OCTAGONAL

public static final int OCTAGONAL
DOCUMENT ME!

See Also:
Constant Field Values

TRIANGULAR

public static final int TRIANGULAR
DOCUMENT ME!

See Also:
Constant Field Values

scale

protected float scale
DOCUMENT ME!


stretch

protected float stretch
DOCUMENT ME!


angle

protected float angle
DOCUMENT ME!


amount

public float amount
DOCUMENT ME!


turbulence

public float turbulence
DOCUMENT ME!


gain

public float gain
DOCUMENT ME!


bias

public float bias
DOCUMENT ME!


distancePower

public float distancePower
DOCUMENT ME!


useColor

public boolean useColor
DOCUMENT ME!


colormap

protected Colormap colormap
DOCUMENT ME!


coefficients

protected float[] coefficients
DOCUMENT ME!


angleCoefficient

protected float angleCoefficient
DOCUMENT ME!


random

protected java.util.Random random
DOCUMENT ME!


m00

protected float m00
DOCUMENT ME!


m01

protected float m01
DOCUMENT ME!


m10

protected float m10
DOCUMENT ME!


m11

protected float m11
DOCUMENT ME!


results

protected CellularFilter.Point[] results
DOCUMENT ME!


randomness

protected float randomness
DOCUMENT ME!


gridType

protected int gridType
DOCUMENT ME!

Constructor Detail

CellularFilter

public CellularFilter()
Creates a new CellularFilter object.

Method Detail

setScale

public void setScale(float scale)
DOCUMENT ME!

Parameters:
scale - DOCUMENT ME!

getScale

public float getScale()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setStretch

public void setStretch(float stretch)
DOCUMENT ME!

Parameters:
stretch - DOCUMENT ME!

getStretch

public float getStretch()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setAngle

public void setAngle(float angle)
DOCUMENT ME!

Parameters:
angle - DOCUMENT ME!

getAngle

public float getAngle()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setCoefficient

public void setCoefficient(int i,
                           float v)
DOCUMENT ME!

Parameters:
i - DOCUMENT ME!
v - DOCUMENT ME!

getCoefficient

public float getCoefficient(int i)
DOCUMENT ME!

Parameters:
i - DOCUMENT ME!
Returns:
DOCUMENT ME!

setAngleCoefficient

public void setAngleCoefficient(float angleCoefficient)
DOCUMENT ME!

Parameters:
angleCoefficient - DOCUMENT ME!

getAngleCoefficient

public float getAngleCoefficient()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setGradientCoefficient

public void setGradientCoefficient(float gradientCoefficient)
DOCUMENT ME!

Parameters:
gradientCoefficient - DOCUMENT ME!

getGradientCoefficient

public float getGradientCoefficient()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setColormap

public void setColormap(Colormap colormap)
DOCUMENT ME!

Parameters:
colormap - DOCUMENT ME!

getColormap

public Colormap getColormap()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setRandomness

public void setRandomness(float randomness)
DOCUMENT ME!

Parameters:
randomness - DOCUMENT ME!

getRandomness

public float getRandomness()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setGridType

public void setGridType(int gridType)
DOCUMENT ME!

Parameters:
gridType - DOCUMENT ME!

getGridType

public int getGridType()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setDistancePower

public void setDistancePower(float distancePower)
DOCUMENT ME!

Parameters:
distancePower - DOCUMENT ME!

getDistancePower

public float getDistancePower()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setTurbulence

public void setTurbulence(float turbulence)
DOCUMENT ME!

Parameters:
turbulence - DOCUMENT ME!

getTurbulence

public float getTurbulence()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setAmount

public void setAmount(float amount)
DOCUMENT ME!

Parameters:
amount - DOCUMENT ME!

getAmount

public float getAmount()
DOCUMENT ME!

Returns:
DOCUMENT ME!

evaluate

public float evaluate(float x,
                      float y)
DOCUMENT ME!

Specified by:
evaluate in interface Function2D
Parameters:
x - DOCUMENT ME!
y - DOCUMENT ME!
Returns:
DOCUMENT ME!

turbulence2

public float turbulence2(float x,
                         float y,
                         float freq)
DOCUMENT ME!

Parameters:
x - DOCUMENT ME!
y - DOCUMENT ME!
freq - DOCUMENT ME!
Returns:
DOCUMENT ME!

getPixel

public int getPixel(int x,
                    int y,
                    int[] inPixels,
                    int width,
                    int height)
DOCUMENT ME!

Parameters:
x - DOCUMENT ME!
y - DOCUMENT ME!
inPixels - DOCUMENT ME!
width - DOCUMENT ME!
height - DOCUMENT ME!
Returns:
DOCUMENT ME!

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!

mutate

public void mutate(int amount,
                   java.awt.image.ImageFilter d,
                   boolean keepShape,
                   boolean keepColors)
DOCUMENT ME!

Specified by:
mutate in interface MutatableFilter
Parameters:
amount - DOCUMENT ME!
d - DOCUMENT ME!
keepShape - DOCUMENT ME!
keepColors - DOCUMENT ME!

clone

public java.lang.Object clone()
DOCUMENT ME!

Overrides:
clone in class java.awt.image.ImageFilter
Returns:
DOCUMENT ME!

toString

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

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