Class GaussianBlurRed8Bit
java.lang.Object
org.apache.batik.ext.awt.image.rendered.AbstractRed
org.apache.batik.ext.awt.image.rendered.GaussianBlurRed8Bit
- All Implemented Interfaces:
RenderedImage
,CachableRed
This implementation of RenderableImage will render its input
GraphicsNode on demand for tiles.
- Version:
- $Id: GaussianBlurRed8Bit.java 1733416 2016-03-03 07:07:13Z gadams $
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) ConvolveOp[]
(package private) static final float
Constant: 3*sqrt(2*PI)/4(package private) int
(package private) int
(package private) RenderingHints
(package private) static final float
Constant: precision used in computation of the Kernel radius(package private) static final float
Constant: sqrt(2*PI)(package private) double
(package private) double
(package private) int
(package private) int
Fields inherited from class org.apache.batik.ext.awt.image.rendered.AbstractRed
bounds, cm, minTileX, minTileY, numXTiles, numYTiles, props, sm, srcs, tileGridXOff, tileGridYOff, tileHeight, tileWidth
-
Constructor Summary
ConstructorsConstructorDescriptionGaussianBlurRed8Bit
(CachableRed src, double stdDevX, double stdDevY, RenderingHints rh) Construct a blurred version ofsrc
, by blurring with a gaussian kernel with standard Deviation ofstdDev
pixels.GaussianBlurRed8Bit
(CachableRed src, double stdDev, RenderingHints rh) Construct a blurred version ofsrc
, by blurring with a gaussian kernel with standard Deviation ofstdDev
pixels. -
Method Summary
Modifier and TypeMethodDescriptionprivate WritableRaster
boxFilterH
(Raster src, WritableRaster dest, int skipX, int skipY, int boxSz, int loc) private WritableRaster
boxFilterV
(Raster src, WritableRaster dest, int skipX, int skipY, int boxSz, int loc) private float[]
computeQualityKernelData
(int len, double stdDev) protected static ColorModel
fixColorModel
(CachableRed src) private Kernel
makeQualityKernelX
(int len) private Kernel
makeQualityKernelY
(int len) static int
surroundPixels
(double stdDev) Calculate the number of surround pixels required for a given standard Deviation.static int
surroundPixels
(double stdDev, RenderingHints hints) Calculate the number of surround pixels required for a given standard Deviation.Methods inherited from class org.apache.batik.ext.awt.image.rendered.AbstractRed
copyBand, copyToRaster, getBounds, getColorModel, getData, getData, getDependencyRegion, getDirtyRegion, getHeight, getMinTileX, getMinTileY, getMinX, getMinY, getNumXTiles, getNumYTiles, getProperty, getPropertyNames, getSampleModel, getSources, getTile, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, getWidth, getXTile, getYTile, init, init, makeTile, updateTileGridInfo
-
Field Details
-
xinset
int xinset -
yinset
int yinset -
stdDevX
double stdDevX -
stdDevY
double stdDevY -
hints
RenderingHints hints -
convOp
ConvolveOp[] convOp -
dX
int dX -
dY
int dY -
SQRT2PI
static final float SQRT2PIConstant: sqrt(2*PI) -
DSQRT2PI
static final float DSQRT2PIConstant: 3*sqrt(2*PI)/4 -
precision
static final float precisionConstant: precision used in computation of the Kernel radius- See Also:
-
-
Constructor Details
-
GaussianBlurRed8Bit
Construct a blurred version ofsrc
, by blurring with a gaussian kernel with standard Deviation ofstdDev
pixels.- Parameters:
src
- The source image to blurstdDev
- The Standard Deviation of the Gaussian kernel.rh
- Rendering hints.
-
GaussianBlurRed8Bit
Construct a blurred version ofsrc
, by blurring with a gaussian kernel with standard Deviation ofstdDev
pixels.- Parameters:
src
- The source image to blurstdDevX
- The Standard Deviation of the Gaussian kernel in XstdDevY
- The Standard Deviation of the Gaussian kernel in Yrh
- Rendering hints.
-
-
Method Details
-
surroundPixels
public static int surroundPixels(double stdDev) Calculate the number of surround pixels required for a given standard Deviation. -
surroundPixels
Calculate the number of surround pixels required for a given standard Deviation. Also takes into account rendering quality hint. -
computeQualityKernelData
private float[] computeQualityKernelData(int len, double stdDev) -
makeQualityKernelX
-
makeQualityKernelY
-
copyData
-
boxFilterH
private WritableRaster boxFilterH(Raster src, WritableRaster dest, int skipX, int skipY, int boxSz, int loc) -
boxFilterV
private WritableRaster boxFilterV(Raster src, WritableRaster dest, int skipX, int skipY, int boxSz, int loc) -
fixColorModel
-