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

Home » Public Forums » archive » Re: ION_IMAGE 8bit/24bit color
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: ION_IMAGE 8bit/24bit color [message #35326] Wed, 11 June 2003 08:06 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David W. Fanning writes:

> P.S. Let's just say if your image has 16.7 million colors and
> you have to pick 224 to display it, compromises will have to
> be made. :-(

I got to thinking about this after I wrote it.
There actually *is* good news here.

I was celebrating my 25th wedding anniversary yesterday
and it occurred to me that the compromises you have to
make to get your colors just about right are at
least 10-fold less onerous than the compromises
you have to make to keep a marriage together for a
long time. :-)

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: ION_IMAGE 8bit/24bit color [message #35327 is a reply to message #35326] Wed, 11 June 2003 07:42 Go to previous messageGo to next message
Liam E. Gumley is currently offline  Liam E. Gumley
Messages: 378
Registered: January 2000
Senior Member
"Dan Dye" <ddye@flenvironmental.org> wrote in message
news:dfc65bba.0306101448.45816068@posting.google.com...
> I don't use the z graphics buffer much but I've been dropped into the
> deep end by my temp ION license. I have an image, 'picC'
>
> picC=congrid(pic,3,400,400) ;where 3=[r,g,b]
>
> normally, I would tv this image:
>
> tv, picC, true=1
>
> but this returns only a small portion of the lower right corner of the
> image with a strange interference pattern. I consulted the
> Fanning/Lumley/RSI documentation and found that the z buffer doesn't
> accept truecolor so I'm pretty amazed that I got anything plotted at
> all.
>
> tv, picC[0,*,*]
> gives me a nice pseudoColor of the first band and at the full size.
>
> How can I get this image tv'd as and rgb?

Could you restate your problem in terms of what you are trying to achieve?
I'm curious as to why you want to use the Z-buffer (I know nothing about
ION).

Any who is this Lumley person?

Cheers,
Liam.
Practical IDL Programming
http://www.gumley.com/
Re: ION_IMAGE 8bit/24bit color [message #35329 is a reply to message #35327] Wed, 11 June 2003 06:41 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Dan Dye writes:

> Thanks David. I did glean from TVImage the "Color_Quan" function.
>
> ------------< snip >-------------------
> The COLOR_QUAN function quantizes a TrueColor image and returns a
> pseudo-color image and palette to display the image on standard
> pseudo-color displays. The output image and palette can have from 2 to
> 256 colors.
>
> COLOR_QUAN solves the general problem of accurately displaying
> decomposed, TrueColor images, that contain a palette of up to 224
> colors, on pseudo-color displays that can only display 256 (or fewer)
> simultaneous colors.
> ------------< snip >-------------------
>
> tv, Color_Quan(picC,1,R,G,B,COLORS=255)
>
> This would seem to be the trick but the result looks poor compared to
> the truecolor image....

Well, in IDL (as in life) it is hard to have your
cake and eat it too.

Cheers,

David

P.S. Let's just say if your image has 16.7 million colors and
you have to pick 224 to display it, compromises will have to
be made. :-(

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438
E-Mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: ION_IMAGE 8bit/24bit color [message #35330 is a reply to message #35329] Wed, 11 June 2003 06:25 Go to previous messageGo to next message
ddye is currently offline  ddye
Messages: 5
Registered: October 2002
Junior Member
Thanks David. I did glean from TVImage the "Color_Quan" function.

------------< snip >-------------------
The COLOR_QUAN function quantizes a TrueColor image and returns a
pseudo-color image and palette to display the image on standard
pseudo-color displays. The output image and palette can have from 2 to
256 colors.

COLOR_QUAN solves the general problem of accurately displaying
decomposed, TrueColor images, that contain a palette of up to 224
colors, on pseudo-color displays that can only display 256 (or fewer)
simultaneous colors.
------------< snip >-------------------

tv, Color_Quan(picC,1,R,G,B,COLORS=255)

This would seem to be the trick but the result looks poor compared to
the truecolor image....




David W. Fanning <david@dfanning.com> wrote in message news:<MPG.1950152f3957eac9989682@news.frii.com>...
> Dan Dye writes:
>
>> I don't use the z graphics buffer much but I've been dropped into the
>> deep end by my temp ION license. I have an image, 'picC'
>>
>> picC=congrid(pic,3,400,400) ;where 3=[r,g,b]
>>
>> normally, I would tv this image:
>>
>> tv, picC, true=1
>>
>> but this returns only a small portion of the lower right corner of the
>> image with a strange interference pattern. I consulted the
>> Fanning/Lumley/RSI documentation and found that the z buffer doesn't
>> accept truecolor so I'm pretty amazed that I got anything plotted at
>> all.
>>
>> tv, picC[0,*,*]
>> gives me a nice pseudoColor of the first band and at the full size.
>>
>> How can I get this image tv'd as and rgb?
>
> If it were me, I'd be using TVImage or ImDisp, or
> one of those other programs you were reading about,
> since they all do this automatically. :-)
>
> Cheers,
>
> David
Re: ION_IMAGE 8bit/24bit color [message #35333 is a reply to message #35330] Tue, 10 June 2003 16:18 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Dan Dye writes:

> I don't use the z graphics buffer much but I've been dropped into the
> deep end by my temp ION license. I have an image, 'picC'
>
> picC=congrid(pic,3,400,400) ;where 3=[r,g,b]
>
> normally, I would tv this image:
>
> tv, picC, true=1
>
> but this returns only a small portion of the lower right corner of the
> image with a strange interference pattern. I consulted the
> Fanning/Lumley/RSI documentation and found that the z buffer doesn't
> accept truecolor so I'm pretty amazed that I got anything plotted at
> all.
>
> tv, picC[0,*,*]
> gives me a nice pseudoColor of the first band and at the full size.
>
> How can I get this image tv'd as and rgb?

If it were me, I'd be using TVImage or ImDisp, or
one of those other programs you were reading about,
since they all do this automatically. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438
E-Mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: ION_IMAGE 8bit/24bit color [message #35440 is a reply to message #35327] Thu, 12 June 2003 10:48 Go to previous message
ddye is currently offline  ddye
Messages: 5
Registered: October 2002
Junior Member
> Could you restate your problem in terms of what you are trying to achieve?
> I'm curious as to why you want to use the Z-buffer (I know nothing about
> ION).
>
> Any who is this Lumley person?

Giam Lumley right? Oh, maybe not... Sorry Liam.

From my very limited understanding of ION, it passes image information
from IDL to the webpage via the Z buffer. If it is possible to use
truecolor in ION generated images I would very much like to hear about
it but I now have acceptable results by adding "cube=6"

read_jpeg, fname, image24bit ;wedding day quality image
image24bit = congrid(image24bit,3,400,400)
loadct, 13
image8bit=Color_Quan(image24bit,1,R,G,B,COLORS=255, cube=6)
TVLCT, r, g, b
TV, image8bit ;image after 25 years of marriage

-d
Re: ION_IMAGE 8bit/24bit color [message #35463 is a reply to message #35326] Wed, 11 June 2003 18:15 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
David W. Fanning <david@dfanning.com> writes:
>
> I was celebrating my 25th wedding anniversary yesterday
> and it occurred to me that the compromises you have to
> make to get your colors just about right are at
> least 10-fold less onerous than the compromises
> you have to make to keep a marriage together for a
> long time. :-)

Does this work?

MARRIAGE, DECOMPOSED=0

Craig


--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL Question - Opposite of WHERE?
Next Topic: ION_IMAGE 8bit/24bit color

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

Current Time: Wed Oct 08 16:01:22 PDT 2025

Total time taken to generate the page: 0.00911 seconds