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

Home » Public Forums » archive » Re: IDL and 24 Bits--help + added question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: IDL and 24 Bits--help + added question [message #2208] Wed, 22 June 1994 08:16 Go to next message
grunes is currently offline  grunes
Messages: 68
Registered: September 1993
Member
RSI's David Stern pointed out to me and others than IDL has a built
in function (COLOR_QUAN) that allows the display of 24 bit color on
8 bit color displays.

One minor warning: it was a recent addition to IDL.

That means that PV-Wave does not possess it. At least not in the
versions we use--perhaps it has been added?

I try to keep my code portable between IDL and PV-Wave
because I primarally use IDL/PV-Wave as a semi-portable graphics and
image interface among PC's and a variety of Unix boxes, which have
various IDL or PV-Wave versions installed.

Of course, I could always install the free trial version of IDL, but
its limitations (no file output, except stuff like postscript, no
SPAWNs, 7 minute limit) are a nuisance.

For those without that problem, this, along with support for more image
file formats, and the fancy widget stuff, is one of a number of clear
advantages of IDL over PV-Wave for those interested in image work. I
can't figure out why PV-Wave is more expensive. Especially since, if
you exceed the license, IDL reverts to free trial mode, whereas
PV-Wave won't let you in at all. Any thoughts on this?
Mitchell R Grunes (grunes@imsy1.nrl.navy.mil)
Allied-Signal Technical Services
c/o Code 7230 Naval Research Lab
Re: IDL and 24 Bits--help + added question [message #2210 is a reply to message #2208] Wed, 22 June 1994 06:22 Go to previous messageGo to next message
velt is currently offline  velt
Messages: 19
Registered: June 1994
Junior Member
In article 45v@mother.usf.edu, velt@rad.usf.edu (Robert Velthuizen) writes:
> In article 772209127@imsy1.nrl.navy.mil, grunes@imsy1.nrl.navy.mil (Mitchell R Grunes) writes:
>> In article <PWALKER.94Jun20165914@jean-luc.ncsa.uiuc.edu> pwalker@ncsa.uiuc.edu (Paul Walker) writes:
> <stuff on pseudo-color on true-color visual deleted>
>> ----------NOW FOR MY QUESTION----------
>>
>> Actually, I have been trying to find a way to simulate 24 bit color for
>> TV commands on 8 bit color displays (e.g., Sun, VGA...I think it could
>> be done with some fancy dithering, but I don't want to do it). Does
>> anyone have (or know of) a routine to do it?
>> Mitchell R Grunes (grunes@imsy1.nrl.navy.mil)
>> Allied-Signal Technical Services
>> c/o Code 7230 Naval Research Lab
>>
>
> I don't think there are ready-made programs in IDL to do it. In the documentation
> for John Bradley's xv there is mention of
> "... ppmquant, written by Jef Poskanzer. This algorithm also uses
> a version of Heckbert's median cut algorithm, but is capable of
> picking 'better' colors, and it doesn't dither."
> This may be an algorithm you want to look into.
>
> Good Luck,
> Robert Velthuizen
> Digital Medical Imaging Program of the
> H. Lee Moffitt Cancer Center and Research Institute at the
> University of South Florida.
>

I received a reply from David Stern of RSI:
>> Bob:
>>
>> Try the COLOR_QUAN function. It does a very good of quantizing 24
>> bit image into pseudocolor images of <= 256 colors. It will also do
>> optional dithering etc. Often, the images look just as good as their
>> 24 bit counterpart. You can also use it to combine data sets.
>>
>> Hope this helps,
>> David
>>
Re: IDL and 24 Bits--help + added question [message #2211 is a reply to message #2210] Wed, 22 June 1994 06:04 Go to previous messageGo to next message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
grunes@imsy1.nrl.navy.mil (Mitchell R Grunes) writes:

> Actually, I have been trying to find a way to simulate 24 bit color for
> TV commands on 8 bit color displays (e.g., Sun, VGA...I think it could
> be done with some fancy dithering, but I don't want to do it). Does
> anyone have (or know of) a routine to do it?

Look at the documentation for the IDL built-in routine COLOR_QUAN. This takes
pictures separated into red, green, and blue images (i.e. 24 bit color) and
combines them together into a single 8 bit image that can be displayed with an
appropriate color table to simulate a true-color image. If you use it with the
/CUBE qualifier you can then use the same color table for multiple images.
Otherwise it generates a separate optimal color table for each image.

Bill Thompson
Re: IDL and 24 Bits--help + added question [message #2216 is a reply to message #2211] Tue, 21 June 1994 10:07 Go to previous messageGo to next message
velt is currently offline  velt
Messages: 19
Registered: June 1994
Junior Member
In article 772209127@imsy1.nrl.navy.mil, grunes@imsy1.nrl.navy.mil (Mitchell R Grunes) writes:
> In article <PWALKER.94Jun20165914@jean-luc.ncsa.uiuc.edu> pwalker@ncsa.uiuc.edu (Paul Walker) writes:
<stuff on pseudo-color on true-color visual deleted>
> ----------NOW FOR MY QUESTION----------
>
> Actually, I have been trying to find a way to simulate 24 bit color for
> TV commands on 8 bit color displays (e.g., Sun, VGA...I think it could
> be done with some fancy dithering, but I don't want to do it). Does
> anyone have (or know of) a routine to do it?
> Mitchell R Grunes (grunes@imsy1.nrl.navy.mil)
> Allied-Signal Technical Services
> c/o Code 7230 Naval Research Lab
>

I don't think there are ready-made programs in IDL to do it. In the documentation
for John Bradley's xv there is mention of
"... ppmquant, written by Jef Poskanzer. This algorithm also uses
a version of Heckbert's median cut algorithm, but is capable of
picking 'better' colors, and it doesn't dither."
This may be an algorithm you want to look into.

Good Luck,
Robert Velthuizen
Digital Medical Imaging Program of the
H. Lee Moffitt Cancer Center and Research Institute at the
University of South Florida.
Re: IDL and 24 Bits--help + added question [message #2217 is a reply to message #2216] Tue, 21 June 1994 07:32 Go to previous messageGo to next message
grunes is currently offline  grunes
Messages: 68
Registered: September 1993
Member
In article <PWALKER.94Jun20165914@jean-luc.ncsa.uiuc.edu> pwalker@ncsa.uiuc.edu (Paul Walker) writes:
> I've just got a 24 bit display, and am trying to use IDL more
> productively than I used it on my old 8=bit display I've read the
> users guide chapter 16, but still have some questions.. My display
> (attached to a personal Iris), will only come up in TrueColor mode,
> which doesn't seem to have writable color tables. xdpyinfo tells me I
> can't get direct color.
...

I don't really understand this, but I got it to work by using
DEVICE,PSEUDO=8
This must come before any other use of your graphics screen--otherwise
it seems to have no effect (on the SGI)!

If you really want 256 colors, then you should also use an explicit WINDOW
command, with a colors switch.
WINDOW ... ,colors=256.

----------NOW FOR MY QUESTION----------

Actually, I have been trying to find a way to simulate 24 bit color for
TV commands on 8 bit color displays (e.g., Sun, VGA...I think it could
be done with some fancy dithering, but I don't want to do it). Does
anyone have (or know of) a routine to do it?
Mitchell R Grunes (grunes@imsy1.nrl.navy.mil)
Allied-Signal Technical Services
c/o Code 7230 Naval Research Lab
Re: IDL and 24 Bits--help + added question [message #2381 is a reply to message #2216] Fri, 24 June 1994 08:30 Go to previous message
rmm is currently offline  rmm
Messages: 4
Registered: June 1994
Junior Member
I belive the COLOR_QUAN function in IDL will generate pseudo 24 bit color for
an 8 bit display.

Robert Moss
Texaco Inc.
rmmoss@texaco.com
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: event fields
Next Topic: Re: Widget Colors

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

Current Time: Fri Oct 10 14:43:22 PDT 2025

Total time taken to generate the page: 0.24081 seconds