|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--javax.media.jai.Warp
|
+--javax.media.jai.WarpPerspective
A description of a perspective (projective) warp.
The transform is specified as a mapping from destination space to source space. This is a backward mapping, as opposed to the forward mapping used in the "Affine" operation.
| Constructor Summary | |
WarpPerspective(PerspectiveTransform transform)
Constructs a WarpPerspective with a given
transform mapping destination pixels into source space. |
|
| Method Summary | |
PerspectiveTransform |
getTransform()
Returns a clone of the PerspectiveTransform
associated with this WarpPerspective object. |
Point2D |
mapDestPoint(Point2D destPt)
Computes the source point corresponding to the supplied point. |
Rectangle |
mapDestRect(Rectangle destRect)
Computes a Rectangle that is guaranteed to enclose the region of the source that is required in order to produce a given rectangular output region. |
Point2D |
mapSourcePoint(Point2D sourcePt)
Computes the destination point corresponding to the supplied point. |
Rectangle |
mapSourceRect(Rectangle srcRect)
Computes a Rectangle that is guaranteed to enclose the region of the source that is required in order to produce a given rectangular output region. |
float[] |
warpSparseRect(int x,
int y,
int width,
int height,
int periodX,
int periodY,
float[] destRect)
Computes the source subpixel positions for a given rectangular destination region, subsampled with an integral period. |
| Methods inherited from class javax.media.jai.Warp |
warpPoint, warpPoint, warpRect, warpRect, warpSparseRect |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public WarpPerspective(PerspectiveTransform transform)
WarpPerspective with a given
transform mapping destination pixels into source space. Note
that this is a backward mapping as opposed to the forward
mapping used in AffineOpImage.transform - The destination to source transform.IllegalArgumentException - if transform is null| Method Detail |
public PerspectiveTransform getTransform()
PerspectiveTransform
associated with this WarpPerspective object.PerspectiveTransform.
public float[] warpSparseRect(int x,
int y,
int width,
int height,
int periodX,
int periodY,
float[] destRect)
warpSparseRect in class Warpx - The minimum X coordinate of the destination region.y - The minimum Y coordinate of the destination region.width - The width of the destination region.height - The height of the destination region.periodX - The horizontal sampling period.periodY - The horizontal sampling period.destRect - A float array containing at least
2*((width+periodX-1)/periodX)*
((height+periodY-1)/periodY)
elements, or null. If null, a
new array will be constructed.destRect parameter if
it is non-null, or a new
float array otherwise.public Rectangle mapDestRect(Rectangle destRect)
mapDestRect in class WarpdestRect - The Rectangle in destination coordinates.Rectangle in the source coordinate
system that is guaranteed to contain all pixels
referenced by the output of warpRect() on
the destination region.IllegalArgumentException - if destRect is null.public Rectangle mapSourceRect(Rectangle srcRect)
mapSourceRect in class WarpsrcRect - The Rectangle in source coordinates.Rectangle in the destination coordinate
system that is guaranteed to contain all pixels
within the forward mapping of the source rectangle.IllegalArgumentException - is srcRect is null.public Point2D mapDestPoint(Point2D destPt)
This method returns the return value of
transform.transform(destPt, null).
mapDestPoint in class WarpdestPt - the position in destination image coordinates
to map to source image coordinates.Point2D of the same class as
destPt.IllegalArgumentException - if destPt is
null.public Point2D mapSourcePoint(Point2D sourcePt)
If the transform is invertible, this method returns the return
value of transform.inverseTransform(destPt, null). If
the transform is not invertible, null is returned.
mapSourcePoint in class WarpsourcePt - the position in source image coordinates
to map to destination image coordinates.Point2D of the same class as
sourcePt or null> if the transform is
not invertible.- Throws:
IllegalArgumentException - if sourcePt is
null.- Since:
- JAI 1.1.2
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||