public class OrderedDitherOpImage
extends javax.media.jai.PointOpImage
OpImage
implementing the ordered dither operation as described in OrderedDitherDescriptor
.
This OpImage
performs dithering of its source image into a single band image using a specified color cube and dither mask. Optional
ROI and NoData will be taken into account during processing.
Modifier and Type | Field and Description |
---|---|
protected int |
adjustedOffset
The adjusted offset of the color cube.
|
static boolean |
ARRAY_CALC
Constant indicating that the inner random iterators must pre-calculate an array of the image positions
|
protected int[] |
dims
The array of color cube dimensions-less-one.
|
protected byte[][] |
maskDataByte
The dither mask matrix scaled by 255.
|
protected float[][] |
maskDataFloat
The dither mask matrix.
|
protected int[][] |
maskDataInt
The dither mask matrix scaled to USHORT range.
|
protected long[][] |
maskDataLong
The dither mask matrix scaled to "unsigned int" range.
|
protected int |
maskHeight
The height of the dither mask.
|
protected int |
maskWidth
The width of the dither mask.
|
protected int[] |
mults
The array of color cube multipliers.
|
protected int |
numBands
The number of bands in the source image.
|
protected it.geosolutions.jaiext.orderdither.OrderedDitherOpImage.DitherLUT |
odLUT
An inner class instance representing a dither lookup table.
|
static boolean |
TILE_CACHED
Constant indicating that the inner random iterators must cache the current tile position
|
Constructor and Description |
---|
OrderedDitherOpImage(RenderedImage source,
Map config,
javax.media.jai.ImageLayout layout,
javax.media.jai.ColorCube colorMap,
javax.media.jai.KernelJAI[] ditherMask,
javax.media.jai.ROI roi,
Range nodata,
double destNoData)
Constructs an OrderedDitherOpImage object.
|
Modifier and Type | Method and Description |
---|---|
protected void |
computeRect(Raster[] sources,
WritableRaster dest,
Rectangle destRect)
Computes a tile of the dithered destination image.
|
computeTile, dispose, isColormapOperation, mapDestRect, mapSourceRect, permitInPlaceOperation
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
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
public static final boolean ARRAY_CALC
public static final boolean TILE_CACHED
protected int numBands
protected int[] dims
protected int[] mults
protected int adjustedOffset
protected int maskWidth
protected int maskHeight
protected byte[][] maskDataByte
protected int[][] maskDataInt
protected long[][] maskDataLong
protected float[][] maskDataFloat
protected it.geosolutions.jaiext.orderdither.OrderedDitherOpImage.DitherLUT odLUT
public OrderedDitherOpImage(RenderedImage source, Map config, javax.media.jai.ImageLayout layout, javax.media.jai.ColorCube colorMap, javax.media.jai.KernelJAI[] ditherMask, javax.media.jai.ROI roi, Range nodata, double destNoData)
The image dimensions are derived from the source image. The tile grid layout, SampleModel, and ColorModel may optionally be specified by an ImageLayout object.
source
- A RenderedImage.layout
- An ImageLayout optionally containing the tile grid layout, SampleModel, and ColorModel, or null.colorMap
- The color map to use which must have a number of bands equal to the number of bands in the source image. The offset of this
ColorCube
must be the same for all bands.ditherMask
- An an array of KernelJAI
objects the dimension of which must equal the number of bands in the source image. The
nth element of the array contains a KernelJAI
object which represents the dither mask matrix for the corresponding
band. All KernelJAI
objects in the array must have the same dimensions and contain floating point values between 0.0F and
1.0F.roi
- Optional ROI
used for masking raster areasnodata
- NoData Range
used for masking unwanted pixel valuesdestNoData
- Value to set as backgroundprotected void computeRect(Raster[] sources, WritableRaster dest, Rectangle destRect)
computeRect
in class javax.media.jai.OpImage
sources
- Cobbled sources, guaranteed to provide all the source data necessary for computing the rectangle.dest
- The tile containing the rectangle to be computed.destRect
- The rectangle within the tile to be computed.Copyright © 2006–2018 GeoSolutions. All rights reserved.