ReinterpretOpImage extends PointOpImage { private void rescaleUInt(UnpackedImageData sourcePixels, UnpackedImageData targetPixels, Rectangle targetRectangle) { final int sourceLineStride = sourcePixels.lineStride; final int sourcePixelStride = sourcePixels.pixelStride; final int[] sourceData = sourcePixels.getIntData(0); final int targetLineStride = targetPixels.lineStride; final int targetPixelStride = targetPixels.pixelStride; final double[] targetData = targetPixels.getDoubleData(0); final int w = targetRectangle.width; final int h = targetRectangle.height; int sourceLineOffset = sourcePixels.bandOffsets[0]; int targetLineOffset = targetPixels.bandOffsets[0]; if (scalingTransform != null) { ScalingTransform st = this.scalingTransform; for (int y = 0; y < h; y++) { int sourcePixelOffset = sourceLineOffset; sourceLineOffset += sourceLineStride; int targetPixelOffset = targetLineOffset; targetLineOffset += targetLineStride; for (int x = 0; x < w; x++) { final double v = sourceData[sourcePixelOffset] & 0xFFFFFFFFL; targetData[targetPixelOffset] = st.transform(factor * v + offset); sourcePixelOffset += sourcePixelStride; targetPixelOffset += targetPixelStride; } } } else { for (int y = 0; y < h; y++) { int sourcePixelOffset = sourceLineOffset; sourceLineOffset += sourceLineStride; int targetPixelOffset = targetLineOffset; targetLineOffset += targetLineStride; for (int x = 0; x < w; x++) { final double v = sourceData[sourcePixelOffset] & 0xFFFFFFFFL; targetData[targetPixelOffset] = factor * v + offset; sourcePixelOffset += sourcePixelStride; targetPixelOffset += targetPixelStride; } } } } private  ReinterpretOpImage(RenderedImage source, ImageLayout imageLayout, Map<Object, Object> config,
                               double factor, double offset, ScalingType scalingType,
                               InterpretationType interpretationType);   }
@Test public void testRescaleUInt() { testRescale(new Integer[]{-1}, 11.0, 1.0, LINEAR, INTERPRET_INT_UNSIGNED, DataBuffer.TYPE_DOUBLE, (((long) 1 << 32) - 1) * 11.0 + 1.0); }