|
||||||||||
| 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
org.jaitools.media.jai.AttributeOpImage
public abstract class AttributeOpImage
Abstract base class for operators that generate non-image attributes from a source image while passing source image pixels directly to destination pixels.
| Field Summary | |
|---|---|
protected javax.media.jai.ROI |
roi
An optional ROI to define the region over which to derive attributes. |
protected Rectangle |
srcBounds
Bounds of the source image as a convenience. |
| 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 | |
|---|---|
AttributeOpImage(RenderedImage source,
javax.media.jai.ROI roi)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
computesUniqueTiles()
Always returns false since source and destination tiles are the same. |
Raster |
computeTile(int tileX,
int tileY)
Handles a request to compute image data for a given tile by simply passing a getTile request to the source image. |
protected abstract Object |
getAttribute(String name)
Retrieves an attribute by name. |
protected Class<?> |
getAttributeClass(String name)
Returns the class of the specified attribute. |
protected abstract String[] |
getAttributeNames()
Returns the names of available attributes. |
Object |
getProperty(String name)
|
Class |
getPropertyClass(String name)
|
String[] |
getPropertyNames()
|
Raster |
getTile(int tileX,
int tileY)
Gets the requested image tile (which will be from the source image). |
Raster[] |
getTiles(Point[] tileIndices)
Gets the requested image tiles (which will be from the source image). |
Rectangle |
mapDestRect(Rectangle destRect,
int sourceIndex)
Maps the destination rectangle into source image space (which will be identical). |
Rectangle |
mapSourceRect(Rectangle sourceRect,
int sourceIndex)
Maps the source rectangle into destination space (which will be identical). |
| Methods inherited from class javax.media.jai.OpImage |
|---|
addTileToCache, cancelTiles, computeRect, computeRect, createTile, dispose, getExpandedNumBands, getFormatTags, getOperationComputeType, getTileCache, getTileCacheMetric, getTileDependencies, getTileFromCache, getTileRecycler, hasExtender, mapDestPoint, mapSourcePoint, prefetchTiles, queueTiles, recycleTile, setTileCache, vectorize, vectorize, vectorize |
| Methods inherited from class javax.media.jai.PlanarImage |
|---|
addPropertyChangeListener, addPropertyChangeListener, addSink, addSink, addSource, addTileComputationListener, copyData, copyData, copyExtendedData, createColorModel, createSnapshot, createWritableRaster, finalize, getAsBufferedImage, getAsBufferedImage, getBounds, getColorModel, getData, getData, getDefaultColorModel, getExtendedData, getGraphics, getHeight, getImageID, getMaxTileX, getMaxTileY, getMaxX, getMaxY, getMinTileX, getMinTileY, getMinX, getMinY, getNumBands, getNumSources, getNumXTiles, getNumYTiles, getProperties, getPropertyNames, getSampleModel, getSinks, getSource, getSourceImage, getSourceObject, getSources, getSplits, getTileComputationListeners, getTileFactory, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileIndices, getTileRect, getTiles, getTileWidth, getWidth, overlapsMultipleTiles, removeProperty, removePropertyChangeListener, removePropertyChangeListener, removeSink, removeSink, removeSinks, removeSource, removeSources, removeTileComputationListener, setImageLayout, setProperties, setProperty, setSource, setSources, tileXToX, tileXToX, tileYToY, tileYToY, toString, wrapRenderedImage, XToTileX, XToTileX, YToTileY, YToTileY |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected javax.media.jai.ROI roi
protected Rectangle srcBounds
| Constructor Detail |
|---|
public AttributeOpImage(RenderedImage source,
javax.media.jai.ROI roi)
source - the source image from from which to derive attributesroi - an optional ROI to define sub-region(s) of the
source image to examine.| Method Detail |
|---|
public boolean computesUniqueTiles()
computesUniqueTiles in class javax.media.jai.OpImage
public Raster getTile(int tileX,
int tileY)
getTile in interface RenderedImagegetTile in class javax.media.jai.OpImagetileX - tile X indextileY - tile Y index
public Raster computeTile(int tileX,
int tileY)
computeTile in class javax.media.jai.OpImagetileX - tile X indextileY - tile Y index
public Raster[] getTiles(Point[] tileIndices)
getTiles in class javax.media.jai.OpImagetileIndices - tile X and Y indices as Points
IllegalArgumentException - If tileIndices is null.
public Rectangle mapSourceRect(Rectangle sourceRect,
int sourceIndex)
mapSourceRect in class javax.media.jai.OpImagesourceRect - the Rectangle in source image coordinatessourceIndex - the index of the source image (must be 0 since there
is only one source image)
Rectangle with identical bounds to sourceRect
IllegalArgumentException - if sourceRect is null
IllegalArgumentException - if sourceIndex is not 0
public Rectangle mapDestRect(Rectangle destRect,
int sourceIndex)
mapDestRect in class javax.media.jai.OpImagedestRect - the Rectangle in destination image coordinatessourceIndex - the index of the source image (must be 0 since there
is only one source image)
Rectangle with identical bounds to destRect
IllegalArgumentException - if destRect is null
IllegalArgumentException - if sourceIndex is not 0protected abstract Object getAttribute(String name)
name - the attribute name
null if the name does not
match any of the available attributes
IllegalArgumentException - if name is nullprotected Class<?> getAttributeClass(String name)
name - attribute name
protected abstract String[] getAttributeNames()
public Object getProperty(String name)
getProperty in interface RenderedImagegetProperty in interface javax.media.jai.PropertySourcegetProperty in class javax.media.jai.PlanarImagepublic Class getPropertyClass(String name)
getPropertyClass in interface javax.media.jai.PropertySourcegetPropertyClass in class javax.media.jai.PlanarImagepublic String[] getPropertyNames()
getPropertyNames in interface RenderedImagegetPropertyNames in interface javax.media.jai.PropertySourcegetPropertyNames in class javax.media.jai.PlanarImage
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||