Package org.eclipse.imagen
Class UntiledOpImage
Object
PlanarImage
OpImage
UntiledOpImage
- All Implemented Interfaces:
RenderedImage,ImageImageN,PropertyChangeEmitter,PropertySource,WritablePropertySource
- Direct Known Subclasses:
ErrorDiffusionOpImage
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.
- See Also:
-
OpImageorg.eclipse.imagen.operator.DCTDescriptororg.eclipse.imagen.operator.DFTDescriptororg.eclipse.imagen.operator.ErrorDiffusionDescriptor
-
Field Summary
Fields inherited from class OpImage
OP_COMPUTE_BOUND, OP_IO_BOUND, OP_NETWORK_BOUND -
Constructor Summary
ConstructorsConstructorDescriptionUntiledOpImage(RenderedImage source, Map configuration, ImageLayout layout) Constructs anUntiledOpImage.UntiledOpImage(Vector sources, Map configuration, ImageLayout layout) Constructs anUntiledOpImage. -
Method Summary
Modifier and TypeMethodDescriptioncomputeTile(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.mapDestRect(Rectangle destRect, int sourceIndex) Returns the bounds of the indicated source image.mapSourceRect(Rectangle sourceRect, int sourceIndex) Returns the image bounds.Methods inherited from class OpImage
cancelTiles, computesUniqueTiles, dispose, getExpandedNumBands, getOperationComputeType, getTile, getTileCache, getTileCacheMetric, getTileRecycler, getTiles, hasExtender, mapDestPoint, mapSourcePoint, prefetchTiles, queueTiles, setTileCacheMethods inherited from class PlanarImage
addPropertyChangeListener, addPropertyChangeListener, addSink, addTileComputationListener, copyData, copyData, copyExtendedData, createColorModel, createSnapshot, getAsBufferedImage, getAsBufferedImage, getBounds, getColorModel, getData, getData, getDefaultColorModel, getExtendedData, getGraphics, getHeight, getImageID, getMaxTileX, getMaxTileY, getMaxX, getMaxY, getMinTileX, getMinTileY, getMinX, getMinY, getNumBands, getNumSources, getNumXTiles, getNumYTiles, getProperty, getPropertyClass, getPropertyNames, getPropertyNames, getSampleModel, getSinks, getSource, getSourceImage, getSourceObject, getSources, getSplits, getTileComputationListeners, getTileFactory, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileIndices, getTileRect, getTiles, getTileWidth, getWidth, overlapsMultipleTiles, removeProperty, removePropertyChangeListener, removePropertyChangeListener, removeSink, removeSinks, removeTileComputationListener, setProperty, tileXToX, tileXToX, tileYToY, tileYToY, toString, wrapRenderedImage, XToTileX, XToTileX, YToTileY, YToTileY
-
Constructor Details
-
UntiledOpImage
Constructs anUntiledOpImage. The image origin and dimensions,SampleModel, andColorModelmay optionally be specified by anImageLayoutobject. 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 theImageLayout, 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.- Parameters:
sources- The immediate sources of this image.configuration- Configurable attributes of the image including configuration variables indexed byRenderingHints.Keys and image properties indexed byStrings orCaselessStringKeys. This is simply forwarded to the superclass constructor.layout- anImageLayoutoptionally containing theSampleModel, andColorModel. The tile grid layout information will be overridden in order to ensure that the image has a single tile.- Throws:
IllegalArgumentException- ifsourcesisnull.IllegalArgumentException- Ifsourcesis non-nulland any object insourcesisnull.IllegalArgumentException- ifsourcesdoes not contain at least one element.ClassCastException- If the first object insourcesis not aRenderedImage.
-
UntiledOpImage
Constructs anUntiledOpImage. The image origin and dimensions,SampleModel, andColorModelmay optionally be specified by anImageLayoutobject. 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 theImageLayout, the image origin and dimensions are set to the corresponding attributes of the source image. Cobbling will be performed on the source as needed.- Parameters:
source- aRenderedImage.configuration- Configurable attributes of the image including configuration variables indexed byRenderingHints.Keys and image properties indexed byStrings orCaselessStringKeys. This is simply forwarded to the superclass constructor.layout- anImageLayoutoptionally containing theSampleModel, andColorModel. The tile grid layout information will be overridden in order to ensure that the image has a single tile.- Throws:
IllegalArgumentException- ifsourceisnull.
-
-
Method Details
-
mapSourceRect
Returns the image bounds.- Specified by:
mapSourceRectin classOpImage- Parameters:
sourceRect- theRectanglein source coordinates (ignored).sourceIndex- the index of the source image (ignored).- Returns:
- The image bounds.
-
mapDestRect
Returns the bounds of the indicated source image.- Specified by:
mapDestRectin classOpImage- Parameters:
destRect- the Rectangle in destination coordinates (ignored).sourceIndex- the index of the source image.- Returns:
- The bounds of the indicated source image.
- Throws:
IllegalArgumentException- ifsourceIndexis negative or greater than the index of the last source.
-
computeTile
Computes a tile. All sources are cobbled together andcomputeImageis called to produce the single output tile.- Overrides:
computeTilein classOpImage- Parameters:
tileX- The X index of the tile.tileY- The Y index of the tile.
-
getTileDependencies
Returns an array of points indicating the tile dependencies which in this case is the set of all tiles in the specified source image.- Overrides:
getTileDependenciesin classOpImage- Parameters:
tileX- the X index of the tile.tileY- the Y index of the tile.sourceIndex- the index of the source image.- Returns:
- An array of
Points indicating the source tile dependencies.
-