imageType = BufferedImage.TYPE_USHORT_GRAY;
}
}
else if( pi.GetType() == PhotometricInterpretation.PIType.PALETTE_COLOR )
{
LookupTable lut = input.GetLUT();
long rl = lut.GetLUTLength( LookupTable.LookupTableType.RED );
byte[] rbuf = new byte[ (int)rl ];
long rl2 = lut.GetLUT( LookupTable.LookupTableType.RED, rbuf );
assert rl == rl2;
long gl = lut.GetLUTLength( LookupTable.LookupTableType.GREEN );
byte[] gbuf = new byte[ (int)gl ];
long gl2 = lut.GetLUT( LookupTable.LookupTableType.GREEN, gbuf );
assert gl == gl2;
long bl = lut.GetLUTLength( LookupTable.LookupTableType.BLUE );
byte[] bbuf = new byte[ (int)bl ];
long bl2 = lut.GetLUT( LookupTable.LookupTableType.BLUE, bbuf );
assert bl == bl2;
colorModel = new IndexColorModel(8, (int)rl, rbuf, gbuf, bbuf);
// For code below
imageType = BufferedImage.TYPE_BYTE_GRAY;
}