public class MorphologyOp
extends java.lang.Object
implements java.awt.image.BufferedImageOp, java.awt.image.RasterOp
| Constructor and Description |
|---|
MorphologyOp(int radiusX,
int radiusY,
boolean doDilation) |
| Modifier and Type | Method and Description |
|---|---|
java.awt.image.BufferedImage |
createCompatibleDestImage(java.awt.image.BufferedImage src,
java.awt.image.ColorModel destCM) |
java.awt.image.WritableRaster |
createCompatibleDestRaster(java.awt.image.Raster src) |
java.awt.image.BufferedImage |
filter(java.awt.image.BufferedImage src,
java.awt.image.BufferedImage dest)
This implementation of filter does the morphology operation
on a premultiplied alpha image.
|
java.awt.image.WritableRaster |
filter(java.awt.image.Raster src,
java.awt.image.WritableRaster dest)
Filters src and writes result into dest.
|
java.awt.geom.Rectangle2D |
getBounds2D(java.awt.image.BufferedImage src) |
java.awt.geom.Rectangle2D |
getBounds2D(java.awt.image.Raster src) |
java.awt.geom.Point2D |
getPoint2D(java.awt.geom.Point2D srcPt,
java.awt.geom.Point2D destPt) |
java.awt.RenderingHints |
getRenderingHints() |
public MorphologyOp(int radiusX,
int radiusY,
boolean doDilation)
radiusX - defines the radius of filter operation on X-axis. Should not be negative.
A value of zero will disable the effect of the operation on X-axis, as described
in the SVG specification.radiusY - defines the radius of filter operation on Y-axis. Should not be negative.
A value of zero will disable the effect of the operation on Y-axis, as described
in the SVG specification.doDilation - defines whether to do dilation or erosion operation. Will do dilation
when the value is true, erosion when false.public java.awt.geom.Rectangle2D getBounds2D(java.awt.image.Raster src)
getBounds2D in interface java.awt.image.RasterOppublic java.awt.geom.Rectangle2D getBounds2D(java.awt.image.BufferedImage src)
getBounds2D in interface java.awt.image.BufferedImageOppublic java.awt.geom.Point2D getPoint2D(java.awt.geom.Point2D srcPt,
java.awt.geom.Point2D destPt)
getPoint2D in interface java.awt.image.BufferedImageOpgetPoint2D in interface java.awt.image.RasterOppublic java.awt.RenderingHints getRenderingHints()
getRenderingHints in interface java.awt.image.BufferedImageOpgetRenderingHints in interface java.awt.image.RasterOppublic java.awt.image.WritableRaster createCompatibleDestRaster(java.awt.image.Raster src)
createCompatibleDestRaster in interface java.awt.image.RasterOppublic java.awt.image.BufferedImage createCompatibleDestImage(java.awt.image.BufferedImage src,
java.awt.image.ColorModel destCM)
createCompatibleDestImage in interface java.awt.image.BufferedImageOppublic java.awt.image.WritableRaster filter(java.awt.image.Raster src,
java.awt.image.WritableRaster dest)
The filtering kernel(the operation range for each pixel) is a rectangle of width 2*radiusX+1 and height radiusY+1
filter in interface java.awt.image.RasterOpsrc - the Raster to be filtereddest - stores the filtered image. If null, a destination will
be created. src and dest can refer to the same Raster, in
which situation the src will be modified.public java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src,
java.awt.image.BufferedImage dest)
filter in interface java.awt.image.BufferedImageOpCopyright ? 2009 Apache Software Foundation. All Rights Reserved.