org.geotools.image.jai
Class Hysteresis

java.lang.Object
  extended by javax.media.jai.PlanarImage
      extended by javax.media.jai.OpImage
          extended by javax.media.jai.UntiledOpImage
              extended by org.geotools.image.jai.Hysteresis
All Implemented Interfaces:
java.awt.image.RenderedImage, javax.media.jai.ImageJAI, javax.media.jai.PropertyChangeEmitter, javax.media.jai.PropertySource, javax.media.jai.WritablePropertySource

public class Hysteresis
extends javax.media.jai.UntiledOpImage

Effectue un seuillage par hysteresis sur une image. L'opération de seuillage s'effectue de la manière suivante:

On dispose d'un seuil haut, sh, et d'un seuil bas, sb. Si la valeur d'un pixel est supérieur à sh, on la conserve, elle nous interesse. Si cette valeur est inférieure à sb, on la supprime. Si elle est entre les deux on dit le pixel indeterminé et on ne le conserve que s'il est proche d'un pixel dont la valeur est au dessus de sh, ou proche d'un pixel indéterminé que l'on a précédement trouvé proche d'un pixel de valeur supérieure à sh. Cette recherche se fait de manière itérative, jusqu'à ce que le point indéterminé n'est plus de voisins satisfaisants.

Since:
2.1
Version:
$Id: Hysteresis.java 30643 2008-06-12 18:27:03Z acuster $
Author:
Lionel Flahaut (2ie Technologie, IRD), Martin Desruisseaux

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
protected Hysteresis(java.awt.image.RenderedImage source, javax.media.jai.ImageLayout layout, java.util.Map map, double low, double high, double padValue)
          Constructs a new Hysterisis filter for the given image.
 
Method Summary
protected  void computeImage(java.awt.image.Raster[] sources, java.awt.image.WritableRaster dest, java.awt.Rectangle destRect)
          Computes the whole image.
 
Methods inherited from class javax.media.jai.UntiledOpImage
computeTile, getTileDependencies, mapDestRect, mapSourceRect
 
Methods inherited from class javax.media.jai.OpImage
addTileToCache, cancelTiles, computeRect, computeRect, computesUniqueTiles, createTile, dispose, getExpandedNumBands, getFormatTags, getOperationComputeType, getTile, getTileCache, getTileCacheMetric, 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

Hysteresis

protected Hysteresis(java.awt.image.RenderedImage source,
                     javax.media.jai.ImageLayout layout,
                     java.util.Map map,
                     double low,
                     double high,
                     double padValue)
Constructs a new Hysterisis filter for the given image.

Parameters:
source - The source image.
layout - The image layout.
map - The rendering hints and image properties.
low - The low threshold value, inclusive.
high - The high threshold value, inclusive.
padValue - The value to give to filtered pixel.
Method Detail

computeImage

protected void computeImage(java.awt.image.Raster[] sources,
                            java.awt.image.WritableRaster dest,
                            java.awt.Rectangle destRect)
Computes the whole image.

Specified by:
computeImage in class javax.media.jai.UntiledOpImage


Copyright © 1996-2010 Geotools. All Rights Reserved.