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

Home » Public Forums » archive » Color Tables for Use with Chromatek Glasses
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
Color Tables for Use with Chromatek Glasses [message #14270] Thu, 04 February 1999 00:00 Go to next message
ec is currently offline  ec
Messages: 2
Registered: October 1997
Junior Member
Does anyone have any experience with color tables for
use with Chromatek glasses? The glasses make an
image appear 3-D by making the blue appear further
away and the red closer. The trouble is that the
standard IDL color tables don't appear to scale
linearly with appearant depth. When I use Rainbow
for example, the depth appears very quantized and
not a nice continum. I tried building a color table
of my own for this with limited success.

Any advice or comments would be appreciated. If you
haven't played around with this I recommend that
you check out Chromatek's WWW site at
http://www.chromatek.com

Elaine.Chapin@jpl.nasa.gov
Re: Color tables [message #17996 is a reply to message #14270] Mon, 22 November 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Karsten Thiel (thiel@ph4.physik.uni-goettingen.de) writes:

> I'm facing a problem concerning the color tables. I would like to
> display a large array with some negativ
> values. Till now I'm doing this with TVSCL, but the information where
> the values are negativ is very important for me. So how are the
> pre-defined color tables defined? Which table is the best for my
> problem?

Well, Karsten, I hate to tell you, but NONE of the color
tables are best for your problem. And, in fact, if
colors *are* important to you (and they must be or you wouldn't
be writing) then you had better ditch TVSCL too. :-)

Let me give you an example. Suppose you have data in
a variable named "array". And suppose you would like to
see the positive values of the data in the Red Temperature
color table. But you would like to see the negative values
of your data in a yellow color.

Then you could do something like this. Let's suppose
you have 200 colors to use. Let's use 199 of them
for the Red Temperature color scale:

LoadCT, 3, NColors=199

Let's make the 200th color yellow:

TVLCT, 255, 255, 0, 199

Now, lets scale the data so that the positive
values lie in the data range 0 to 198. In other
words, they will be displayed in the Red Temperature
colors:

scaledData = BytScl(array, Min=0, Top=198)

Let's find out where our negative values are:

negvalues = Where( array LT 0, count)

Make the negative values yellow:

IF count GT 0 THEN scaledData[negvalues] = 199B

Now, have a look! :-)

TV, scaledData

It is always better to have some *plan* for using colors
than to just take whatever IDL seems to offer.

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: ALIGNING IN PLOT_3DBOX
Next Topic: At Last! A Subsititute for CW_Field.

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

Current Time: Wed Oct 08 18:13:54 PDT 2025

Total time taken to generate the page: 0.00574 seconds