| |
|
| java.lang.Object java.awt.image.Kernel
Kernel | public class Kernel implements Cloneable(Code) | | The Kernel class defines a matrix that describes how a
specified pixel and its surrounding pixels affect the value
computed for the pixel's position in the output image of a filtering
operation. The X origin and Y origin indicate the kernel matrix element
that corresponds to the pixel position for which an output value is
being computed.
See Also: ConvolveOp version: 10 Feb 1997 |
Constructor Summary | |
public | Kernel(int width, int height, float data) Constructs a Kernel object from an array of floats. |
Method Summary | |
public Object | clone() Clones this object. | final public int | getHeight() Returns the height of this Kernel . | final public float[] | getKernelData(float[] data) Returns the kernel data in row major order. | final public int | getWidth() Returns the width of this Kernel . | final public int | getXOrigin() Returns the X origin of this Kernel . | final public int | getYOrigin() Returns the Y origin of this Kernel . |
Kernel | public Kernel(int width, int height, float data)(Code) | | 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 is (width-1)/2 and the Y origin is (height-1)/2.
Parameters: width - width of the kernel Parameters: height - height of the kernel Parameters: data - kernel data in row major order throws: IllegalArgumentException - if the length of data is less than the product of width and height |
clone | public Object clone()(Code) | | Clones this object.
a clone of this object. |
getHeight | final public int getHeight()(Code) | | Returns the height of this Kernel .
the height of this Kernel . |
getKernelData | final public float[] getKernelData(float[] data)(Code) | | Returns the kernel data in row major order.
The data array is returned. If data
is null , a new array is allocated.
Parameters: data - if non-null, contains the returned kernel data the data array containing the kernel data in row major order or, if data is null , a newly allocated array containing the kernel data in row major order throws: IllegalArgumentException - if data is lessthan the size of this Kernel |
getWidth | final public int getWidth()(Code) | | Returns the width of this Kernel .
the width of this Kernel . |
getXOrigin | final public int getXOrigin()(Code) | | Returns the X origin of this Kernel .
the X origin. |
getYOrigin | final public int getYOrigin()(Code) | | Returns the Y origin of this Kernel .
the Y origin. |
|
|
|