|
|||||||||
| 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.PointOpImage
An abstract base class for image operators that require only the (x, y) pixel from each source image in order to compute the destination pixel (x, y).
PointOpImage is intended as a convenient
superclass for OpImages that only need to look at each
destination pixel's corresponding source pixels. Some examples are
lookup, contrast adjustment, pixel arithmetic, and color space
conversion.
OpImage| Fields inherited from class javax.media.jai.OpImage |
cache,
cobbleSources,
OP_COMPUTE_BOUND,
OP_IO_BOUND,
OP_NETWORK_BOUND,
tileCacheMetric |
| Fields inherited from class javax.media.jai.PlanarImage |
colorModel,
eventManager,
height,
minX,
minY,
properties,
sampleModel,
tileGridXOffset,
tileGridYOffset,
tileHeight,
tileWidth,
width |
| Constructor Summary | |
PointOpImage(RenderedImage source,
ImageLayout layout,
Map configuration,
boolean cobbleSources)
Constructs a PointOpImage with one source image. |
|
PointOpImage(RenderedImage source0,
RenderedImage source1,
ImageLayout layout,
Map configuration,
boolean cobbleSources)
Constructs a PointOpImage with two source images. |
|
PointOpImage(RenderedImage source0,
RenderedImage source1,
RenderedImage source2,
ImageLayout layout,
Map configuration,
boolean cobbleSources)
Constructs a PointOpImage with three source
images. |
|
PointOpImage(Vector sources,
ImageLayout layout,
Map configuration,
boolean cobbleSources)
Constructor. |
|
| Method Summary | |
Raster |
computeTile(int tileX,
int tileY)
Computes a tile. |
protected boolean |
isColormapOperation()
Indicates whether the operation is being effected directly on the associated colormap. |
Rectangle |
mapDestRect(Rectangle destRect,
int sourceIndex)
Returns a conservative estimate of the region of a specific source that is required in order to compute the pixels of a given destination rectangle. |
Rectangle |
mapSourceRect(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. |
protected void |
permitInPlaceOperation()
Causes a flag to be set to indicate that in-place operation should be permitted if the image bounds, tile grid offset, tile dimensions, and SampleModels of the source and destination images are compatible. |
| Methods inherited from class javax.media.jai.OpImage |
addTileToCache,
cancelTiles,
computeRect,
computeRect,
computesUniqueTiles,
finalize,
getExpandedNumBands,
getFormatTags,
getOperationComputeType,
getTile,
getTileCache,
getTileCacheMetric,
getTileDependencies,
getTileFromCache,
getTiles,
hasExtender,
prefetchTiles,
queueTiles,
setTileCache,
vectorize,
vectorize,
vectorize |
| Methods inherited from class java.lang.Object |
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public PointOpImage(Vector sources,
ImageLayout layout,
Map configuration,
boolean cobbleSources)
There must be at least one valid source supplied via the
sources argument. However, there is no upper limit
on the number of sources this image may have.
The image's layout is encapsulated in the layout
argument. If the image bounds are supplied they must be contained
within the intersected source bounds which must be non-empty.
If the bounds are not supplied, they are calculated to be the
intersection of the bounds of all sources.
If no SampleModel is specified in the layout, a new
SampleModel will be created. This SampleModel
will have a number of bands equal to the minimum band count of all
sources and a depth which can accomodate the data of all sources.
The band count of sources which have an IndexColorModel
will be set to the number of components of the
IndexColorModel instead of to the number of bands of the
SampleModel.
In all cases, the layout is forwarded to the OpImage
constructor which sets the default layout values in the standard way.
layout - The layout parameters of the destination image.sources - The source images.configuration - Configurable attributes of the image including
configuration variables indexed by
RenderingHints.Keys and image properties indexed
by Strings or CaselessStringKeys.
This is simply forwarded to the superclass constructor.cobbleSources - true if computeRect() expects
contiguous sources.sources or any
object in sources is null.sources does not
contain at least one element.sources
is not a RenderedImage.
public PointOpImage(RenderedImage source,
ImageLayout layout,
Map configuration,
boolean cobbleSources)
PointOpImage with one source image.
The image layout is computed as described in the constructor
taking a Vector of sources.layout - The layout parameters of the destination image.source - The source image.configuration - Configurable attributes of the image including
configuration variables indexed by
RenderingHints.Keys and image properties indexed
by Strings or CaselessStringKeys.
This is simply forwarded to the superclass constructor.cobbleSources - Indicates whether computeRect()
expects contiguous sources.source
is null.
public PointOpImage(RenderedImage source0,
RenderedImage source1,
ImageLayout layout,
Map configuration,
boolean cobbleSources)
PointOpImage with two source images.
The image layout is computed as described in the constructor
taking a Vector of sources.layout - The layout parameters of the destination image.source0 - The first source image.source1 - The second source image.configuration - Configurable attributes of the image including
configuration variables indexed by
RenderingHints.Keys and image properties indexed
by Strings or CaselessStringKeys.
This is simply forwarded to the superclass constructor.cobbleSources - Indicates whether computeRect()
expects contiguous sources.source0 or
source1 is null.
public PointOpImage(RenderedImage source0,
RenderedImage source1,
RenderedImage source2,
ImageLayout layout,
Map configuration,
boolean cobbleSources)
PointOpImage with three source
images. The image layout is computed as described in the
constructor taking a Vector of sources.layout - The layout parameters of the destination image.source0 - The first source image.source1 - The second source image.source2 - The third source image.configuration - Configurable attributes of the image including
configuration variables indexed by
RenderingHints.Keys and image properties indexed
by Strings or CaselessStringKeys.
This is simply forwarded to the superclass constructor.cobbleSources - Indicates whether computeRect()
expects contiguous sources.source0 or
source1 or source2 is
null.| Method Detail |
protected void permitInPlaceOperation()
protected boolean isColormapOperation()
true if the image is the destination of a unary,
shift-invariant operation with an IndexColorModel equal
to that of its unique source.
When this method returns true the
computeTile() method in this class will return either
a copy of the corresponding region of the first source image or,
if the operation is being performed in place, the corresponding
tile of the first source image.
The implementation in this class always returns false.
public Raster computeTile(int tileX,
int tileY)
computeRect(Raster[],
WritableRaster, Rectangle) is called for each of the
resulting regions. Otherwise, computeRect(PlanarImage[],
WritableRaster, Rectangle) is called once to compute the
entire active area of the tile.
The image bounds may be larger than the bounds of the source image. In this case, samples for which there are no corresponding sources are set to zero.
tileX - The X index of the tile.tileY - The Y index of the tile.
public final Rectangle mapSourceRect(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 final Rectangle mapDestRect(Rectangle destRect,
int sourceIndex)
destRect - 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.destRect is
null.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||