org.geotools.image.jai
Class NodataFilter

java.lang.Object
  extended byjavax.media.jai.PlanarImage
      extended byjavax.media.jai.OpImage
          extended byjavax.media.jai.AreaOpImage
              extended byorg.geotools.image.jai.NodataFilter
All Implemented Interfaces:
javax.media.jai.ImageJAI, javax.media.jai.PropertyChangeEmitter, javax.media.jai.PropertySource, java.awt.image.RenderedImage, javax.media.jai.WritablePropertySource

public class NodataFilter
extends javax.media.jai.AreaOpImage

Replaces Double.NaN values by the weighted average of neighbors values. This operation use a box of × pixels centered on each value. The weighted average is then computed, ignoring all values. If the number of valid values is greater than , then the center is replaced by the computed average. Otherwise, the value is left unchanged.

Since:
2.1
Version:
$Id: NodataFilter.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
Lionel Flahaut, Martin Desruisseaux

Field Summary
 
Fields inherited from class javax.media.jai.AreaOpImage
bottomPadding, extender, leftPadding, rightPadding, topPadding
 
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
protected NodataFilter(java.awt.image.RenderedImage source, javax.media.jai.ImageLayout layout, java.util.Map map, int padding, int validityThreshold)
          Constructs a new operation.
 
Method Summary
protected  void computeRect(javax.media.jai.PlanarImage[] sources, java.awt.image.WritableRaster dest, java.awt.Rectangle destRect)
          Computes a rectangle of outputs.
 
Methods inherited from class javax.media.jai.AreaOpImage
computeTile, getBorderExtender, getBottomPadding, getLeftPadding, getRightPadding, getTopPadding, mapDestRect, mapSourceRect
 
Methods inherited from class javax.media.jai.OpImage
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 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

NodataFilter

protected NodataFilter(java.awt.image.RenderedImage source,
                       javax.media.jai.ImageLayout layout,
                       java.util.Map map,
                       int padding,
                       int validityThreshold)
Constructs a new operation.

Parameters:
source - The source image.
layout - The image layout.
map - The image properties and rendering hints.
padding - The number of pixel above, below, to the left and to the right of central pixel. The full box size is ×2+1.
validityThreshold - The minimal number of valid neighbors required in order to consider the average as valid.
Method Detail

computeRect

protected void computeRect(javax.media.jai.PlanarImage[] sources,
                           java.awt.image.WritableRaster dest,
                           java.awt.Rectangle destRect)
Computes a rectangle of outputs.



Copyright © GeoTools. All Rights Reserved.