Ding Wu <dwu@larry.cc.emory.edu> writes:
> Anyone knows how to display many color images simultaneously.
>
> Splitting the color table will badly damage the color, and almost
> impossible for many, say 20, images.
>
> I am thinking writing something using fixed the color table, using 256
> colors to approximate all the colors, then images pixels looking for its
> most close representations in the color table. It defenitely changes the
> colors of the image, just fools human's eyes.
I gave Ding a rather flippant suggestion about purchasing a 24-bit
graphic card in an earlier post, but Paul Sorenson sent me a
suggestion that had never occurred to me. (This is something
Paul has a knack for doing!) He suggested this might be accomplished
by using the COLOR_QUAN procedure with the CUBE keyword set.
Since I didn't even know the COLOR_QUAN procedure *had* a CUBE
keyword, I read up on it. This is a really good suggestion! But,
unfortunately, in the little example program I wrote below, I
am not too keen on the result. I think the problem is that the
COLOR_QUAN procedure cannot dither the resulting images
when it calculates the image values from the color cube. This
results in images that look "spotty" to me.
But I thought others might be interested in this novel approach.
I did the color table loading in the Z-buffer to take advantage of
its 256 colors
Thanks again to Paul.
David
***********************************
PRO EXAMPLE
image = BYTSCL(DIST(256), TOP=255)
thisDevice = !D.NAME
SET_PLOT, 'Z'
; Gray-scale Colors
LOADCT, 0
TVLCT, r, g, b, /GET
image1 = COLOR_QUAN(r(image), g(image), b(image), r, g, b, CUBE=6)
; Standard Gamma II Colors
LOADCT, 5
TVLCT, r, g, b, /GET
image2 = COLOR_QUAN(r(image), g(image), b(image), r, g, b, CUBE=6)
; Blue-Red Colors
LOADCT, 11
TVLCT, r, g, b, /GET
image3 = COLOR_QUAN(r(image), g(image), b(image), r, g, b, CUBE=6)
SET_PLOT, thisDevice
; Load the COLOR_QUAN colors.
TVLCT, r, g, b
WINDOW, 1, XSize=256, YSize=256
TV, BYTSCL(image1, TOP=215)
WINDOW, 2, XSize=256, YSize=256
TV, BYTSCL(image2, TOP=215)
WINDOW, 3, XSize=256, YSize=256
TV, BYTSCL(image3, TOP=215)
END
********************************************
-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
2642 Bradbury Court, Fort Collins, CO 80521
Phone: 970-221-0438 Fax: 970-221-4762
E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com
-----------------------------------------------------------
|