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

Home » Public Forums » archive » Re: color table trouble
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: color table trouble [message #14877] Fri, 02 April 1999 00:00
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Phil Aldis (philaldis@geocities.com) comes right to the point when he writes:

> I seem to remember someone saying a few days ago that he would be posting
> less messages to the group. Now we find David is so bored that he's answering
> his own posts!!
>
> Does this boredom have anything to do with the latest book? How's it coming
> along?

Don't EVEN ask! Staring at a blank computer screen must be
like coming face to face with a black hole: it sucks the
wits right out of you. :-(

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: color table trouble [message #14884 is a reply to message #14877] Fri, 02 April 1999 00:00 Go to previous message
Phil Aldis is currently offline  Phil Aldis
Messages: 11
Registered: February 1999
Junior Member
I seem to remember someone saying a few days ago that he would be posting
less messages to the group. Now we find David is so bored that he's answering
his own posts!!

Does this boredom have anything to do with the latest book? How's it coming
along?

Phil

P.S. Glad to hear that Tri has made a wise investment

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Re: color table trouble [message #14886 is a reply to message #14877] Fri, 02 April 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
David Fanning (davidf@dfanning.com) writes:

> So if I
> want to write code that *always* works in *every*
> environment (and who among us doesn't?) then I have
> to wrap EVERY single TV command with something like
> this:
>
> CASE StrUpCase(!D.Name) OF
> 'WIN' : Device, Decomposed=1
> 'MAC' : Device, Decomposed=1
> 'X' : Device, Decomposed=1
> ELSE:
> ENDCASE
> TV, image24, TRUE=1
>
> Even at $100/hour I find it hard to type that much code
> each time I want to display an image. :-(

Kind of makes you want to download TVImage, which has just
had this functionality added to it, doesn't it. :-)

http://www.dfanning.com/programs/tvimage.pro

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: color table trouble [message #14887 is a reply to message #14877] Fri, 02 April 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Well, I'm full of ideas today... :-)

I wrote just a moment ago:

> But here is the real kicker reason for me: if I
> *care* about displaying my 24-bit images correctly
> (and color decomposition really only makes sense
> if I have 24-bit images, it seems to me) then--as
> I posted last week--I HAVE to set the DECOMPOSED
> keyword anyway:
>
> Device, Decomposed=1
> TV, image24
>
> If I don't do this, then I run the risk that my
> image will not be displayed properly, since with
> color decomposition off, ALL values, even those in
> 24-bit image values, are run through the color table.

Even this is not the whole story, because--of course--
the DECOMPOSED keyword is not an allowed keyword for
any graphics device EXCEPT X, Win, and Mac. So if I
want to write code that *always* works in *every*
environment (and who among us doesn't?) then I have
to wrap EVERY single TV command with something like
this:

CASE StrUpCase(!D.Name) OF
'WIN' : Device, Decomposed=1
'MAC' : Device, Decomposed=1
'X' : Device, Decomposed=1
ELSE:
ENDCASE
TV, image24, TRUE=1

Even at $100/hour I find it hard to type that much code
each time I want to display an image. :-(

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: color table trouble [message #14888 is a reply to message #14877] Fri, 02 April 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
I wrote (rather too flippantly) just a moment ago:

> I know, I know. I'm a sucker for these color questions, but I
> LOVE this question!
>
> IDL> Device, Decomposed=0

Here is a modest proposal for RSI. Why not turn color
decomposition OFF by default. Then people like
Gary won't get confused and I won't have to answer
this question 10 times a week (multiplied by the
number of technical support engineers at RSI).

But here is the real kicker reason for me: if I
*care* about displaying my 24-bit images correctly
(and color decomposition really only makes sense
if I have 24-bit images, it seems to me) then--as
I posted last week--I HAVE to set the DECOMPOSED
keyword anyway:

Device, Decomposed=1
TV, image24

If I don't do this, then I run the risk that my
image will not be displayed properly, since with
color decomposition off, ALL values, even those in
24-bit image values, are run through the color table.

I understand the argument that if people have
24-bit hardware they expect it to behave like 24-bit
hardware, but the reality for the vast majority of
IDL users, I feel sure, is that color decomposition
is something they can safely put off learning for
many more months and years to come. There is just
way too much code out there (including much of the
code supplied with IDL) that forces us to think
in an undecomposed color way.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: color table trouble [message #14889 is a reply to message #14877] Fri, 02 April 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Gary (gbust@arlut.utexas.edu) writes:

> I have had a problem crop up on my IDL 5.1 on my Sun Ultra 30, that has me
> very perplexed. I am guessing that somehow I have mis-set a resource or
> something, but it is beyond me.
>
> I run idlde. I try to do a contour with something like:
> contour,dist(400),nlevels=20,/fill
>
> And I do not get a range of colors - I always have two colors - seemingly a
> light blue and white, or a red and black.
>
> I can do loadct, 13 for example, and nothing changes at all.
>
> Ok, so I tried tvlct,r,g,b,/get tvscl, dist(400) and now I have all
> my colors just fine. However if I try the contour as above I still do not
> have the colors.
>
> Now, say I load the Demo. And I run something that displays an image - like
> in the filtering section. And then I change the color map. Then exit the
> demo.
>
> Now, my contours are just fine.
>
> I am at a total loss.

I know, I know. I'm a sucker for these color questions, but I
LOVE this question!

IDL> Device, Decomposed=0

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Object-based slicer
Next Topic: Postscript output

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

Current Time: Wed Oct 08 18:41:53 PDT 2025

Total time taken to generate the page: 0.00726 seconds