org.jaitools.media.jai.vectorize
Class VectorizeOpImage

java.lang.Object
  extended by javax.media.jai.PlanarImage
      extended by javax.media.jai.OpImage
          extended by org.jaitools.media.jai.AttributeOpImage
              extended by org.jaitools.media.jai.vectorize.VectorizeOpImage
All Implemented Interfaces:
RenderedImage, javax.media.jai.ImageJAI, javax.media.jai.PropertyChangeEmitter, javax.media.jai.PropertySource, javax.media.jai.WritablePropertySource

public class VectorizeOpImage
extends AttributeOpImage

Vectorize regions of uniform value in an image.

Since:
1.1
Version:
$Id$
Author:
Michael Bedward, Simone Giannecchini, GeoSolutions

Field Summary
 
Fields inherited from class org.jaitools.media.jai.AttributeOpImage
roi, srcBounds
 
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
VectorizeOpImage(RenderedImage source, javax.media.jai.ROI roi, int band, List<Double> outsideValues, boolean insideEdges, boolean removeCollinear, double filterThreshold, int filterMethod)
          Creates a new instance of the operator.
 
Method Summary
 List<com.vividsolutions.jts.geom.Geometry> getAttribute(String name)
          Retrieves an attribute by name.
protected  String[] getAttributeNames()
          Returns the names of available attributes.
 
Methods inherited from class org.jaitools.media.jai.AttributeOpImage
computesUniqueTiles, computeTile, getAttributeClass, getProperty, getPropertyClass, getPropertyNames, getTile, getTiles, mapDestRect, mapSourceRect
 
Methods inherited from class javax.media.jai.OpImage
addTileToCache, cancelTiles, computeRect, computeRect, createTile, dispose, getExpandedNumBands, getFormatTags, getOperationComputeType, getTileCache, getTileCacheMetric, getTileDependencies, getTileFromCache, getTileRecycler, 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, 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

VectorizeOpImage

public VectorizeOpImage(RenderedImage source,
                        javax.media.jai.ROI roi,
                        int band,
                        List<Double> outsideValues,
                        boolean insideEdges,
                        boolean removeCollinear,
                        double filterThreshold,
                        int filterMethod)
Creates a new instance of the operator.

Parameters:
source - the source image to be vectorized
roi - an optional ROI defining the region to be vectorized
band - the source image band to examine
outsideValues - values representing "outside" areas (ie. regions that will not be vectorized); may be null or empty
insideEdges - flag controlling whether boundaries between adjacent "inside" regions should be vectorized
removeCollinear - whether to remove collinear points from polygons
filterThreshold - the area (factional pixels) below which polygons will be filtered from the output
filterMethod - filtering method used if filterThreshold > 0; must be one of VectorizeDescriptor.FILTER_MERGE_LARGEST, VectorizeDescriptor.FILTER_MERGE_RANDOM, or VectorizeDescriptor.FILTER_DELETE
Method Detail

getAttribute

public List<com.vividsolutions.jts.geom.Geometry> getAttribute(String name)
Retrieves an attribute by name. Calling this method will fire a request for it to be generated if it has not already been so, or if the sub-class does not cache the attribute.

Specified by:
getAttribute in class AttributeOpImage
Parameters:
name - the attribute name
Returns:
the requested attribute or null if the name does not match any of the available attributes

getAttributeNames

protected String[] getAttributeNames()
Returns the names of available attributes.

Specified by:
getAttributeNames in class AttributeOpImage
Returns:
attribute names


Copyright © 2009-2013. All Rights Reserved.