com.twelvemonkeys.image
Class ConvolveWithEdgeOp

java.lang.Object
  extended by com.twelvemonkeys.image.ConvolveWithEdgeOp
All Implemented Interfaces:
BufferedImageOp, RasterOp

public class ConvolveWithEdgeOp
extends Object
implements 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 $
Author:
Harald Kuhr, last modified by $Author: haku $
See Also:
ConvolveOp

Field Summary
static int EDGE_NO_OP
          Alias for ConvolveOp.EDGE_NO_OP.
static int EDGE_REFLECT
          Adds a border to the image while convolving.
static int EDGE_WRAP
          Adds a border to the image while convolving.
static int EDGE_ZERO_FILL
          Alias for ConvolveOp.EDGE_ZERO_FILL.
 
Constructor Summary
ConvolveWithEdgeOp(Kernel pKernel)
           
ConvolveWithEdgeOp(Kernel pKernel, int pEdgeCondition, RenderingHints pHints)
           
 
Method Summary
 BufferedImage createCompatibleDestImage(BufferedImage pSource, ColorModel pDesinationColorModel)
           
 WritableRaster createCompatibleDestRaster(Raster pSource)
           
 BufferedImage filter(BufferedImage pSource, BufferedImage pDestination)
           
 WritableRaster filter(Raster pSource, WritableRaster pDestination)
           
 Rectangle2D getBounds2D(BufferedImage pSource)
           
 Rectangle2D getBounds2D(Raster pSource)
           
 int getEdgeCondition()
          Returns the edge condition.
 Kernel getKernel()
           
 Point2D getPoint2D(Point2D pSourcePoint, Point2D pDestinationPoint)
           
 RenderingHints getRenderingHints()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EDGE_ZERO_FILL

public static final int EDGE_ZERO_FILL
Alias for ConvolveOp.EDGE_ZERO_FILL.

See Also:
EDGE_REFLECT, Constant Field Values

EDGE_NO_OP

public static final int EDGE_NO_OP
Alias for ConvolveOp.EDGE_NO_OP.

See Also:
EDGE_REFLECT, Constant Field Values

EDGE_REFLECT

public static final int EDGE_REFLECT
Adds 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 modes EDGE_ZERO_FILL and EDGE_NO_OP, it does so at the expense of higher memory consumption and considerable more computation.

See Also:
Constant Field Values

EDGE_WRAP

public static final int EDGE_WRAP
Adds 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 modes EDGE_ZERO_FILL and EDGE_NO_OP, it does so at the expense of higher memory consumption and considerable more computation.

See Also:
EDGE_REFLECT, Constant Field Values
Constructor Detail

ConvolveWithEdgeOp

public ConvolveWithEdgeOp(Kernel pKernel,
                          int pEdgeCondition,
                          RenderingHints pHints)

ConvolveWithEdgeOp

public ConvolveWithEdgeOp(Kernel pKernel)
Method Detail

filter

public BufferedImage filter(BufferedImage pSource,
                            BufferedImage pDestination)
Specified by:
filter in interface BufferedImageOp

getEdgeCondition

public int getEdgeCondition()
Returns the edge condition.

Returns:
the edge condition of this ConvolveOp.
See Also:
EDGE_NO_OP, EDGE_ZERO_FILL, EDGE_REFLECT, EDGE_WRAP

filter

public WritableRaster filter(Raster pSource,
                             WritableRaster pDestination)
Specified by:
filter in interface RasterOp

createCompatibleDestImage

public BufferedImage createCompatibleDestImage(BufferedImage pSource,
                                               ColorModel pDesinationColorModel)
Specified by:
createCompatibleDestImage in interface BufferedImageOp

createCompatibleDestRaster

public WritableRaster createCompatibleDestRaster(Raster pSource)
Specified by:
createCompatibleDestRaster in interface RasterOp

getBounds2D

public Rectangle2D getBounds2D(BufferedImage pSource)
Specified by:
getBounds2D in interface BufferedImageOp

getBounds2D

public Rectangle2D getBounds2D(Raster pSource)
Specified by:
getBounds2D in interface RasterOp

getPoint2D

public Point2D getPoint2D(Point2D pSourcePoint,
                          Point2D pDestinationPoint)
Specified by:
getPoint2D in interface BufferedImageOp
Specified by:
getPoint2D in interface RasterOp

getRenderingHints

public RenderingHints getRenderingHints()
Specified by:
getRenderingHints in interface BufferedImageOp
Specified by:
getRenderingHints in interface RasterOp

getKernel

public Kernel getKernel()


Copyright © 2015. All Rights Reserved.