|
Re: How to get the current color table number? [message #47328 is a reply to message #47327] |
Thu, 02 February 2006 14:51  |
Michael Wallace
Messages: 409 Registered: December 2003
|
Senior Member |
|
|
b_efremova@yahoo.com wrote:
> Hi there,
> Is there something like a GET keyword to the LOADCT command? (I didn't
> find one, and I need to get the number of the current loaded ct in
> order to be able to return to it later.)
> Cheers
> Boryana
tvlct, r, g, b, /get
This actually returns the color vectors rather than the color table
number. To return to the color table, just issue the same command sans
the /get flag.
-Mike
|
|
|
Re: How to get the current color table number? [message #47329 is a reply to message #47328] |
Thu, 02 February 2006 14:48  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
b_efremova@yahoo.com writes:
> Is there something like a GET keyword to the LOADCT command? (I didn't
> find one, and I need to get the number of the current loaded ct in
> order to be able to return to it later.)
A search of the archives of this newsgroup will soon reveal
that there is nothing whatsoever like this, and that, in
fact, a number is about the least useful thing you can
have with respect to colors in a color table. :-)
If you want the colors to be right, load your color table
and save the *color vectors*:
Loadct,5
TVLCT, r, g, b, /Get
Then, later, to return to the colors:
TVLCT, r, g, b
If you *have* to know the number, save that, too. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|