Java Platform 1.2
Beta 4

Class java.awt.image.Kernel


public class Kernel
extends Object
implements Cloneable
This class defines a Kernel object. A kernel is a matrix describing how a given pixel and its surrounding pixels affect the value computed for the given pixel's position in the output image of a filtering operation. The X origin and Y origin indicate the kernel matrix element which corresponds to the pixel position for which an output value is being computed.

See Also:

Constructor Summary
Kernel(int width, int height, float[] data)
          Constructs a Kernel object from an array of floats.
Method Summary
 Object clone()
          Clones this object.
 int getHeight()
          Returns the height.
 float[] getKernelData(float[] data)
          Returns the kernel data in row major order.
 int getWidth()
          Returns the width.
 int getXOrigin()
          Returns the X origin.
 int getYOrigin()
          Returns the Y origin.
Methods inherited from class java.lang.Object
equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait

Constructor Detail


public Kernel(int width,
              int height,
              float[] data)
Constructs a Kernel object from an array of floats. The first width*height elements of the data array are copied. If the length of the data array is less than width*height, an IllegalArgumentException is thrown. The X origin will be width/2 and the Y origin will be height/2.
width - Width of the kernel.
height - Height of the kernel.
data - Kernel data in row major order.
Method Detail


public final int getXOrigin()
Returns the X origin.


public final int getYOrigin()
Returns the Y origin.


public final int getWidth()
Returns the width.


public final int getHeight()
Returns the height.


public final float[] getKernelData(float[] data)
Returns the kernel data in row major order. The data array is returned. If data is null, a new array will be allocated.
data - If non-null, will contain the returned kernel data.


public Object clone()
Clones this object.
clone in class Object

Java Platform 1.2
Beta 4

Submit a bug or feature
Submit comments/suggestions about new javadoc look
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.
This documentation was generated with a post-Beta4 version of Javadoc.