ENVI does a dumb thing reading a TIFF file with a palette included [message #53829] |
Wed, 02 May 2007 12:11 |
MarioIncandenza
Messages: 231 Registered: February 2005
|
Senior Member |
|
|
Hello IDL Wizards,
I apologize for the offtopic post, but maybe someone here knows an
ENVI trick I am missing. I have an XY array of data, category data
with values from 0-16 + 254=NODATA. I have a color table ginned up
specifically to display this data. I write a TIFF file, like so:
tvlct,r,g,b,/get ; load palette values from color table
write_tiff,filename,image,r=r,g=g,b=b
This operation works perfectly in reverse-- in IDL.
When I open the TIFF file in ENVI, it tells me I have three image
planes: r,g,b. So an XY Location that should have a value of [2]
instead has a value of [255,0,0] = color mapping for category '2'. All
ENVI functions I tested (statistics, histograms, slices) seem to deal
only with the RGB levels.
Does anyone know how I can get at the actual data in the file
[0-16+254] from inside ENVI? I prefer to include the palette in the
TIFF because otherwise it's ugly, but right now it seems I can't have
both in ENVI.
Ideas welcome,
--Edward H.
|
|
|