com.jhlabs.image

Class PolarFilter

Implemented Interfaces:
BufferedImageOp, Cloneable

public class PolarFilter
extends TransformFilter

A filter which distorts and image by performing coordinate conversions between rectangular and polar coordinates.

Field Summary

static int
INVERT_IN_CIRCLE
Invert the image in a circle.
static int
POLAR_TO_RECT
Convert from polar to rectangular coordinates.
static int
RECT_TO_POLAR
Convert from rectangular to polar coordinates.

Fields inherited from class com.jhlabs.image.TransformFilter

BILINEAR, CLAMP, NEAREST_NEIGHBOUR, RGB_CLAMP, WRAP, ZERO, edgeAction, interpolation, originalSpace, transformedSpace

Constructor Summary

PolarFilter()
Construct a PolarFilter.
PolarFilter(int type)
Construct a PolarFilter.

Method Summary

BufferedImage
filter(BufferedImage src, BufferedImage dst)
int
getType()
Get the distortion type.
void
setType(int type)
Set the distortion type.
String
toString()
protected void
transformInverse(int x, int y, float[] out)

Methods inherited from class com.jhlabs.image.TransformFilter

filter, filterPixelsNN, getEdgeAction, getInterpolation, setEdgeAction, setInterpolation, transformInverse, transformSpace

Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp

clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRGB, getRenderingHints, setRGB

Field Details

INVERT_IN_CIRCLE

public static final int INVERT_IN_CIRCLE
Invert the image in a circle.
Field Value:
2

POLAR_TO_RECT

public static final int POLAR_TO_RECT
Convert from polar to rectangular coordinates.
Field Value:
1

RECT_TO_POLAR

public static final int RECT_TO_POLAR
Convert from rectangular to polar coordinates.
Field Value:
0

Constructor Details

PolarFilter

public PolarFilter()
Construct a PolarFilter.

PolarFilter

public PolarFilter(int type)
Construct a PolarFilter.
Parameters:
type - the distortion type

Method Details

filter

public BufferedImage filter(BufferedImage src,
                            BufferedImage dst)
Overrides:
filter in interface TransformFilter

getType

public int getType()
Get the distortion type.
Returns:
the distortion type

setType

public void setType(int type)
Set the distortion type.
Parameters:
type - the distortion type

toString

public String toString()

transformInverse

protected void transformInverse(int x,
                                int y,
                                float[] out)
Overrides:
transformInverse in interface TransformFilter