org.jscience.media.pictures.filters
Class WarpGrid

java.lang.Object
  extended by org.jscience.media.pictures.filters.WarpGrid
All Implemented Interfaces:
java.io.Serializable

public class WarpGrid
extends java.lang.Object
implements java.io.Serializable

A warp grid.

See Also:
Serialized Form

Field Summary
 int cols
          DOCUMENT ME!
 int rows
          DOCUMENT ME!
 float[] xGrid
          DOCUMENT ME!
 float[] yGrid
          DOCUMENT ME!
 
Constructor Summary
WarpGrid(int rows, int cols, int w, int h)
          Creates a new WarpGrid object.
 
Method Summary
protected  void interpolate(float[] xKnots, float[] yKnots, int offset, float[] splineY, int splineOffset, int splineLength)
          DOCUMENT ME!
 void lerp(float t, WarpGrid destination, WarpGrid intermediate)
          DOCUMENT ME!
 void warp(int[] inPixels, int cols, int rows, WarpGrid sourceGrid, WarpGrid destGrid, int[] outPixels)
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xGrid

public float[] xGrid
DOCUMENT ME!


yGrid

public float[] yGrid
DOCUMENT ME!


rows

public int rows
DOCUMENT ME!


cols

public int cols
DOCUMENT ME!

Constructor Detail

WarpGrid

public WarpGrid(int rows,
                int cols,
                int w,
                int h)
Creates a new WarpGrid object.

Parameters:
rows - DOCUMENT ME!
cols - DOCUMENT ME!
w - DOCUMENT ME!
h - DOCUMENT ME!
Method Detail

lerp

public void lerp(float t,
                 WarpGrid destination,
                 WarpGrid intermediate)
DOCUMENT ME!

Parameters:
t - DOCUMENT ME!
destination - DOCUMENT ME!
intermediate - DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

warp

public void warp(int[] inPixels,
                 int cols,
                 int rows,
                 WarpGrid sourceGrid,
                 WarpGrid destGrid,
                 int[] outPixels)
DOCUMENT ME!

Parameters:
inPixels - DOCUMENT ME!
cols - DOCUMENT ME!
rows - DOCUMENT ME!
sourceGrid - DOCUMENT ME!
destGrid - DOCUMENT ME!
outPixels - DOCUMENT ME!

interpolate

protected void interpolate(float[] xKnots,
                           float[] yKnots,
                           int offset,
                           float[] splineY,
                           int splineOffset,
                           int splineLength)
DOCUMENT ME!

Parameters:
xKnots - DOCUMENT ME!
yKnots - DOCUMENT ME!
offset - DOCUMENT ME!
splineY - DOCUMENT ME!
splineOffset - DOCUMENT ME!
splineLength - DOCUMENT ME!