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 #53805] Thu, 03 May 2007 07:00 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Ed Hyer writes:

> I hesitate to use the term "bug", but what
> ENVI is doing here is at best a poor choice. ENVI has its own
> (somewhat clunky) color table functionality, why can't it load the
> palette as a palette? Am I wrong to think this is how ENVI "should"
> treat TIFF files?

Oh, oh. This post touched a nerve. I've heard this morning
from someone who should know that the reason ENVI treats
TIFF images this way goes back to the origins of ENVI
in the good ol' 8-bit display days, when you had perhaps
200 colors available for EVERYTHING, including all the
colors ENVI needed for it's own use. A TIFF file with a
256 color palette would completely overwhelm the system,
so the decision was make to decompose the image to a 24-bit
image (in the manner I showed yesterday), then COLOR_QUAN
that into some acceptable number of colors. (And I learned
that COLOR_QUAN was written by David Stern for *exactly*
this purpose!)

Of course, this is not the way things are done now, and
the new ENVI Zoom Display, which is written in object graphics,
treats one band images with lookup tables as just exactly
that.

Here is a suggestion for how you can get what you want
now. Output your single band as a flat binary file and
make the associated ENVI header file (*.hdr) with a file
type "ENVI Classification". Give the number of "classes"
and the "lookup" values for the class colors, and bingo,
there you go. (You can even open the flat binary file
and use ENVI's Edit Header tool to enter the classes.)

Hope that helps. Rest assured your complaints have been
heard! :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[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 11:23:23 PDT 2025

Total time taken to generate the page: 0.95932 seconds