JIGL
v1.6

jigl.image
Class InterpolatedRealColorImage

java.lang.Object
  |
  +--jigl.image.RealColorImage
        |
        +--jigl.image.InterpolatedRealColorImage
All Implemented Interfaces:
Image, InterpolatedImage

public class InterpolatedRealColorImage
extends RealColorImage
implements InterpolatedImage

An InterpolatedRealColorImage is a RealColorImage that can be accessed at other than integral locations. Supports nearest neighbor, bilinear, and bicubic interpolation.


Field Summary
static int CUBIC
          Bicubic constant
protected  int interpolationMethod
          The interpolation method that will be used.
static int LINEAR
          Linear Interpolation constant
static int NEIGHBOR
          Nearest neighbor constant
 
Fields inherited from class jigl.image.RealColorImage
CMY, colorModel, HLS, HSV, planes, RGB, X, Y, YIQ
 
Constructor Summary
InterpolatedRealColorImage()
          Creates an empty color image
InterpolatedRealColorImage(InterpolatedRealColorImage img)
          Creates a color image that is a shallow copy of img
InterpolatedRealColorImage(int x, int y)
          Creates a color image of dimension x,y
InterpolatedRealColorImage(RealColorImage img)
           
 
Method Summary
 void accum(float x, float y, float[] value)
          Adds the triplet to the surrounding area.
 Image copy()
          deep copy
 int getInterpolationMethod()
          Returns the interpolation method
 float[] interp(float x, float y)
          Returns the interpolated triplet at (x,y).
 void setInterpolationMethod(int m)
          Set the interpolation method
 void splat(float x, float y, float[] value)
          Spread the triplet in the surrounding area.
 
Methods inherited from class jigl.image.RealColorImage
absSum, add, add, add, add, add, add, add, add, add, add, add, add, addbuffer, addbuffer, addSum, byteSize, byteSize, clear, clip, clip, copy, diff, divide, divide, divide, divide, divide, divide, divide, divide, divide, divide, divide, divide, get, get, getColorModel, getJavaImage, max, max, max, max, min, min, min, min, multiply, multiply, multiply, multiply, multiply, multiply, multiply, multiply, multiply, multiply, multiply, multiply, plane, set, set, setColorModel, setPlane, sqrSum, subtract, subtract, subtract, subtract, subtract, subtract, subtract, subtract, subtract, subtract, subtract, subtract, toString, toString, X, Y
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jigl.image.Image
copy, getJavaImage, toString, X, Y
 

Field Detail

NEIGHBOR

public static final int NEIGHBOR
Nearest neighbor constant

See Also:
Constant Field Values

LINEAR

public static final int LINEAR
Linear Interpolation constant

See Also:
Constant Field Values

CUBIC

public static final int CUBIC
Bicubic constant

See Also:
Constant Field Values

interpolationMethod

protected int interpolationMethod
The interpolation method that will be used. Default= NEIGHBOR

Constructor Detail

InterpolatedRealColorImage

public InterpolatedRealColorImage()
Creates an empty color image


InterpolatedRealColorImage

public InterpolatedRealColorImage(RealColorImage img)

InterpolatedRealColorImage

public InterpolatedRealColorImage(int x,
                                  int y)
Creates a color image of dimension x,y


InterpolatedRealColorImage

public InterpolatedRealColorImage(InterpolatedRealColorImage img)
Creates a color image that is a shallow copy of img

Method Detail

copy

public Image copy()
deep copy

Specified by:
copy in interface Image
Overrides:
copy in class RealColorImage
Returns:
a deep copy of RealColorImage

getInterpolationMethod

public int getInterpolationMethod()
Returns the interpolation method

Specified by:
getInterpolationMethod in interface InterpolatedImage

setInterpolationMethod

public void setInterpolationMethod(int m)
Set the interpolation method

Specified by:
setInterpolationMethod in interface InterpolatedImage

interp

public float[] interp(float x,
                      float y)
Returns the interpolated triplet at (x,y).


accum

public void accum(float x,
                  float y,
                  float[] value)
Adds the triplet to the surrounding area.


splat

public void splat(float x,
                  float y,
                  float[] value)
Spread the triplet in the surrounding area.


JIGL
v1.6

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