Class InterpolationNearest

Object
Interpolation
InterpolationNearest
All Implemented Interfaces:
Serializable, InterpolationNoData

public class InterpolationNearest extends Interpolation implements InterpolationNoData
See Also:
  • Field Summary

    Fields inherited from class Interpolation

    INTERP_BICUBIC, INTERP_BICUBIC_2, INTERP_BILINEAR, INTERP_NEAREST
  • Constructor Summary

    Constructors
    Constructor
    Description
    InterpolationNearest(Range noDataRange, boolean useROIAccessor, double destinationNoData, int dataType)
    Simple interpolator object used for Nearest-Neighbor interpolation.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    double
    Return the destinationNoData value associated to the Interpolation Object
    Return NoData Range associated to the Interpolation object, if present.
    boolean
    Gets the useROIAccessor value associated to the Interpolation Object
    interpolate(RasterAccessor src, int bandIndex, int dnumband, int posx, int posy, Integer yROIValue, RasterAccessor roiAccessor, RandomIter roiIter, boolean setNoData)
     
    int
    interpolateBinary(int xNextBitNo, Number[] sourceData, int sourceYOffset, int sourceScanlineStride, int[] coordinates, int[] roiDataArray, int roiYOffset, int roiScanlineStride, RandomIter roiIter)
     
    double
    interpolateH(double[] samples, float arg1)
     
    float
    interpolateH(float[] samples, float arg1)
     
    int
    interpolateH(int[] samples, int arg1)
     
    void
    setDestinationNoData(double destinationNoData)
    Sets the destinationNoData value associated to the Interpolation Object
    void
    setNoDataRange(Range noDataRange)
    Set NoData Range associated to the Interpolation object.
    void
     
    void
    setUseROIAccessor(boolean useROIAccessor)
    Sets the useROIAccessor value associated to the Interpolation Object

    Methods inherited from class 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 Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • 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 Details

    • interpolateH

      public int interpolateH(int[] samples, int arg1)
      Specified by:
      interpolateH in class Interpolation
    • interpolateH

      public float interpolateH(float[] samples, float arg1)
      Specified by:
      interpolateH in class Interpolation
    • interpolateH

      public double interpolateH(double[] samples, float arg1)
      Specified by:
      interpolateH in class Interpolation
    • setROIBounds

      public void setROIBounds(Rectangle roiBounds)
    • 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
    • setDestinationNoData

      public void setDestinationNoData(double destinationNoData)
      Description copied from interface: InterpolationNoData
      Sets the destinationNoData value associated to the Interpolation Object
      Specified by:
      setDestinationNoData in interface InterpolationNoData
    • getUseROIAccessor

      public boolean getUseROIAccessor()
      Description copied from interface: InterpolationNoData
      Gets the useROIAccessor value associated to the Interpolation Object
      Specified by:
      getUseROIAccessor in interface InterpolationNoData
      Returns:
      useROIAccessor
    • setUseROIAccessor

      public void setUseROIAccessor(boolean useROIAccessor)
      Description copied from interface: InterpolationNoData
      Sets the useROIAccessor value associated to the Interpolation Object
      Specified by:
      setUseROIAccessor in interface InterpolationNoData
    • 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(RasterAccessor src, int bandIndex, int dnumband, int posx, int posy, Integer yROIValue, RasterAccessor roiAccessor, RandomIter roiIter, boolean setNoData)
    • interpolateBinary

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