Package com.twelvemonkeys.image
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 ConvolveOp
static final int
Alias forConvolveOp.EDGE_NO_OP
.static final int
Adds a border to the image while convolving.static final int
Adds a border to the image while convolving.static final int
Alias forConvolveOp.EDGE_ZERO_FILL
.private final int
private final Kernel
-
Constructor Summary
ConstructorsConstructorDescriptionConvolveWithEdgeOp
(Kernel pKernel) ConvolveWithEdgeOp
(Kernel pKernel, int pEdgeCondition, RenderingHints pHints) -
Method Summary
Modifier and TypeMethodDescriptionprivate BufferedImage
addBorder
(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) int
Returns the edge condition.getPoint2D
(Point2D pSourcePoint, Point2D pDestinationPoint)
-
Field Details
-
EDGE_ZERO_FILL
public static final int EDGE_ZERO_FILLAlias forConvolveOp.EDGE_ZERO_FILL
.- See Also:
-
EDGE_NO_OP
public static final int EDGE_NO_OPAlias forConvolveOp.EDGE_NO_OP
.- See Also:
-
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_FILL
andEDGE_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_FILL
andEDGE_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:
filter
in 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:
createCompatibleDestImage
in interfaceBufferedImageOp
-
createCompatibleDestRaster
- Specified by:
createCompatibleDestRaster
in interfaceRasterOp
-
getBounds2D
- Specified by:
getBounds2D
in interfaceBufferedImageOp
-
getBounds2D
- Specified by:
getBounds2D
in interfaceRasterOp
-
getPoint2D
- Specified by:
getPoint2D
in interfaceBufferedImageOp
- Specified by:
getPoint2D
in interfaceRasterOp
-
getRenderingHints
- Specified by:
getRenderingHints
in interfaceBufferedImageOp
- Specified by:
getRenderingHints
in interfaceRasterOp
-
getKernel
-