/** * Get the Bilinear Interpolation coverage data value * * @param offsetX * x source pixel offset * @param offsetY * y source pixel offset * @param minX * min x value * @param maxX * max x value * @param minY * min y value * @param maxY * max y value * @param values * 2 x 2 coverage data values as [y][x] * @return coverage data value */ protected Double getBilinearInterpolationValue(float offsetX, float offsetY, float minX, float maxX, float minY, float maxY, Double[][] values) { Double value = null; if (values != null) { value = getBilinearInterpolationValue(offsetX, offsetY, minX, maxX, minY, maxY, values[0][0], values[0][1], values[1][0], values[1][1]); } return value; }
/** * Get the Bilinear Interpolation coverage data value * * @param sourcePixelX * source pixel x * @param sourcePixelY * source pixel y * @param values * 2 x 2 coverage data values as [y][x] * @return coverage data value */ protected Double getBilinearInterpolationValue( CoverageDataSourcePixel sourcePixelX, CoverageDataSourcePixel sourcePixelY, Double[][] values) { return getBilinearInterpolationValue(sourcePixelX.getOffset(), sourcePixelY.getOffset(), sourcePixelX.getMin(), sourcePixelX.getMax(), sourcePixelY.getMin(), sourcePixelY.getMax(), values); }
value = getBilinearInterpolationValue(sourcePixelX, sourcePixelY, values);