Package com.jhlabs.image
Class DisplaceFilter
java.lang.Object
com.jhlabs.image.AbstractBufferedImageOp
com.jhlabs.image.TransformFilter
com.jhlabs.image.DisplaceFilter
- All Implemented Interfaces:
BufferedImageOp
,Cloneable
A filter which simulates the appearance of looking through glass. A separate grayscale displacement image is provided and
pixels in the source image are displaced according to the gradient of the displacement map.
-
Field Summary
Fields inherited from class com.jhlabs.image.TransformFilter
BILINEAR, CLAMP, edgeAction, interpolation, NEAREST_NEIGHBOUR, originalSpace, transformedSpace, WRAP, ZERO
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfilter
(BufferedImage src, BufferedImage dst) float
void
setAmount
(float amount) void
setDisplacementMap
(BufferedImage displacementMap) toString()
protected void
transformInverse
(int x, int y, float[] out) Methods inherited from class com.jhlabs.image.TransformFilter
filterPixelsNN, getEdgeAction, getInterpolation, setEdgeAction, setInterpolation, transformSpace
Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
-
Constructor Details
-
DisplaceFilter
public DisplaceFilter()
-
-
Method Details
-
setDisplacementMap
-
getDisplacementMap
-
setAmount
public void setAmount(float amount) -
getAmount
public float getAmount() -
filter
- Specified by:
filter
in interfaceBufferedImageOp
- Overrides:
filter
in classTransformFilter
-
transformInverse
protected void transformInverse(int x, int y, float[] out) - Specified by:
transformInverse
in classTransformFilter
-
toString
-