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

Home » Public Forums » archive » Re: 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
Re: ENVI does a dumb thing reading a TIFF file with a palette included [message #53817 is a reply to message #53805] Wed, 02 May 2007 13:09 Go to previous messageGo to previous message
Jeff N. is currently offline  Jeff N.
Messages: 120
Registered: April 2005
Senior Member
On May 2, 3:11 pm, Ed Hyer <ejh...@gmail.com> wrote:
> 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.

Wow! I had no idea that ENVI did this! I don't think it's a very good
way to do to handle tiff files either. I wonder though, if the reason
that ENVI does it this way has to do with how it isn't necessarily
easy (in my opinion) to load color tables in ENVI. Don't you actually
have to go to the preferences menu? And even then, you can only import
color tables from an ASCII file?

Jeff
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: structures, arrays of pointers and assignment
Next Topic: 3D registration

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

Current Time: Fri Oct 10 09:46:10 PDT 2025

Total time taken to generate the page: 0.24089 seconds