Class KernelStatsOpImage

  extended by
      extended by
          extended by
              extended by
All Implemented Interfaces:

public class KernelStatsOpImage

An operator to calculate neighbourhood statistics on a source image.

Michael Bedward
See Also:
Description of the algorithm and example

Field Summary
Fields inherited from class
bottomPadding, extender, leftPadding, rightPadding, topPadding
Fields inherited from class
cache, cobbleSources, OP_COMPUTE_BOUND, OP_IO_BOUND, OP_NETWORK_BOUND, tileCacheMetric, tileRecycler
Fields inherited from class
colorModel, eventManager, height, minX, minY, properties, sampleModel, tileFactory, tileGridXOffset, tileGridYOffset, tileHeight, tileWidth, width
Constructor Summary
KernelStatsOpImage(RenderedImage source, extender, Map config, layout, Statistic[] stats, kernel, int band, roi, boolean maskSrc, boolean maskDest, boolean ignoreNaN, Number nilValue)
          Creates a new instance.
Method Summary
protected  void computeRect(Raster[] sources, WritableRaster dest, Rectangle destRect)
          Calculates neighbourhood statistics for a specified rectangle
Methods inherited from class
computeTile, getBorderExtender, getBottomPadding, getLeftPadding, getRightPadding, getTopPadding, mapDestRect, mapSourceRect
Methods inherited from class
addTileToCache, cancelTiles, computeRect, computesUniqueTiles, createTile, dispose, getExpandedNumBands, getFormatTags, getOperationComputeType, getTile, getTileCache, getTileCacheMetric, getTileDependencies, getTileFromCache, getTileRecycler, getTiles, hasExtender, mapDestPoint, mapSourcePoint, prefetchTiles, queueTiles, recycleTile, setTileCache, vectorize, vectorize, vectorize
Methods inherited from class
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


public KernelStatsOpImage(RenderedImage source,
                          Map config,
                          Statistic[] stats,
                          int band,
                          boolean maskSrc,
                          boolean maskDest,
                          boolean ignoreNaN,
                          Number nilValue)
Creates a new instance.

source - the source image
extender - an optional BorderExtender or null
config - configurable attributes of the image (see AreaOpImage)
layout - an optional ImageLayout object; if the layout specifies a SampleModel and / or ColorModel that are invalid for the requested statistics (e.g. wrong number of bands) these will be overridden
stats - an array of Statistic constants
kernel - the convolution kernel
band - the source image band to process
roi - an optional ROI or null
ignoreNaN - if true NaN values are ignored; otherwise any NaN values in a pixels neighbourhood cause nilValue to be returned
maskSrc - if true only neighbourhood pixels within the ROI are used in calculations
maskDest - if true, nilValue is returned for any pixels outside the ROI
nilValue - value to return for pixels with no result
IllegalArgumentException - if the ROI's bounds do not contain the entire source image
See Also:
KernelStatsDescriptor, Statistic
Method Detail


protected void computeRect(Raster[] sources,
                           WritableRaster dest,
                           Rectangle destRect)
Calculates neighbourhood statistics for a specified rectangle

computeRect in class
sources - source rasters (only sources[0] is used here)
dest - a WritableRaster tile containing the area to be computed.
destRect - the rectangle within dest to be processed.

Copyright © 2009-2013. All Rights Reserved.