it.geosolutions.jaiext.interpolators
Class InterpolationBilinear

java.lang.Object
  extended by javax.media.jai.Interpolation
      extended by it.geosolutions.jaiext.interpolators.InterpolationBilinear
All Implemented Interfaces:
InterpolationNoData, Serializable

public class InterpolationBilinear
extends javax.media.jai.Interpolation
implements InterpolationNoData

See Also:
Serialized Form

Field Summary
static int DEFAULT_SUBSAMPLE_BITS
          Default value for subsample bits
 
Fields inherited from class javax.media.jai.Interpolation
bottomPadding, height, INTERP_BICUBIC, INTERP_BICUBIC_2, INTERP_BILINEAR, INTERP_NEAREST, leftPadding, rightPadding, subsampleBitsH, subsampleBitsV, topPadding, width
 
Constructor Summary
InterpolationBilinear(int subsampleBits, Range noDataRange, boolean useROIAccessor, double destinationNoData, int dataType)
          Simple interpolator object used for Bilinear interpolation.
 
Method Summary
 int getDataType()
           
 double getDestinationNoData()
          Return the destinationNoData value associated to the Interpolation Object
 Range getNoDataRange()
          Return NoData Range associated to the Interpolation object, if present.
 Number interpolate(javax.media.jai.RasterAccessor src, int bandIndex, int dnumbands, int posX, int posY, Number[] fracValues, Integer yValueROI, javax.media.jai.RasterAccessor roi, boolean setNoData)
          This method performs a bilinear interpolation of a pixel inside a not-Binary image.
 int interpolateBinary(int xNextBitNo, Number[] sourceData, int xfrac, int yfrac, int sourceYOffset, int sourceScanlineStride, int[] coordinates, int[] roiDataArray, int roiYOffset, int roiScanlineStride)
          This method performs a bilinear interpolation of a pixel inside a binary image.
 double interpolateH(double[] arg0, float xfrac)
           
 float interpolateH(float[] arg0, float xfrac)
           
 int interpolateH(int[] arg0, int xfrac)
           
 void setNoDataRange(Range noDataRange)
          Set NoData Range associated to the Interpolation object.
 void setROIdata(Rectangle roiBounds, javax.media.jai.iterator.RandomIter roiIter)
           
 
Methods inherited from class javax.media.jai.Interpolation
getBottomPadding, getHeight, getInstance, getLeftPadding, getRightPadding, getSubsampleBitsH, getSubsampleBitsV, getTopPadding, getWidth, interpolate, interpolate, interpolate, interpolate, interpolate, interpolate, interpolate, interpolate, interpolate, interpolateH, interpolateH, interpolateH, interpolateH, interpolateH, interpolateH, interpolateV, interpolateV, interpolateV, interpolateV, interpolateV, interpolateV, interpolateV, interpolateV, interpolateV, isSeparable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SUBSAMPLE_BITS

public static final int DEFAULT_SUBSAMPLE_BITS
Default value for subsample bits

See Also:
Constant Field Values
Constructor Detail

InterpolationBilinear

public InterpolationBilinear(int subsampleBits,
                             Range noDataRange,
                             boolean useROIAccessor,
                             double destinationNoData,
                             int dataType)
Simple interpolator object used for Bilinear interpolation. On construction it is possible to set a range for no data values that will be considered in the interpolation method.

Method Detail

interpolateH

public int interpolateH(int[] arg0,
                        int xfrac)
Specified by:
interpolateH in class javax.media.jai.Interpolation

interpolateH

public float interpolateH(float[] arg0,
                          float xfrac)
Specified by:
interpolateH in class javax.media.jai.Interpolation

interpolateH

public double interpolateH(double[] arg0,
                           float xfrac)
Specified by:
interpolateH in class javax.media.jai.Interpolation

setROIdata

public void setROIdata(Rectangle roiBounds,
                       javax.media.jai.iterator.RandomIter roiIter)

getDestinationNoData

public double getDestinationNoData()
Description copied from interface: InterpolationNoData
Return the destinationNoData value associated to the Interpolation Object

Specified by:
getDestinationNoData in interface InterpolationNoData
Returns:
destinationNoData

getNoDataRange

public Range getNoDataRange()
Description copied from interface: InterpolationNoData
Return NoData Range associated to the Interpolation object, if present.

Specified by:
getNoDataRange in interface InterpolationNoData
Returns:
NoData Range

setNoDataRange

public void setNoDataRange(Range noDataRange)
Description copied from interface: InterpolationNoData
Set NoData Range associated to the Interpolation object.

Specified by:
setNoDataRange in interface InterpolationNoData

getDataType

public int getDataType()

interpolate

public Number interpolate(javax.media.jai.RasterAccessor src,
                          int bandIndex,
                          int dnumbands,
                          int posX,
                          int posY,
                          Number[] fracValues,
                          Integer yValueROI,
                          javax.media.jai.RasterAccessor roi,
                          boolean setNoData)
This method performs a bilinear interpolation of a pixel inside a not-Binary image.


interpolateBinary

public int interpolateBinary(int xNextBitNo,
                             Number[] sourceData,
                             int xfrac,
                             int yfrac,
                             int sourceYOffset,
                             int sourceScanlineStride,
                             int[] coordinates,
                             int[] roiDataArray,
                             int roiYOffset,
                             int roiScanlineStride)
This method performs a bilinear interpolation of a pixel inside a binary image.



Copyright © 2006–2014 GeoSolutions. All rights reserved.