com.jhlabs.image
Class PolarFilter

java.lang.Object
  extended by com.jhlabs.image.AbstractBufferedImageOp
      extended by com.jhlabs.image.TransformFilter
          extended by com.jhlabs.image.PolarFilter
All Implemented Interfaces:
java.awt.image.BufferedImageOp, java.lang.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, edgeAction, interpolation, NEAREST_NEIGHBOUR, originalSpace, transformedSpace, WRAP, ZERO
 
Constructor Summary
PolarFilter()
          Construct a PolarFilter.
PolarFilter(int type)
          Construct a PolarFilter.
 
Method Summary
 java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)
           
 int getType()
          Get the distortion type.
 void setType(int type)
          Set the distortion type.
 java.lang.String toString()
           
protected  void transformInverse(int x, int y, float[] out)
          Inverse transform a point.
 
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
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RECT_TO_POLAR

public static final int RECT_TO_POLAR
Convert from rectangular to polar coordinates.

See Also:
Constant Field Values

POLAR_TO_RECT

public static final int POLAR_TO_RECT
Convert from polar to rectangular coordinates.

See Also:
Constant Field Values

INVERT_IN_CIRCLE

public static final int INVERT_IN_CIRCLE
Invert the image in a circle.

See Also:
Constant Field Values
Constructor Detail

PolarFilter

public PolarFilter()
Construct a PolarFilter.


PolarFilter

public PolarFilter(int type)
Construct a PolarFilter.

Parameters:
type - the distortion type
Method Detail

filter

public java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src,
                                           java.awt.image.BufferedImage dst)
Specified by:
filter in interface java.awt.image.BufferedImageOp
Overrides:
filter in class TransformFilter

setType

public void setType(int type)
Set the distortion type.

Parameters:
type - the distortion type
See Also:
getType()

getType

public int getType()
Get the distortion type.

Returns:
the distortion type
See Also:
setType(int)

transformInverse

protected void transformInverse(int x,
                                int y,
                                float[] out)
Description copied from class: TransformFilter
Inverse transform a point. This method needs to be overriden by all subclasses.

Specified by:
transformInverse in class TransformFilter
Parameters:
x - the X position of the pixel in the output image
y - the Y position of the pixel in the output image
out - the position of the pixel in the input image

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object