This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


java.awt.image
class Kernel

java.lang.Object extended by java.awt.image.Kernel
All Implemented Interfaces:
Cloneable

public class Kernel
extends Object
implements Cloneable

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.


Constructor Summary
Kernel(int width, int height, float[] data)

          Constructs a Kernel object from an array of floats.
 
Method Summary
 Object

          Clones this object.
 int

          Returns the height of this Kernel.
 float[]
getKernelData(float[] data)

          Returns the kernel data in row major order.
 int

          Returns the width of this Kernel.
 int

          Returns the X origin of this Kernel.
 int

          Returns the Y origin of this Kernel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Kernel

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 is (width-1)/2 and the Y origin is (height-1)/2.

Parameters:
width - width of the kernel
height - height of the kernel
data - kernel data in row major order
Method Detail

clone

public Object clone()
Clones this object.

Overrides:
clone in class Object
Returns:
a clone of this object.

getHeight

public final int getHeight()
Returns the height of this Kernel.

Returns:
the height of this Kernel.

getKernelData

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 is allocated.

Parameters:
data - if non-null, contains the returned kernel data
Returns:
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

getWidth

public final int getWidth()
Returns the width of this Kernel.

Returns:
the width of this Kernel.

getXOrigin

public final int getXOrigin()
Returns the X origin of this Kernel.

Returns:
the X origin.

getYOrigin

public final int getYOrigin()
Returns the Y origin of this Kernel.

Returns:
the Y origin.


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.