Re: Color changing dialog [message #15590] |
Fri, 28 May 1999 00:00  |
David Foster
Messages: 341 Registered: January 1996
|
Senior Member |
|
|
Tri VU KHAC wrote:
>
> Hi all,
>
> I write a little application which needs a color table in which two (or
> more) IDL's color tables are as the following description:
>
> Saying my color table has 256 color
> myCT[0 : n-1] = CompressCT(IDLCT1, n) ; linear
> compression of IDL's N-element color table into n-element color table (n
> <= 255)
> myCT[n : 255] = CompressCT(IDLCT2, 256-n) ; linear compression of
> IDL's N-element color table into (256-n)-element color table
>
> Does anyone implement this procedure or know where I can get it. If you
> have sth like XLoadCT of IDL, this' excellent !
> Thanks for help.
> Tri.
Tri -
Are you asking for something like the CompressCT() routine? You could
just use the INTERPOLATE() function to do this.
It looks like you are creating a split color-table, so you might want
to check out my GRAYSCALE.PRO routine that can do this. At present
it will make half the scale a linear gray-scale, like you are using,
and the other half will be a single-color scale (eg. gradations of
yellow or some other color). You could easily modify this to make both
halves gray-scales. This routine can also split the color table
into thirds. It is a modal widget, and allows you to adjust both
halves interactively (and simultaneously, this could be expanded
to allow independent adjustments) using sliders.
You can get this from:
ftp://bial8.ucsd.edu/pub/software/idl/share
Dave Foster
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
|
|
|