it.geosolutions.jaiext.iterators
Class RandomIterFallbackInt

java.lang.Object
  extended by it.geosolutions.jaiext.iterators.RandomIterFallbackInt
All Implemented Interfaces:
javax.media.jai.iterator.RandomIter

public class RandomIterFallbackInt
extends Object
implements javax.media.jai.iterator.RandomIter

Slight modified version of JAI RandomIterFallbackNoCacheNoArray that uses int vectors to handle indexes. It is useful when we have so many tiles that we cannot actually use byte indexes.

Author:
Simone Giannecchini, GeoSolutions SAS

Field Summary
protected  Rectangle boundsRect
           
protected  int boundsX
           
protected  int boundsY
           
protected  DataBuffer dataBuffer
           
protected  RenderedImage im
           
protected  SampleModel sampleModel
           
protected  int sampleModelTranslateX
           
protected  int sampleModelTranslateY
           
protected  int xID
           
protected  int[] xTiles
           
protected  int yID
           
protected  int[] yTiles
           
 
Constructor Summary
RandomIterFallbackInt(RenderedImage im, Rectangle bounds)
           
 
Method Summary
 void done()
           
 double[] getPixel(int x, int y, double[] dArray)
           
 float[] getPixel(int x, int y, float[] fArray)
           
 int[] getPixel(int x, int y, int[] iArray)
           
 int getSample(int x, int y, int b)
           
 double getSampleDouble(int x, int y, int b)
           
 float getSampleFloat(int x, int y, int b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

im

protected RenderedImage im

boundsRect

protected Rectangle boundsRect

sampleModel

protected SampleModel sampleModel

xID

protected int xID

yID

protected int yID

sampleModelTranslateX

protected int sampleModelTranslateX

sampleModelTranslateY

protected int sampleModelTranslateY

dataBuffer

protected DataBuffer dataBuffer

boundsX

protected int boundsX

boundsY

protected int boundsY

xTiles

protected int[] xTiles

yTiles

protected int[] yTiles
Constructor Detail

RandomIterFallbackInt

public RandomIterFallbackInt(RenderedImage im,
                             Rectangle bounds)
Method Detail

getSample

public int getSample(int x,
                     int y,
                     int b)
Specified by:
getSample in interface javax.media.jai.iterator.RandomIter

getSampleFloat

public float getSampleFloat(int x,
                            int y,
                            int b)
Specified by:
getSampleFloat in interface javax.media.jai.iterator.RandomIter

getSampleDouble

public double getSampleDouble(int x,
                              int y,
                              int b)
Specified by:
getSampleDouble in interface javax.media.jai.iterator.RandomIter

getPixel

public int[] getPixel(int x,
                      int y,
                      int[] iArray)
Specified by:
getPixel in interface javax.media.jai.iterator.RandomIter

getPixel

public float[] getPixel(int x,
                        int y,
                        float[] fArray)
Specified by:
getPixel in interface javax.media.jai.iterator.RandomIter

getPixel

public double[] getPixel(int x,
                         int y,
                         double[] dArray)
Specified by:
getPixel in interface javax.media.jai.iterator.RandomIter

done

public void done()
Specified by:
done in interface javax.media.jai.iterator.RandomIter


Copyright © 2006–2015 GeoSolutions. All rights reserved.