Class ConvolveMatrixRable8Bit
- java.lang.Object
-
- org.apache.batik.ext.awt.image.renderable.AbstractRable
-
- org.apache.batik.ext.awt.image.renderable.AbstractColorInterpolationRable
-
- org.apache.batik.ext.awt.image.renderable.ConvolveMatrixRable8Bit
-
- All Implemented Interfaces:
java.awt.image.renderable.RenderableImage,ConvolveMatrixRable,Filter,FilterColorInterpolation
public class ConvolveMatrixRable8Bit extends AbstractColorInterpolationRable implements ConvolveMatrixRable
Convolves an image with a convolution matrix. Known limitations: Does not support bias other than zero - pending 16bit pathway Does not support edgeMode="wrap" - pending Tile code.- Version:
- $Id: ConvolveMatrixRable8Bit.java 1804130 2017-08-04 14:41:11Z ssteiner $
-
-
Field Summary
Fields Modifier and Type Field Description (package private) floatbias(package private) PadModeedgeMode(package private) java.awt.image.Kernelkernel(package private) booleankernelHasNegValues(package private) float[]kernelUnitLength(package private) booleanpreserveAlpha(package private) java.awt.Pointtarget-
Fields inherited from class org.apache.batik.ext.awt.image.renderable.AbstractColorInterpolationRable
csLinear
-
Fields inherited from class org.apache.batik.ext.awt.image.renderable.AbstractRable
props, srcs, stamp
-
-
Constructor Summary
Constructors Constructor Description ConvolveMatrixRable8Bit(Filter source)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.image.RenderedImagecreateRendering(java.awt.image.renderable.RenderContext rc)voidfixAlpha(java.awt.image.BufferedImage bi)voidfixAlpha_FALLBACK(java.awt.image.WritableRaster wr)voidfixAlpha_INT_PACK(java.awt.image.WritableRaster wr)doublegetBias()Returns the shift value to apply to the result of convolutionPadModegetEdgeMode()Returns the current edge handling mode.java.awt.image.KernelgetKernel()Returns the Convolution Kernel in usedouble[]getKernelUnitLength()Returns the [x,y] distance in user space between kernel valuesbooleangetPreserveAlpha()Returns false if the convolution should affect the Alpha channelFiltergetSource()Returns the source to be Convolvedjava.awt.PointgetTarget()Returns the target point of the kernel (what pixel under the kernel should be set to the result of convolution).voidsetBias(double bias)Returns the shift value to apply to the result of convolutionvoidsetEdgeMode(PadMode edgeMode)Sets the current edge handling mode.voidsetKernel(java.awt.image.Kernel k)Sets the Convolution Kernel to use.voidsetKernelUnitLength(double[] kernelUnitLength)Sets the [x,y] distance in user space between kernel values If set to zero then device space will be used.voidsetPreserveAlpha(boolean preserveAlpha)Sets Alpha channel handling.voidsetSource(Filter src)Sets the source to be ConvolvedvoidsetTarget(java.awt.Point pt)Sets the target point of the kernel (what pixel under the kernel should be set to the result of the convolution).-
Methods inherited from class org.apache.batik.ext.awt.image.renderable.AbstractColorInterpolationRable
convertSourceCS, convertSourceCS, getOperationColorSpace, isColorSpaceLinear, setColorSpaceLinear
-
Methods inherited from class org.apache.batik.ext.awt.image.renderable.AbstractRable
createDefaultRendering, createScaledRendering, getBounds2D, getDependencyRegion, getDirtyRegion, getHeight, getMinX, getMinY, getProperty, getPropertyNames, getSources, getTimeStamp, getWidth, init, init, init, init, isDynamic, touch
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.batik.ext.awt.image.renderable.Filter
getBounds2D, getDependencyRegion, getDirtyRegion, getTimeStamp
-
Methods inherited from interface org.apache.batik.ext.awt.image.renderable.FilterColorInterpolation
getOperationColorSpace, isColorSpaceLinear, setColorSpaceLinear
-
-
-
-
Field Detail
-
kernel
java.awt.image.Kernel kernel
-
target
java.awt.Point target
-
bias
float bias
-
kernelHasNegValues
boolean kernelHasNegValues
-
edgeMode
PadMode edgeMode
-
kernelUnitLength
float[] kernelUnitLength
-
preserveAlpha
boolean preserveAlpha
-
-
Constructor Detail
-
ConvolveMatrixRable8Bit
public ConvolveMatrixRable8Bit(Filter source)
-
-
Method Detail
-
getSource
public Filter getSource()
Description copied from interface:ConvolveMatrixRableReturns the source to be Convolved- Specified by:
getSourcein interfaceConvolveMatrixRable
-
setSource
public void setSource(Filter src)
Description copied from interface:ConvolveMatrixRableSets the source to be Convolved- Specified by:
setSourcein interfaceConvolveMatrixRable- Parameters:
src- image to Convolved.
-
getKernel
public java.awt.image.Kernel getKernel()
Returns the Convolution Kernel in use- Specified by:
getKernelin interfaceConvolveMatrixRable
-
setKernel
public void setKernel(java.awt.image.Kernel k)
Sets the Convolution Kernel to use.- Specified by:
setKernelin interfaceConvolveMatrixRable- Parameters:
k- Kernel to use for convolution.
-
getTarget
public java.awt.Point getTarget()
Description copied from interface:ConvolveMatrixRableReturns the target point of the kernel (what pixel under the kernel should be set to the result of convolution).- Specified by:
getTargetin interfaceConvolveMatrixRable
-
setTarget
public void setTarget(java.awt.Point pt)
Description copied from interface:ConvolveMatrixRableSets the target point of the kernel (what pixel under the kernel should be set to the result of the convolution).- Specified by:
setTargetin interfaceConvolveMatrixRable
-
getBias
public double getBias()
Returns the shift value to apply to the result of convolution- Specified by:
getBiasin interfaceConvolveMatrixRable
-
setBias
public void setBias(double bias)
Returns the shift value to apply to the result of convolution- Specified by:
setBiasin interfaceConvolveMatrixRable
-
getEdgeMode
public PadMode getEdgeMode()
Returns the current edge handling mode.- Specified by:
getEdgeModein interfaceConvolveMatrixRable
-
setEdgeMode
public void setEdgeMode(PadMode edgeMode)
Sets the current edge handling mode.- Specified by:
setEdgeModein interfaceConvolveMatrixRable
-
getKernelUnitLength
public double[] getKernelUnitLength()
Returns the [x,y] distance in user space between kernel values- Specified by:
getKernelUnitLengthin interfaceConvolveMatrixRable
-
setKernelUnitLength
public void setKernelUnitLength(double[] kernelUnitLength)
Sets the [x,y] distance in user space between kernel values If set to zero then device space will be used.- Specified by:
setKernelUnitLengthin interfaceConvolveMatrixRable
-
getPreserveAlpha
public boolean getPreserveAlpha()
Returns false if the convolution should affect the Alpha channel- Specified by:
getPreserveAlphain interfaceConvolveMatrixRable
-
setPreserveAlpha
public void setPreserveAlpha(boolean preserveAlpha)
Sets Alpha channel handling. A value of False indicates that the convolution should apply to the Alpha Channel- Specified by:
setPreserveAlphain interfaceConvolveMatrixRable
-
fixAlpha
public void fixAlpha(java.awt.image.BufferedImage bi)
-
fixAlpha_INT_PACK
public void fixAlpha_INT_PACK(java.awt.image.WritableRaster wr)
-
fixAlpha_FALLBACK
public void fixAlpha_FALLBACK(java.awt.image.WritableRaster wr)
-
createRendering
public java.awt.image.RenderedImage createRendering(java.awt.image.renderable.RenderContext rc)
- Specified by:
createRenderingin interfacejava.awt.image.renderable.RenderableImage
-
-