it.geosolutions.jaiext.iterators
Class RandomIterFactory

java.lang.Object
  extended by it.geosolutions.jaiext.iterators.RandomIterFactory

public class RandomIterFactory
extends Object

A factory class to instantiate instances of the RandomIter and WritableRandomIter interfaces on sources of type Raster, RenderedImage, and WritableRenderedImage.

See Also:
RandomIter, WritableRandomIter

Method Summary
static javax.media.jai.iterator.RandomIter create(Raster ras, Rectangle bounds, boolean cachedTiles, boolean arrayCalculation)
          Constructs and returns an instance of RandomIter suitable for iterating over the given bounding rectangle within the given Raster source.
static javax.media.jai.iterator.RandomIter create(RenderedImage im, Rectangle bounds, boolean cachedTiles, boolean arrayCalculation)
          Constructs and returns an instance of RandomIter suitable for iterating over the given bounding rectangle within the given RenderedImage source.
static javax.media.jai.iterator.WritableRandomIter createWritable(WritableRaster ras, Rectangle bounds)
          Constructs and returns an instance of WritableRandomIter suitable for iterating over the given bounding rectangle within the given WritableRaster source.
static javax.media.jai.iterator.WritableRandomIter createWritable(WritableRenderedImage im, Rectangle bounds)
          Constructs and returns an instance of WritableRandomIter suitable for iterating over the given bounding rectangle within the given WritableRenderedImage source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static javax.media.jai.iterator.RandomIter create(RenderedImage im,
                                                         Rectangle bounds,
                                                         boolean cachedTiles,
                                                         boolean arrayCalculation)
Constructs and returns an instance of RandomIter suitable for iterating over the given bounding rectangle within the given RenderedImage source. If the bounds parameter is null, the entire image will be used. If cachedTiles is set to true, the current tile used by the iterator is cached. If arrayCalculation is set to true an initial array containing the tile position for every pixel is calculated.

Parameters:
im - a read-only RenderedImage source.
bounds - the bounding Rectangle for the iterator, or null.
cachedTiles - flag indicating if tiles must be cached during iteration.
arrayCalculation - flag indicating if tile positions must be pre-calculated.
Returns:
a RandomIter allowing read-only access to the source.

create

public static javax.media.jai.iterator.RandomIter create(Raster ras,
                                                         Rectangle bounds,
                                                         boolean cachedTiles,
                                                         boolean arrayCalculation)
Constructs and returns an instance of RandomIter suitable for iterating over the given bounding rectangle within the given Raster source. If the bounds parameter is null, the entire Raster will be used. If cachedTiles is set to true, the current tile used by the iterator is cached. If arrayCalculation is set to true an initial array containing the tile position for every pixel is calculated.

Parameters:
ras - a read-only Raster source.
bounds - the bounding Rectangle for the iterator, or null.
cachedTiles - flag indicating if tiles must be cached during iteration.
arrayCalculation - flag indicating if tile positions must be pre-calculated.
Returns:
a RandomIter allowing read-only access to the source.

createWritable

public static javax.media.jai.iterator.WritableRandomIter createWritable(WritableRenderedImage im,
                                                                         Rectangle bounds)
Constructs and returns an instance of WritableRandomIter suitable for iterating over the given bounding rectangle within the given WritableRenderedImage source. If the bounds parameter is null, the entire image will be used.

Parameters:
im - a WritableRenderedImage source.
bounds - the bounding Rectangle for the iterator, or null.
Returns:
a WritableRandomIter allowing read/write access to the source.

createWritable

public static javax.media.jai.iterator.WritableRandomIter createWritable(WritableRaster ras,
                                                                         Rectangle bounds)
Constructs and returns an instance of WritableRandomIter suitable for iterating over the given bounding rectangle within the given WritableRaster source. If the bounds parameter is null, the entire Raster will be used.

Parameters:
ras - a WritableRaster source.
bounds - the bounding Rectangle for the iterator, or null.
Returns:
a WritableRandomIter allowing read/write access to the source.


Copyright © 2006–2015 GeoSolutions. All rights reserved.