it.geosolutions.jaiext.interpolators
Class InterpolationNearest

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

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

See Also:
Serialized Form

Field Summary
 
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
InterpolationNearest(Range noDataRange, boolean useROIAccessor, double destinationNoData, int dataType)
          Simple interpolator object used for Nearest-Neighbor 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 dnumband, int posx, int posy, Integer yROIValue, javax.media.jai.RasterAccessor roiAccessor, boolean setNoData)
           
 int interpolateBinary(int xNextBitNo, Number[] sourceData, int sourceYOffset, int sourceScanlineStride, int[] coordinates, int[] roiDataArray, int roiYOffset, int roiScanlineStride)
           
 double interpolateH(double[] samples, float arg1)
           
 float interpolateH(float[] samples, float arg1)
           
 int interpolateH(int[] samples, int arg1)
           
 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
 

Constructor Detail

InterpolationNearest

public InterpolationNearest(Range noDataRange,
                            boolean useROIAccessor,
                            double destinationNoData,
                            int dataType)
Simple interpolator object used for Nearest-Neighbor 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[] samples,
                        int arg1)
Specified by:
interpolateH in class javax.media.jai.Interpolation

interpolateH

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

interpolateH

public double interpolateH(double[] samples,
                           float arg1)
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 dnumband,
                          int posx,
                          int posy,
                          Integer yROIValue,
                          javax.media.jai.RasterAccessor roiAccessor,
                          boolean setNoData)

interpolateBinary

public int interpolateBinary(int xNextBitNo,
                             Number[] sourceData,
                             int sourceYOffset,
                             int sourceScanlineStride,
                             int[] coordinates,
                             int[] roiDataArray,
                             int roiYOffset,
                             int roiScanlineStride)


Copyright © 2006–2014 GeoSolutions. All rights reserved.