|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.media.jai.PlanarImage
javax.media.jai.OpImage
javax.media.jai.UntiledOpImage
public abstract class UntiledOpImage
A general class for single-source operations which require cobbled sources and create an image consisting of a single tile equal in location and size to the image bounds.
The output image will have a single tile, regardless of the
ImageLayout
settings passed to the constructor. Any
specified settings for tile grid offset and tile dimensions will be
replaced by the image origin and tile dimensions, respectively.
Subclasses should implement the computeImage
method
which requests computation of the entire image at once.
OpImage
,
DCTDescriptor
,
DFTDescriptor
,
ErrorDiffusionDescriptor
Field Summary |
---|
Fields inherited from class javax.media.jai.OpImage |
---|
cache, cobbleSources, OP_COMPUTE_BOUND, OP_IO_BOUND, OP_NETWORK_BOUND, tileCacheMetric, tileRecycler |
Fields inherited from class javax.media.jai.PlanarImage |
---|
colorModel, eventManager, height, minX, minY, properties, sampleModel, tileFactory, tileGridXOffset, tileGridYOffset, tileHeight, tileWidth, width |
Constructor Summary | |
---|---|
UntiledOpImage(RenderedImage source,
Map configuration,
ImageLayout layout)
Constructs an UntiledOpImage . |
|
UntiledOpImage(Vector sources,
Map configuration,
ImageLayout layout)
Constructs an UntiledOpImage . |
Method Summary | |
---|---|
protected abstract void |
computeImage(Raster[] sources,
WritableRaster dest,
Rectangle destRect)
Calculate the destination image from the source image. |
Raster |
computeTile(int tileX,
int tileY)
Computes a tile. |
Point[] |
getTileDependencies(int tileX,
int tileY,
int sourceIndex)
Returns an array of points indicating the tile dependencies which in this case is the set of all tiles in the specified source image. |
Rectangle |
mapDestRect(Rectangle destRect,
int sourceIndex)
Returns the bounds of the indicated source image. |
Rectangle |
mapSourceRect(Rectangle sourceRect,
int sourceIndex)
Returns the image bounds. |
Methods inherited from class javax.media.jai.OpImage |
---|
addTileToCache, cancelTiles, computeRect, computeRect, computesUniqueTiles, createTile, dispose, getExpandedNumBands, getFormatTags, getOperationComputeType, getTile, getTileCache, getTileCacheMetric, getTileFromCache, getTileRecycler, getTiles, hasExtender, mapDestPoint, mapSourcePoint, prefetchTiles, queueTiles, recycleTile, setTileCache, vectorize, vectorize, vectorize |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public UntiledOpImage(Vector sources, Map configuration, ImageLayout layout)
UntiledOpImage
. The image origin and
dimensions, SampleModel
, and ColorModel
may optionally be specified by an ImageLayout
object.
In all cases the tile grid offset will be set to the image origin
and the tile dimensions to the image dimensions. If not specified
in the ImageLayout
, the image origin and dimensions
are set to the corresponding attributes of the first source image.
Cobbling will be performed on the source(s) as needed.
sources
- The immediate sources of this image.configuration
- Configurable attributes of the image including
configuration variables indexed by
RenderingHints.Key
s and image properties indexed
by String
s or CaselessStringKey
s.
This is simply forwarded to the superclass constructor.layout
- an ImageLayout
optionally containing
the SampleModel
, and
ColorModel
. The tile grid layout
information will be overridden in order to ensure that
the image has a single tile.
IllegalArgumentException
- if sources
is null
.
IllegalArgumentException
- If sources
is non-null
and any object in
sources
is null
.
IllegalArgumentException
- if sources
does not
contain at least one element.
ClassCastException
- If the first object in sources
is not a RenderedImage
.public UntiledOpImage(RenderedImage source, Map configuration, ImageLayout layout)
UntiledOpImage
. The image origin and
dimensions, SampleModel
, and ColorModel
may optionally be specified by an ImageLayout
object.
In all cases the tile grid offset will be set to the image origin
and the tile dimensions to the image dimensions. If not specified
in the ImageLayout
, the image origin and dimensions
are set to the corresponding attributes of the source image.
Cobbling will be performed on the source as needed.
source
- a RenderedImage
.configuration
- Configurable attributes of the image including
configuration variables indexed by
RenderingHints.Key
s and image properties indexed
by String
s or CaselessStringKey
s.
This is simply forwarded to the superclass constructor.layout
- an ImageLayout
optionally containing
the SampleModel
, and
ColorModel
. The tile grid layout
information will be overridden in order to ensure that
the image has a single tile.
IllegalArgumentException
- if source
is null
.Method Detail |
---|
public Rectangle mapSourceRect(Rectangle sourceRect, int sourceIndex)
mapSourceRect
in class OpImage
sourceRect
- the Rectangle
in source coordinates
(ignored).sourceIndex
- the index of the source image (ignored).
public Rectangle mapDestRect(Rectangle destRect, int sourceIndex)
mapDestRect
in class OpImage
destRect
- the Rectangle in destination coordinates (ignored).sourceIndex
- the index of the source image.
IllegalArgumentException
- if sourceIndex
is
negative or greater than the index of the last source.public Raster computeTile(int tileX, int tileY)
computeImage
is called to produce the single
output tile.
computeTile
in class OpImage
tileX
- The X index of the tile.tileY
- The Y index of the tile.protected abstract void computeImage(Raster[] sources, WritableRaster dest, Rectangle destRect)
sources
- The source Rasters; should be the whole image for
each source.dest
- The destination WritableRaster; should be the whole image.destRect
- The destination Rectangle; should equal the destination
image bounds.public Point[] getTileDependencies(int tileX, int tileY, int sourceIndex)
getTileDependencies
in class OpImage
tileX
- the X index of the tile.tileY
- the Y index of the tile.sourceIndex
- the index of the source image.
Point
s indicating the source
tile dependencies.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |