org.jaitools.media.jai.rangelookup
Class RangeLookupOpImage

java.lang.Object
  extended by javax.media.jai.PlanarImage
      extended by javax.media.jai.OpImage
          extended by javax.media.jai.PointOpImage
              extended by org.jaitools.media.jai.rangelookup.RangeLookupOpImage
All Implemented Interfaces:
RenderedImage, javax.media.jai.ImageJAI, javax.media.jai.PropertyChangeEmitter, javax.media.jai.PropertySource, javax.media.jai.WritablePropertySource

public class RangeLookupOpImage
extends javax.media.jai.PointOpImage

This is a variation on the JAI javax.media.jai.LookupDescriptor. It works with a RangeLookupTable object in which each entry maps a source image value range to a destination image value.

Since:
1.0
Author:
Michael Bedward, Simone Giannecchini, GeoSolutions
See Also:
RangeLookupDescriptor

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
RangeLookupOpImage(RenderedImage source, Map config, javax.media.jai.ImageLayout layout, RangeLookupTable table, Number defaultValue)
          Constructor
 
Method Summary
protected  void computeRect(Raster[] sources, WritableRaster dest, Rectangle destRect)
          Do lookups for the specified destination rectangle
 
Methods inherited from class javax.media.jai.PointOpImage
computeTile, dispose, isColormapOperation, mapDestRect, mapSourceRect, permitInPlaceOperation
 
Methods inherited from class javax.media.jai.OpImage
addTileToCache, cancelTiles, computeRect, computesUniqueTiles, createTile, getExpandedNumBands, getFormatTags, getOperationComputeType, getTile, getTileCache, getTileCacheMetric, getTileDependencies, getTileFromCache, getTileRecycler, getTiles, 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, 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, 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
 

Constructor Detail

RangeLookupOpImage

public RangeLookupOpImage(RenderedImage source,
                          Map config,
                          javax.media.jai.ImageLayout layout,
                          RangeLookupTable table,
                          Number defaultValue)
Constructor

Parameters:
source - a RenderedImage.
config - configurable attributes of the image
layout - an ImageLayout optionally containing the tile grid layout, SampleModel, and ColorModel, or null.
table - an instance of RangeLookupTable that defines the mappings from source value ranges to destination values
defaultValue - either a value to use for all unmatched source values or null to indicate that unmatched values should pass-through to the destination
See Also:
RangeLookupDescriptor
Method Detail

computeRect

protected void computeRect(Raster[] sources,
                           WritableRaster dest,
                           Rectangle destRect)
Do lookups for the specified destination rectangle

Overrides:
computeRect in class javax.media.jai.OpImage
Parameters:
sources - an array of source Rasters
dest - a WritableRaster tile containing the area to be computed.
destRect - the rectangle within dest to be processed.


Copyright © 2009-2013. All Rights Reserved.