it.geosolutions.jaiext.iterators
Class RandomIterFallbackShort

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

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

Slight modified version of JAI RandomIterFallbackNoCacheNoArray that uses short vectors to handle indexes rather than int vector. This way we use 2x2 times less memory in the iterator

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  short[] xTiles
           
protected  int yID
           
protected  short[] yTiles
           
 
Constructor Summary
RandomIterFallbackShort(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 short[] xTiles

yTiles

protected short[] yTiles
Constructor Detail

RandomIterFallbackShort

public RandomIterFallbackShort(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–2014 GeoSolutions. All rights reserved.