Class InterpolationBilinear
Object
Interpolation
InterpolationBilinear
- All Implemented Interfaces:
Serializable,InterpolationNoData
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault value for subsample bitsFields inherited from class Interpolation
INTERP_BICUBIC, INTERP_BICUBIC_2, INTERP_BILINEAR, INTERP_NEAREST -
Constructor Summary
ConstructorsConstructorDescriptionInterpolationBilinear(int subsampleBits, Range noDataRange, boolean useROIAccessor, double destinationNoData, int dataType) Simple interpolator object used for Bilinear interpolation. -
Method Summary
Modifier and TypeMethodDescriptionintcomputeValue(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 dataTypestatic NumbercomputeValueDouble(double s00, double s01, double s10, double s11, boolean w00z, boolean w01z, boolean w10z, boolean w11z, double xfrac, double yfrac, int dataType, double destinationNoData) intdoubleReturn the destinationNoData value associated to the Interpolation ObjectReturn NoData Range associated to the Interpolation object, if present.booleanGets the useROIAccessor value associated to the Interpolation Objectinterpolate(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.intinterpolateBinary(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.doubleinterpolateH(double[] arg0, float xfrac) floatinterpolateH(float[] arg0, float xfrac) intinterpolateH(int[] arg0, int xfrac) voidsetDestinationNoData(double destinationNoData) Sets the destinationNoData value associated to the Interpolation ObjectvoidsetNoDataRange(Range noDataRange) Set NoData Range associated to the Interpolation object.voidsetROIBounds(Rectangle roiBounds) voidsetUseROIAccessor(boolean useROIAccessor) Sets the useROIAccessor value associated to the Interpolation ObjectMethods 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
-
Field Details
-
DEFAULT_SUBSAMPLE_BITS
public static final int DEFAULT_SUBSAMPLE_BITSDefault 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:
interpolateHin classInterpolation
-
interpolateH
public float interpolateH(float[] arg0, float xfrac) - Specified by:
interpolateHin classInterpolation
-
interpolateH
public double interpolateH(double[] arg0, float xfrac) - Specified by:
interpolateHin classInterpolation
-
setROIBounds
-
getDestinationNoData
public double getDestinationNoData()Description copied from interface:InterpolationNoDataReturn the destinationNoData value associated to the Interpolation Object- Specified by:
getDestinationNoDatain interfaceInterpolationNoData- Returns:
- destinationNoData
-
setDestinationNoData
public void setDestinationNoData(double destinationNoData) Description copied from interface:InterpolationNoDataSets the destinationNoData value associated to the Interpolation Object- Specified by:
setDestinationNoDatain interfaceInterpolationNoData
-
getUseROIAccessor
public boolean getUseROIAccessor()Description copied from interface:InterpolationNoDataGets the useROIAccessor value associated to the Interpolation Object- Specified by:
getUseROIAccessorin interfaceInterpolationNoData- Returns:
- useROIAccessor
-
setUseROIAccessor
public void setUseROIAccessor(boolean useROIAccessor) Description copied from interface:InterpolationNoDataSets the useROIAccessor value associated to the Interpolation Object- Specified by:
setUseROIAccessorin interfaceInterpolationNoData
-
getNoDataRange
Description copied from interface:InterpolationNoDataReturn NoData Range associated to the Interpolation object, if present.- Specified by:
getNoDataRangein interfaceInterpolationNoData- Returns:
- NoData Range
-
setNoDataRange
Description copied from interface:InterpolationNoDataSet NoData Range associated to the Interpolation object.- Specified by:
setNoDataRangein interfaceInterpolationNoData
-
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)
-