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

Home » Public Forums » archive » Re: Alpha blending with object graphics - different color palettes do not work
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: Alpha blending with object graphics - different color palettes do not work [message #75784 is a reply to message #75782] Wed, 04 May 2011 09:17 Go to previous messageGo to previous message
Karl[1] is currently offline  Karl[1]
Messages: 79
Registered: October 2005
Member
On May 4, 6:30 am, David Fanning <n...@idlcoyote.com> wrote:
> LNpellen writes:
>> Why isn't the rainbow (LoadCT, 13) working for me?
>
> I would guess because you are using indexed color mode.
> You do not EVER want to use indexed color when you are
> working with object graphics.
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")


The IDL docs for IDLgrImage say this for the image data parm:

"An n x m greyscale image, or a 2 x n x m, n x 2 x m, or n x m x 2
greyscale image with an alpha channel. (The alpha channel is ignored
if the destination device uses indexed color mode.)"

So this is considered a Luminance-Alpha image. The first channel is a
luminance (greyscale) channel. Greyscale images do not perform color
lookup through a palette. That is why setting the palette to rainbow
had no effect.

Is the dose map going to be displayed with a constant alpha, or a per-
pixel alpha, where the alpha value could be different for each pixel?

It *looks* like you want a constant alpha because you are filling the
alpha channel of the dose image with a constant (alpha * 255). You
don't need alpha data in the image if you want to apply constant alpha
with the ALPHA_CHANNEL property.

If the alpha is constant, you should just go back to a single channel
image and use that as an "indexed image" in conjunction with the
palette and use the ALPHA_CHANNEL property to set the global constant
alpha to 0.5 or whatever.

That should display your dose image with the color palette and half-
transparent.

As far as being in indexed mode goes, I don't think that the
DECOMPOSED setting affects the way IDLgrWindows are created. (not
sure). But you don't need to have an Indexed destination to use
palettes in images.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Problem using ReadS to read a long string
Next Topic: Re: summation of bands

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

Current Time: Fri Oct 10 10:35:33 PDT 2025

Total time taken to generate the page: 0.56044 seconds