/** Transform the colormap according to the rescaling parameters. */ protected void transformColormap(byte[][] colormap) { byte byteTable[][] = lut.getByteData(); for (int b = 0; b < 3; b++) { byte[] map = colormap[b]; byte[] luTable = byteTable[b >= byteTable.length ? 0 : b]; int mapSize = map.length; for (int i = 0; i < mapSize; i++) { map[i] = luTable[(map[i] & 0xFF)]; } } }
private void computeRectByte(Raster[] sources, WritableRaster dest, Rectangle destRect) { lut.lookup(sources[0], dest, destRect); }