public class ConvolveFilter extends WholeImageFilter
| Modifier and Type | Field and Description |
|---|---|
boolean |
alpha |
protected Kernel |
kernel |
canFilterIndexColorModel, defaultRGBModel, inBytePixels, inPixels, originalSpace, transformedSpace| Constructor and Description |
|---|
ConvolveFilter()
Construct a filter with a null kernel.
|
ConvolveFilter(float[] matrix)
Construct a filter with the given 3x3 kernel.
|
ConvolveFilter(int rows,
int cols,
float[] matrix)
Construct a filter with the given kernel.
|
ConvolveFilter(Kernel kernel)
Construct a filter with the given 3x3 kernel.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
convolve(Kernel kernel,
int[] inPixels,
int[] outPixels,
int width,
int height) |
static void |
convolve(Kernel kernel,
int[] inPixels,
int[] outPixels,
int width,
int height,
boolean alpha) |
static void |
convolveH(Kernel kernel,
int[] inPixels,
int[] outPixels,
int width,
int height,
boolean alpha)
Convolve with a kernel consisting of one row
|
static void |
convolveHV(Kernel kernel,
int[] inPixels,
int[] outPixels,
int width,
int height,
boolean alpha)
Convolve with a 2D kernel
|
static void |
convolveV(Kernel kernel,
int[] inPixels,
int[] outPixels,
int width,
int height,
boolean alpha)
Convolve with a kernel consisting of one column
|
Kernel |
getKernel() |
void |
imageComplete(int status) |
void |
setKernel(Kernel kernel) |
java.lang.String |
toString() |
getTransformedSpace, setColorModel, setDimensions, setPixels, setPixels, transformSpaceprotected Kernel kernel
public boolean alpha
public ConvolveFilter()
public ConvolveFilter(float[] matrix)
matrix - an array of 9 floats containing the kernelpublic ConvolveFilter(int rows,
int cols,
float[] matrix)
rows - the number of rows in the kernelcols - the number of columns in the kernelmatrix - an array of rows*cols floats containing the kernelpublic ConvolveFilter(Kernel kernel)
kernel - an array of 9 floats containing the kernelpublic static void convolve(Kernel kernel, int[] inPixels, int[] outPixels, int width, int height)
public static void convolve(Kernel kernel, int[] inPixels, int[] outPixels, int width, int height, boolean alpha)
public static void convolveH(Kernel kernel, int[] inPixels, int[] outPixels, int width, int height, boolean alpha)
public static void convolveHV(Kernel kernel, int[] inPixels, int[] outPixels, int width, int height, boolean alpha)
public static void convolveV(Kernel kernel, int[] inPixels, int[] outPixels, int width, int height, boolean alpha)
public Kernel getKernel()
public void imageComplete(int status)
imageComplete in interface java.awt.image.ImageConsumerimageComplete in class java.awt.image.ImageFilterpublic void setKernel(Kernel kernel)
public java.lang.String toString()
toString in class java.lang.Object