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

Home » Public Forums » archive » Puzzled by colour tables...
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: Puzzled by colour tables... [message #7986 is a reply to message #7901] Tue, 28 January 1997 00:00 Go to previous messageGo to previous message
David Foster is currently offline  David Foster
Messages: 341
Registered: January 1996
Senior Member
Phil Williams wrote:

>
> BTW, anyone know the difference between table_size and n_colors? They
> seem to always be equal to each other.

Hard to tell from the discussion of !D in the IDL help. Seems the only
difference might be that you can use !D.TABLE_SIZE as a test to see
if there are ANY color indices available to modify. If TABLE_SIZE
is equal to zero, then you have a static color table (and presumably
N_COLORS might be nonzero, though this doesn't seem clear).

>
>> Oh, and would I be right at all in assuming that a routine to add
>> a 'colour bar' up the side of an image exists in a library or FAQ
>> somewhere? Seems like a common type of operation, anyone know where
>> I can lay my hands on something useful?
>> I reckon this would prove to be tricky to be honest and it seems like
>> re-inventing the wheel.
>
> David Fanning has one of these in his library of functions. I usually
> have an extra draw widget to the side of the main draw widget to display
> the color tables. Haven't had time to make it a compund widget, but the
> plan is there.
>

David:

If you want a simple widget routine that will let you modify
the color table, I can send you a copy of my ADJUST_COLORS.PRO,
which is just an expansion of the example in the IDL manual.
I find it pretty useful, and it's a good example of using
widget uvalues to store state information.

Included would be ADJUST_PALETTE.PRO (probably a misnomer) that
adjusts one color index using a function call.

Dave
--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
foster@bial1.ucsd.edu Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2200
La Jolla, CA 92037
[ UCSD Mail Code 0949 ]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: where help
Next Topic: Shaded circles request.

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

Current Time: Wed Oct 08 19:16:07 PDT 2025

Total time taken to generate the page: 0.00448 seconds