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

Home » Public Forums » archive » Colors Common Block?
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: Colors Common Block? [message #12608 is a reply to message #12540] Mon, 24 August 1998 00:00 Go to previous message
David Foster is currently offline  David Foster
Messages: 341
Registered: January 1996
Senior Member
Dirk Fabian wrote:
>
> A question about color tables:
>
> I want a simple inverted black and white color table, and i define it
> with red, green, and blue arrays that all run from 255 to 0. Then i load
> them in with
>
> tvlct,red,green,blue
>
> No problem. BUT, now I want to play with the stretch and gamma correction
> for this new color table just like with xloadct.
>
> The functions gamma_ct and stretch seem to be designed for this, but they
> always remove my color table and re-establish the old black and white.
> Adding the /Current keyword doesn't help.

Dirk -

Welcome to the weird and wacky world of the COLORS common block!
Seems like a strange implementation to me, IMHO.

Try defining this common block in your code (at the level of your
stretch() call) and define the first 3 variables in this block:

common colors cr, cg, cb, curr, curg, curb
.
.
.
r=reverse(indgen(255))
g=r
b=r
tvlct, r,g,b
cr = r
cg = g
cb = b

; Now stretch() should use your "current" color-table!

Hope this helps.

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 2240
La Jolla, CA 92037
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
[Message index]
 
Read Message
Read Message
Previous Topic: REPEAT BEGIN turns into & END... why?
Next Topic: Call_External and Re-Compiling C programs

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

Current Time: Mon Dec 01 09:16:48 PST 2025

Total time taken to generate the page: 0.47798 seconds