comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » ENVI does a dumb thing reading a TIFF file with a palette included
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
ENVI does a dumb thing reading a TIFF file with a palette included [message #53829] Wed, 02 May 2007 12:11
MarioIncandenza is currently offline  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.
[Message index]
 
Read Message
Previous Topic: Work-around for the Shortcomings of Widget_Tab
Next Topic: contour over a map and 180 degrees off or problems with dateline

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 06:24:16 PDT 2025

Total time taken to generate the page: 1.60234 seconds