Class GaussianBlurRed8Bit
- java.lang.Object
-
- org.apache.batik.ext.awt.image.rendered.AbstractRed
-
- org.apache.batik.ext.awt.image.rendered.GaussianBlurRed8Bit
-
- All Implemented Interfaces:
java.awt.image.RenderedImage,CachableRed
public class GaussianBlurRed8Bit extends AbstractRed
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
Fields Modifier and Type Field Description (package private) java.awt.image.ConvolveOp[]convOp(package private) static floatDSQRT2PIConstant: 3*sqrt(2*PI)/4(package private) intdX(package private) intdY(package private) java.awt.RenderingHintshints(package private) static floatprecisionConstant: precision used in computation of the Kernel radius(package private) static floatSQRT2PIConstant: sqrt(2*PI)(package private) doublestdDevX(package private) doublestdDevY(package private) intxinset(package private) intyinset-
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
Constructors Constructor Description GaussianBlurRed8Bit(CachableRed src, double stdDevX, double stdDevY, java.awt.RenderingHints rh)Construct a blurred version ofsrc, by blurring with a gaussian kernel with standard Deviation ofstdDevpixels.GaussianBlurRed8Bit(CachableRed src, double stdDev, java.awt.RenderingHints rh)Construct a blurred version ofsrc, by blurring with a gaussian kernel with standard Deviation ofstdDevpixels.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.awt.image.WritableRasterboxFilterH(java.awt.image.Raster src, java.awt.image.WritableRaster dest, int skipX, int skipY, int boxSz, int loc)private java.awt.image.WritableRasterboxFilterV(java.awt.image.Raster src, java.awt.image.WritableRaster dest, int skipX, int skipY, int boxSz, int loc)private float[]computeQualityKernelData(int len, double stdDev)java.awt.image.WritableRastercopyData(java.awt.image.WritableRaster wr)protected static java.awt.image.ColorModelfixColorModel(CachableRed src)private java.awt.image.KernelmakeQualityKernelX(int len)private java.awt.image.KernelmakeQualityKernelY(int len)static intsurroundPixels(double stdDev)Calculate the number of surround pixels required for a given standard Deviation.static intsurroundPixels(double stdDev, java.awt.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 Detail
-
xinset
int xinset
-
yinset
int yinset
-
stdDevX
double stdDevX
-
stdDevY
double stdDevY
-
hints
java.awt.RenderingHints hints
-
convOp
java.awt.image.ConvolveOp[] convOp
-
dX
int dX
-
dY
int dY
-
SQRT2PI
static final float SQRT2PI
Constant: sqrt(2*PI)
-
DSQRT2PI
static final float DSQRT2PI
Constant: 3*sqrt(2*PI)/4
-
precision
static final float precision
Constant: precision used in computation of the Kernel radius- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GaussianBlurRed8Bit
public GaussianBlurRed8Bit(CachableRed src, double stdDev, java.awt.RenderingHints rh)
Construct a blurred version ofsrc, by blurring with a gaussian kernel with standard Deviation ofstdDevpixels.- Parameters:
src- The source image to blurstdDev- The Standard Deviation of the Gaussian kernel.rh- Rendering hints.
-
GaussianBlurRed8Bit
public GaussianBlurRed8Bit(CachableRed src, double stdDevX, double stdDevY, java.awt.RenderingHints rh)
Construct a blurred version ofsrc, by blurring with a gaussian kernel with standard Deviation ofstdDevpixels.- 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 Detail
-
surroundPixels
public static int surroundPixels(double stdDev)
Calculate the number of surround pixels required for a given standard Deviation.
-
surroundPixels
public static int surroundPixels(double stdDev, java.awt.RenderingHints hints)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
private java.awt.image.Kernel makeQualityKernelX(int len)
-
makeQualityKernelY
private java.awt.image.Kernel makeQualityKernelY(int len)
-
copyData
public java.awt.image.WritableRaster copyData(java.awt.image.WritableRaster wr)
-
boxFilterH
private java.awt.image.WritableRaster boxFilterH(java.awt.image.Raster src, java.awt.image.WritableRaster dest, int skipX, int skipY, int boxSz, int loc)
-
boxFilterV
private java.awt.image.WritableRaster boxFilterV(java.awt.image.Raster src, java.awt.image.WritableRaster dest, int skipX, int skipY, int boxSz, int loc)
-
fixColorModel
protected static java.awt.image.ColorModel fixColorModel(CachableRed src)
-
-