Re: What's my colour table? [message #56897] |
Thu, 22 November 2007 11:56 |
mankoff
Messages: 131 Registered: March 2004
|
Senior Member |
|
|
On Nov 23, 6:07 am, Spon <christoph.b...@gmail.com> wrote:
> Hi guys,
>
> quick question: is there a system variable that stores the colour
> table that I've currently got loaded? So that I can, for example,
> store that number in a variable within a function, load a new colour
> table, and then load back the old one before I return back to the
> previous level? I can't find it in the helpfile if it's there.
>
> e.g.
>
> FUNCTION CTTEST, Data
>
> OldCT = !D.CT ; or whatever it's called
> CTLOAD, 0 ; load greyscale
> ; do something that requires greyscale
> S = SIZE (Data, /DIM)
> RoI = DEFROI (S[0], S[1])
>
> ; and grab back the old colour table
> CTLOAD, OldCT
> RETURN, RoI
> END
>
> Thanks,
> Chris
TVLCT, r,g,b,/GET ; save CT
do_something()
TVLCT, r,g,b ; restore
|
|
|