|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--javax.media.jai.PlanarImage
|
+--javax.media.jai.OpImage
|
+--javax.media.jai.WarpOpImage
A general implementation of image warping, and a superclass for other geometric image operations.
The image warp is specified by a Warp object
and an Interpolation object.
Subclasses of WarpOpImage may choose whether they
wish to implement the cobbled or non-cobbled variant of
computeRect by means of the cobbleSources
constructor parameter. The class comments for OpImage
provide more information about how to override
computeRect.
OpImage,
ScaleOpImage,
Warp,
Interpolation| Field Summary | |
protected Interpolation |
interp
The Interpolation object describing the subpixel
interpolation method. |
protected Warp |
warp
The Warp object describing the backwards pixel
map. |
protected java.awt.Rectangle |
writableBounds
The writable boundary of this image. |
| Fields inherited from class javax.media.jai.OpImage |
cache,
cobbleSources,
extenders,
OP_COMPUTE_BOUND,
OP_IO_BOUND,
OP_NETWORK_BOUND |
| Fields inherited from class javax.media.jai.PlanarImage |
colorModel,
height,
minX,
minY,
sampleModel,
snapshot,
source0,
source1,
sources,
tileGridXOffset,
tileGridYOffset,
tileHeight,
tileWidth,
width |
| Constructor Summary | |
WarpOpImage(java.awt.image.RenderedImage source,
BorderExtender extender,
TileCache cache,
ImageLayout layout,
Warp warp,
Interpolation interp,
boolean cobbleSources)
Constructs a WarpOpImage. |
|
| Method Summary | |
java.awt.image.Raster |
computeTile(int tileX,
int tileY)
Computes a tile. |
int |
getBottomPadding()
Returns the number of samples required below the center. |
int |
getLeftPadding()
Returns the number of samples required to the left of the center. |
int |
getRightPadding()
Returns the number of samples required to the right of the center. |
int |
getTopPadding()
Returns the number of samples required above the center. |
java.awt.Rectangle |
mapDestRect(java.awt.Rectangle destRect,
int sourceIndex)
Returns a conservative estimate of the region of a specified source that is required in order to compute the pixels of a given destination rectangle. |
java.awt.Rectangle |
mapSourceRect(java.awt.Rectangle sourceRect,
int sourceIndex)
Returns a conservative estimate of the destination region that can potentially be affected by the pixels of a rectangle of a given source. |
| Methods inherited from class javax.media.jai.OpImage |
addTileToCache,
computeRect,
computeRect,
computesUniqueTiles,
finalize,
getExpandedNumBands,
getFormatTags,
getOperationComputeType,
getTile,
getTileDependencies,
getTileFromCache,
getTiles,
hasExtender,
prefetchTiles,
setTileCache |
| Methods inherited from class java.lang.Object |
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
protected Warp warp
Warp object describing the backwards pixel
map.protected Interpolation interp
Interpolation object describing the subpixel
interpolation method.protected java.awt.Rectangle writableBounds
| Constructor Detail |
public WarpOpImage(java.awt.image.RenderedImage source,
BorderExtender extender,
TileCache cache,
ImageLayout layout,
Warp warp,
Interpolation interp,
boolean cobbleSources)
WarpOpImage. The output minX, minY,
width, and height are derived from the source image unless
overridden by the layout parameter. The
SampleModel and ColorModel of the
output are set in the standard way by the OpImage
constructor.
Additional control over the image bounds, tile grid layout,
SampleModel, and ColorModel may be
obtained by specifying an ImageLayout parameter.
This parameter will be passed to the superclass constructor
unchanged.
source - A RenderedImage.extender - A BorderExtender, or null.cache - A TileCache object to store tiles from this OpImage,
or null. If null, a default cache will be used.layout - An ImageLayout optionally containing the tile
grid layout, SampleModel, and
ColorModel.warp - The Warp object describing the warp.interp - The Interpolation object describing the
interpolation method.cobbleSources - A boolean indicating whether
computeRect() expects contiguous sources.
To use the default implementation of warping contained in
this class, set cobbleSources to false.| Method Detail |
public int getLeftPadding()
public int getRightPadding()
public int getTopPadding()
public int getBottomPadding()
public java.awt.Rectangle mapSourceRect(java.awt.Rectangle sourceRect,
int sourceIndex)
sourceRect - The Rectangle in source coordinates.sourceIndex - The index of the source image.Rectangle indicating the potentially
affected destination region, or null if
the region is unknown.sourceIndex is
negative or greater than the index of the last source.sourceRect is
null.
public java.awt.Rectangle mapDestRect(java.awt.Rectangle destRect,
int sourceIndex)
destRect - The Rectangle in destination coordinates.sourceIndex - The index of the source image.Rectangle indicating the required source region.sourceIndex is
negative or greater than the index of the last source.destRect is
null.
public java.awt.image.Raster computeTile(int tileX,
int tileY)
WritableRaster is created to
represent the requested tile. Its width and height equals to this
image's tile width and tile height respectively. If the requested
tile lies outside of the image's boundary, the created raster is
returned with all of its pixels set to 0.
Whether or not this method performs source cobbling is determined
by the cobbleSources variable set at construction time.
If cobbleSources is true, cobbling is
performed on the source for areas that intersect multiple tiles,
and computeRect(Raster[], WritableRaster, Rectangle)
is called to perform the actual computation. Otherwise,
computeRect(PlanarImage[], WritableRaster, Rectangle)
is called to perform the actual computation.
tileX - The X index of the tile.tileY - The Y index of the tile.Raster.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||