public class DisplaceFilter extends TransformFilter
Modifier and Type | Field and Description |
---|---|
private float |
amount |
private int |
dh |
private BufferedImage |
displacementMap |
private int |
dw |
private int[] |
xmap |
private int[] |
ymap |
BILINEAR, CLAMP, edgeAction, interpolation, NEAREST_NEIGHBOUR, originalSpace, RGB_CLAMP, transformedSpace, WRAP, ZERO
Constructor and Description |
---|
DisplaceFilter() |
Modifier and Type | Method and Description |
---|---|
BufferedImage |
filter(BufferedImage src,
BufferedImage dst) |
float |
getAmount()
Get the amount of distortion.
|
BufferedImage |
getDisplacementMap()
Get the displacement map.
|
void |
setAmount(float amount)
Set the amount of distortion.
|
void |
setDisplacementMap(BufferedImage displacementMap)
Set the displacement map.
|
String |
toString() |
protected void |
transformInverse(int x,
int y,
float[] out)
Inverse transform a point.
|
filterPixelsNN, getEdgeAction, getInterpolation, setEdgeAction, setInterpolation, transformSpace
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
private float amount
private BufferedImage displacementMap
private int[] xmap
private int[] ymap
private int dw
private int dh
public DisplaceFilter()
public void setDisplacementMap(BufferedImage displacementMap)
displacementMap
- an image representing the displacment at each pointgetDisplacementMap()
public BufferedImage getDisplacementMap()
setDisplacementMap(java.awt.image.BufferedImage)
public void setAmount(float amount)
amount
- the amountgetAmount()
public float getAmount()
setAmount(float)
public BufferedImage filter(BufferedImage src, BufferedImage dst)
filter
in interface BufferedImageOp
filter
in class TransformFilter
protected void transformInverse(int x, int y, float[] out)
TransformFilter
transformInverse
in class TransformFilter
x
- the X position of the pixel in the output imagey
- the Y position of the pixel in the output imageout
- the position of the pixel in the input imageWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses