Class Visualization.InterpConvertOneBand

Enclosing class:
Visualization

private static final class Visualization.InterpConvertOneBand extends Visualization.InterpConvert
Same as Visualization.InterpConvert optimized for the single-band case. This class uses the more efficient MathTransform1D.transform(double) method.
  • Field Details

    • singleConverter

      private final org.opengis.referencing.operation.MathTransform1D singleConverter
      Conversion from floating point values to values to store as integers in the destination image.
  • Constructor Details

    • InterpConvertOneBand

      InterpConvertOneBand(Interpolation interpolation, org.opengis.referencing.operation.MathTransform1D converter)
      Creates a new object combining the given interpolation with the given conversion of sample values.
  • Method Details

    • interpolate

      public void interpolate(DoubleBuffer source, int numBands, double xfrac, double yfrac, double[] writeTo, int writeToOffset)
      Delegates to ResampledImage.interpolation, then convert sample values in all bands.
      Overrides:
      interpolate in class Visualization.InterpConvert
      Parameters:
      source - pixel values from the source image to use for interpolation.
      numBands - number of bands. This is the number of values to put in the writeTo array.
      xfrac - the X subsample position, usually (but not always) in the range [0 … 1).
      yfrac - the Y subsample position, usually (but not always) in the range [0 … 1).
      writeTo - the array where this method shall write interpolated values.
      writeToOffset - index of the first value to put in the writeTo array.