JIGL
v1.6

jigl.image.warp
Class AffineTransform

java.lang.Object
  |
  +--jigl.image.warp.AffineTransform
All Implemented Interfaces:
PointMapper

public class AffineTransform
extends Object
implements PointMapper

Performs any affine warp on a mapped image. The matrix keeps constant.


Field Summary
protected  boolean applied_once
          Flag for whether the reverse matrix has been calculated.
protected  Matrix inverse
          Reverse transform matrix
protected  Matrix matrix
          Transfrom matrix
 
Constructor Summary
AffineTransform(double[][] data)
          Creates an Affine Transform from a two-dimensional array (transform matrix)
AffineTransform(Matrix m)
          Creates an Affine Transform from a matrix
 
Method Summary
 void inverseTransform(float[] x, float[] y)
          Performs the inverse of the Affine Transformation
 void inverseTransform(float[] x, float[] y, int offset, int count)
          Performs the inverse of the Affine Transformation.
 void transform(float[] x, float[] y)
          Performs the Affine Transformation.
 void transform(float[] x, float[] y, int offset, int count)
          Performs the Affine Transformation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

matrix

protected Matrix matrix
Transfrom matrix


inverse

protected Matrix inverse
Reverse transform matrix


applied_once

protected boolean applied_once
Flag for whether the reverse matrix has been calculated. True: having calculated.

Constructor Detail

AffineTransform

public AffineTransform(double[][] data)
Creates an Affine Transform from a two-dimensional array (transform matrix)


AffineTransform

public AffineTransform(Matrix m)
Creates an Affine Transform from a matrix

Method Detail

transform

public void transform(float[] x,
                      float[] y)
               throws IllegalArgumentException
Performs the Affine Transformation. Should satisfy x.length = y.length

Specified by:
transform in interface PointMapper
Parameters:
x - an array containing the x coordinates
y - an array containing the y coordinates
IllegalArgumentException

transform

public void transform(float[] x,
                      float[] y,
                      int offset,
                      int count)
               throws IllegalArgumentException
Performs the Affine Transformation

Specified by:
transform in interface PointMapper
Parameters:
x - an array containing the x coordinates
y - an array containing the y coordinates
offset - the starting point of the array
count - the number of points from the offset to apply the transformation
IllegalArgumentException

inverseTransform

public void inverseTransform(float[] x,
                             float[] y)
Performs the inverse of the Affine Transformation

Specified by:
inverseTransform in interface PointMapper
Parameters:
x - an array containing the x coordinates
y - an array containing the y coordinates

inverseTransform

public void inverseTransform(float[] x,
                             float[] y,
                             int offset,
                             int count)
Performs the inverse of the Affine Transformation.

Specified by:
inverseTransform in interface PointMapper
Parameters:
x - an array containing the x coordinates
y - an array containing the y coordinates
offset - the starting point of the array
count - the number of points from the offset to apply the transformation

JIGL
v1.6

Submit a bug or feature
Revised in May 2002 by Weiming Liu