jaitools.media.jai.vectorbinarize
Class VectorBinarizeOpImage

java.lang.Object
  extended by javax.media.jai.PlanarImage
      extended by javax.media.jai.OpImage
          extended by javax.media.jai.SourcelessOpImage
              extended by jaitools.media.jai.vectorbinarize.VectorBinarizeOpImage
All Implemented Interfaces:
RenderedImage, javax.media.jai.ImageJAI, javax.media.jai.PropertyChangeEmitter, javax.media.jai.PropertySource, javax.media.jai.WritablePropertySource

public class VectorBinarizeOpImage
extends javax.media.jai.SourcelessOpImage

Creates a binary image based on tests of pixel inclusion in a polygonal Geometry. See VectorBinarizeDescriptor for details.

Since:
1.1
Version:
$Id: VectorBinarizeOpImage.java 1393 2011-02-14 12:10:35Z andrea.aime $
Author:
Michael Bedward, Andrea Aime

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
VectorBinarizeOpImage(SampleModel sm, Map configuration, int minX, int minY, int width, int height, com.vividsolutions.jts.geom.prep.PreparedGeometry geom, PixelCoordType coordType)
          Constructor.
 
Method Summary
 Raster computeTile(int tileX, int tileY)
          Returns the specified tile.
protected  Raster getTileRaster(int minX, int minY)
          Gets the data for the requested tile.
 
Methods inherited from class javax.media.jai.SourcelessOpImage
computesUniqueTiles, mapDestRect, mapSourceRect
 
Methods inherited from class javax.media.jai.OpImage
addTileToCache, cancelTiles, computeRect, computeRect, 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

VectorBinarizeOpImage

public VectorBinarizeOpImage(SampleModel sm,
                             Map configuration,
                             int minX,
                             int minY,
                             int width,
                             int height,
                             com.vividsolutions.jts.geom.prep.PreparedGeometry geom,
                             PixelCoordType coordType)
Constructor.

Parameters:
sm - the SampleModel used to create tiles
configuration - rendering hints
minX - origin X ordinate
minY - origin Y ordinate
width - image width
height - image height
geom - reference polygonal geometry
coordType - type of coordinates to use when testing pixel inclusion (corner or center)
Method Detail

computeTile

public Raster computeTile(int tileX,
                          int tileY)
Returns the specified tile.

Overrides:
computeTile in class javax.media.jai.SourcelessOpImage
Parameters:
tileX - tile X index
tileY - tile Y index
Returns:
the requested tile

getTileRaster

protected Raster getTileRaster(int minX,
                               int minY)
Gets the data for the requested tile. If the tile is either completely within or outside of the reference PreparedGeometry a cached constant Raster with 1 or 0 values is returned. Otherwise tile pixels are checked for inclusion and set individually.

Parameters:
minX - origin X ordinate
minY - origin Y ordinate
Returns:
the requested tile


Copyright © 2009-2011. All Rights Reserved.