Class ConvolveWithEdgeOp
java.lang.Object
com.twelvemonkeys.image.ConvolveWithEdgeOp
- All Implemented Interfaces:
BufferedImageOp, RasterOp
This class implements a convolution from the source
to the destination.
- Version:
- $Id: //depot/branches/personal/haraldk/twelvemonkeys/release-2/twelvemonkeys-core/src/main/java/com/twelvemonkeys/image/ConvolveWithEdgeOp.java#1 $
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ConvolveOpstatic final intAlias forConvolveOp.EDGE_NO_OP.static final intAdds a border to the image while convolving.static final intAdds a border to the image while convolving.static final intAlias forConvolveOp.EDGE_ZERO_FILL.private final intprivate final Kernel -
Constructor Summary
ConstructorsConstructorDescriptionConvolveWithEdgeOp(Kernel pKernel) ConvolveWithEdgeOp(Kernel pKernel, int pEdgeCondition, RenderingHints pHints) -
Method Summary
Modifier and TypeMethodDescriptionprivate BufferedImageaddBorder(BufferedImage pOriginal, int pBorderX, int pBorderY) createCompatibleDestImage(BufferedImage pSource, ColorModel pDesinationColorModel) createCompatibleDestRaster(Raster pSource) filter(BufferedImage pSource, BufferedImage pDestination) filter(Raster pSource, WritableRaster pDestination) getBounds2D(BufferedImage pSource) getBounds2D(Raster pSource) intReturns the edge condition.getPoint2D(Point2D pSourcePoint, Point2D pDestinationPoint)
-
Field Details
-
EDGE_ZERO_FILL
-
EDGE_NO_OP
-
EDGE_REFLECT
public static final int EDGE_REFLECTAdds a border to the image while convolving. The border will reflect the edges of the original image. This is usually a good default. Note that while this mode typically provides better quality than the standard modesEDGE_ZERO_FILLandEDGE_NO_OP, it does so at the expense of higher memory consumption and considerable more computation.- See Also:
-
EDGE_WRAP
public static final int EDGE_WRAPAdds a border to the image while convolving. The border will wrap the edges of the original image. This is usually the best choice for tiles. Note that while this mode typically provides better quality than the standard modesEDGE_ZERO_FILLandEDGE_NO_OP, it does so at the expense of higher memory consumption and considerable more computation.- See Also:
-
kernel
-
edgeCondition
private final int edgeCondition -
convolve
-
-
Constructor Details
-
ConvolveWithEdgeOp
-
ConvolveWithEdgeOp
-
-
Method Details
-
filter
- Specified by:
filterin interfaceBufferedImageOp
-
addBorder
-
getEdgeCondition
public int getEdgeCondition()Returns the edge condition.- Returns:
- the edge condition of this
ConvolveOp. - See Also:
-
filter
-
createCompatibleDestImage
public BufferedImage createCompatibleDestImage(BufferedImage pSource, ColorModel pDesinationColorModel) - Specified by:
createCompatibleDestImagein interfaceBufferedImageOp
-
createCompatibleDestRaster
- Specified by:
createCompatibleDestRasterin interfaceRasterOp
-
getBounds2D
- Specified by:
getBounds2Din interfaceBufferedImageOp
-
getBounds2D
- Specified by:
getBounds2Din interfaceRasterOp
-
getPoint2D
- Specified by:
getPoint2Din interfaceBufferedImageOp- Specified by:
getPoint2Din interfaceRasterOp
-
getRenderingHints
- Specified by:
getRenderingHintsin interfaceBufferedImageOp- Specified by:
getRenderingHintsin interfaceRasterOp
-
getKernel
-