org.jscience.media.pictures.filters.math
Class ImageFunction2D

java.lang.Object
  extended by org.jscience.media.pictures.filters.math.ImageFunction2D
All Implemented Interfaces:
Function2D

public class ImageFunction2D
extends java.lang.Object
implements Function2D

DOCUMENT ME!


Field Summary
static int CLAMP
          DOCUMENT ME!
protected  int edgeAction
          DOCUMENT ME!
protected  int height
          DOCUMENT ME!
protected  int[] pixels
          DOCUMENT ME!
protected  int width
          DOCUMENT ME!
static int WRAP
          DOCUMENT ME!
static int ZERO
          DOCUMENT ME!
 
Constructor Summary
ImageFunction2D(java.awt.Image image)
          Creates a new ImageFunction2D object.
ImageFunction2D(java.awt.Image image, int edgeAction)
          Creates a new ImageFunction2D object.
ImageFunction2D(int[] pixels, int width, int height, int edgeAction)
          Creates a new ImageFunction2D object.
 
Method Summary
 float evaluate(float x, float y)
          DOCUMENT ME!
 int getEdgeAction()
          DOCUMENT ME!
 int getHeight()
          DOCUMENT ME!
 int getWidth()
          DOCUMENT ME!
 void init(int[] pixels, int width, int height, int edgeAction)
          DOCUMENT ME!
 void setEdgeAction(int edgeAction)
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ZERO

public static final int ZERO
DOCUMENT ME!

See Also:
Constant Field Values

CLAMP

public static final int CLAMP
DOCUMENT ME!

See Also:
Constant Field Values

WRAP

public static final int WRAP
DOCUMENT ME!

See Also:
Constant Field Values

pixels

protected int[] pixels
DOCUMENT ME!


width

protected int width
DOCUMENT ME!


height

protected int height
DOCUMENT ME!


edgeAction

protected int edgeAction
DOCUMENT ME!

Constructor Detail

ImageFunction2D

public ImageFunction2D(java.awt.Image image)
Creates a new ImageFunction2D object.

Parameters:
image - DOCUMENT ME!

ImageFunction2D

public ImageFunction2D(java.awt.Image image,
                       int edgeAction)
Creates a new ImageFunction2D object.

Parameters:
image - DOCUMENT ME!
edgeAction - DOCUMENT ME!
Throws:
java.lang.RuntimeException - DOCUMENT ME!

ImageFunction2D

public ImageFunction2D(int[] pixels,
                       int width,
                       int height,
                       int edgeAction)
Creates a new ImageFunction2D object.

Parameters:
pixels - DOCUMENT ME!
width - DOCUMENT ME!
height - DOCUMENT ME!
edgeAction - DOCUMENT ME!
Method Detail

init

public void init(int[] pixels,
                 int width,
                 int height,
                 int edgeAction)
DOCUMENT ME!

Parameters:
pixels - DOCUMENT ME!
width - DOCUMENT ME!
height - DOCUMENT ME!
edgeAction - 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!

setEdgeAction

public void setEdgeAction(int edgeAction)
DOCUMENT ME!

Parameters:
edgeAction - DOCUMENT ME!

getEdgeAction

public int getEdgeAction()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getWidth

public int getWidth()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getHeight

public int getHeight()
DOCUMENT ME!

Returns:
DOCUMENT ME!