|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.alee.graphics.filters.AbstractBufferedImageOp com.alee.graphics.filters.ConvolveFilter
public class ConvolveFilter
A filter which applies a convolution kernel to an image.
Field Summary | |
---|---|
boolean |
alpha
|
static int |
CLAMP_EDGES
|
protected java.awt.image.Kernel |
kernel
|
static int |
WRAP_EDGES
|
static int |
ZERO_EDGES
|
Constructor Summary | |
---|---|
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(java.awt.image.Kernel kernel)
Construct a filter with the given 3x3 kernel. |
Method Summary | |
---|---|
static void |
convolve(java.awt.image.Kernel kernel,
int[] inPixels,
int[] outPixels,
int width,
int height,
boolean alpha,
int edgeAction)
|
static void |
convolve(java.awt.image.Kernel kernel,
int[] inPixels,
int[] outPixels,
int width,
int height,
int edgeAction)
|
static void |
convolveH(java.awt.image.Kernel kernel,
int[] inPixels,
int[] outPixels,
int width,
int height,
boolean alpha,
int edgeAction)
Convolve with a kernel consisting of one row |
static void |
convolveHV(java.awt.image.Kernel kernel,
int[] inPixels,
int[] outPixels,
int width,
int height,
boolean alpha,
int edgeAction)
Convolve with a 2D kernel |
static void |
convolveV(java.awt.image.Kernel kernel,
int[] inPixels,
int[] outPixels,
int width,
int height,
boolean alpha,
int edgeAction)
Convolve with a kernel consisting of one column |
java.awt.image.BufferedImage |
createCompatibleDestImage(java.awt.image.BufferedImage src,
java.awt.image.ColorModel dstCM)
|
java.awt.image.BufferedImage |
filter(java.awt.image.BufferedImage src,
java.awt.image.BufferedImage dst)
|
java.awt.geom.Rectangle2D |
getBounds2D(java.awt.image.BufferedImage src)
|
int |
getEdgeAction()
|
java.awt.image.Kernel |
getKernel()
|
java.awt.geom.Point2D |
getPoint2D(java.awt.geom.Point2D srcPt,
java.awt.geom.Point2D dstPt)
|
java.awt.RenderingHints |
getRenderingHints()
|
void |
setEdgeAction(int edgeAction)
|
void |
setKernel(java.awt.image.Kernel kernel)
|
Methods inherited from class com.alee.graphics.filters.AbstractBufferedImageOp |
---|
getRGB, setRGB |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int ZERO_EDGES
public static int CLAMP_EDGES
public static int WRAP_EDGES
protected java.awt.image.Kernel kernel
public boolean alpha
Constructor Detail |
---|
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(java.awt.image.Kernel kernel)
Method Detail |
---|
public void setKernel(java.awt.image.Kernel kernel)
public java.awt.image.Kernel getKernel()
public void setEdgeAction(int edgeAction)
public int getEdgeAction()
public java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)
public java.awt.image.BufferedImage createCompatibleDestImage(java.awt.image.BufferedImage src, java.awt.image.ColorModel dstCM)
createCompatibleDestImage
in interface java.awt.image.BufferedImageOp
createCompatibleDestImage
in class AbstractBufferedImageOp
public java.awt.geom.Rectangle2D getBounds2D(java.awt.image.BufferedImage src)
getBounds2D
in interface java.awt.image.BufferedImageOp
getBounds2D
in class AbstractBufferedImageOp
public java.awt.geom.Point2D getPoint2D(java.awt.geom.Point2D srcPt, java.awt.geom.Point2D dstPt)
getPoint2D
in interface java.awt.image.BufferedImageOp
getPoint2D
in class AbstractBufferedImageOp
public java.awt.RenderingHints getRenderingHints()
getRenderingHints
in interface java.awt.image.BufferedImageOp
getRenderingHints
in class AbstractBufferedImageOp
public static void convolve(java.awt.image.Kernel kernel, int[] inPixels, int[] outPixels, int width, int height, int edgeAction)
public static void convolve(java.awt.image.Kernel kernel, int[] inPixels, int[] outPixels, int width, int height, boolean alpha, int edgeAction)
public static void convolveHV(java.awt.image.Kernel kernel, int[] inPixels, int[] outPixels, int width, int height, boolean alpha, int edgeAction)
public static void convolveH(java.awt.image.Kernel kernel, int[] inPixels, int[] outPixels, int width, int height, boolean alpha, int edgeAction)
public static void convolveV(java.awt.image.Kernel kernel, int[] inPixels, int[] outPixels, int width, int height, boolean alpha, int edgeAction)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |