コード例 #1
0
  /** 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)];
      }
    }
  }
コード例 #2
0
 private void computeRectByte(Raster[] sources, WritableRaster dest, Rectangle destRect) {
   lut.lookup(sources[0], dest, destRect);
 }