Class InterpolationBilinear

Object
Interpolation
InterpolationBilinear
All Implemented Interfaces:
Serializable, InterpolationNoData

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

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Default value for subsample bits

    Fields inherited from class Interpolation

    INTERP_BICUBIC, INTERP_BICUBIC_2, INTERP_BILINEAR, INTERP_NEAREST
  • Constructor Summary

    Constructors
    Constructor
    Description
    InterpolationBilinear(int subsampleBits, Range noDataRange, boolean useROIAccessor, double destinationNoData, int dataType)
    Simple interpolator object used for Bilinear interpolation.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    computeValue(int s00, int s01, int s10, int s11, int w00, int w01, int w10, int w11, int xfrac, int yfrac)
    Calculates bilinear interpolation for byte, short/ushort, integer dataType
    static Number
    computeValueDouble(double s00, double s01, double s10, double s11, boolean w00z, boolean w01z, boolean w10z, boolean w11z, double xfrac, double yfrac, int dataType, double destinationNoData)
     
    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 dnumbands, int posX, int posY, Number[] fracValues, Integer yValueROI, RasterAccessor roi, RandomIter roiIter, 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, RandomIter roiIter)
    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
    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
  • Field Details

    • DEFAULT_SUBSAMPLE_BITS

      public static final int DEFAULT_SUBSAMPLE_BITS
      Default value for subsample bits
      See Also:
  • Constructor Details

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

    • interpolateH

      public int interpolateH(int[] arg0, int xfrac)
      Specified by:
      interpolateH in class Interpolation
    • interpolateH

      public float interpolateH(float[] arg0, float xfrac)
      Specified by:
      interpolateH in class Interpolation
    • interpolateH

      public double interpolateH(double[] arg0, float xfrac)
      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 dnumbands, int posX, int posY, Number[] fracValues, Integer yValueROI, RasterAccessor roi, RandomIter roiIter, 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, RandomIter roiIter)
      This method performs a bilinear interpolation of a pixel inside a binary image.
    • computeValue

      public int computeValue(int s00, int s01, int s10, int s11, int w00, int w01, int w10, int w11, int xfrac, int yfrac)
      Calculates bilinear interpolation for byte, short/ushort, integer dataType
    • computeValueDouble

      public static Number computeValueDouble(double s00, double s01, double s10, double s11, boolean w00z, boolean w01z, boolean w10z, boolean w11z, double xfrac, double yfrac, int dataType, double destinationNoData)