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:
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
FieldsModifier and TypeFieldDescription(package private) float
(package private) PadMode
(package private) Kernel
(package private) boolean
(package private) float[]
(package private) boolean
(package private) Point
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
Fields inherited from interface java.awt.image.renderable.RenderableImage
HINTS_OBSERVED
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
double
getBias()
Returns the shift value to apply to the result of convolutionReturns the current edge handling mode.Returns the Convolution Kernel in usedouble[]
Returns the [x,y] distance in user space between kernel valuesboolean
Returns false if the convolution should affect the Alpha channelReturns the source to be ConvolvedReturns the target point of the kernel (what pixel under the kernel should be set to the result of convolution).void
setBias
(double bias) Returns the shift value to apply to the result of convolutionvoid
setEdgeMode
(PadMode edgeMode) Sets the current edge handling mode.void
Sets the Convolution Kernel to use.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.void
setPreserveAlpha
(boolean preserveAlpha) Sets Alpha channel handling.void
Sets the source to be Convolvedvoid
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
Methods inherited from interface java.awt.image.renderable.RenderableImage
createDefaultRendering, createScaledRendering, getHeight, getMinX, getMinY, getProperty, getPropertyNames, getSources, getWidth, isDynamic
-
Field Details
-
Constructor Details
-
ConvolveMatrixRable8Bit
-
-
Method Details
-
getSource
Description copied from interface:ConvolveMatrixRable
Returns the source to be Convolved- Specified by:
getSource
in interfaceConvolveMatrixRable
-
setSource
Description copied from interface:ConvolveMatrixRable
Sets the source to be Convolved- Specified by:
setSource
in interfaceConvolveMatrixRable
- Parameters:
src
- image to Convolved.
-
getKernel
Returns the Convolution Kernel in use- Specified by:
getKernel
in interfaceConvolveMatrixRable
-
setKernel
Sets the Convolution Kernel to use.- Specified by:
setKernel
in interfaceConvolveMatrixRable
- Parameters:
k
- Kernel to use for convolution.
-
getTarget
Description copied from interface:ConvolveMatrixRable
Returns the target point of the kernel (what pixel under the kernel should be set to the result of convolution).- Specified by:
getTarget
in interfaceConvolveMatrixRable
-
setTarget
Description copied from interface:ConvolveMatrixRable
Sets the target point of the kernel (what pixel under the kernel should be set to the result of the convolution).- Specified by:
setTarget
in interfaceConvolveMatrixRable
-
getBias
public double getBias()Returns the shift value to apply to the result of convolution- Specified by:
getBias
in interfaceConvolveMatrixRable
-
setBias
public void setBias(double bias) Returns the shift value to apply to the result of convolution- Specified by:
setBias
in interfaceConvolveMatrixRable
-
getEdgeMode
Returns the current edge handling mode.- Specified by:
getEdgeMode
in interfaceConvolveMatrixRable
-
setEdgeMode
Sets the current edge handling mode.- Specified by:
setEdgeMode
in interfaceConvolveMatrixRable
-
getKernelUnitLength
public double[] getKernelUnitLength()Returns the [x,y] distance in user space between kernel values- Specified by:
getKernelUnitLength
in 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:
setKernelUnitLength
in interfaceConvolveMatrixRable
-
getPreserveAlpha
public boolean getPreserveAlpha()Returns false if the convolution should affect the Alpha channel- Specified by:
getPreserveAlpha
in 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:
setPreserveAlpha
in interfaceConvolveMatrixRable
-
fixAlpha
-
fixAlpha_INT_PACK
-
fixAlpha_FALLBACK
-
createRendering
- Specified by:
createRendering
in interfaceRenderableImage
-