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

Home » Public Forums » archive » IDLgrImage and the channel keyword
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: IDLgrImage and the channel keyword [message #90168 is a reply to message #90167] Wed, 04 February 2015 15:53 Go to previous messageGo to previous message
Jim  Pendleton is currently offline  Jim Pendleton
Messages: 165
Registered: November 2011
Senior Member
On Wednesday, February 4, 2015 at 2:02:30 PM UTC-7, ronn kling wrote:
> All,
>
> Has anyone figured out how to use the channel keyword for IDLgrImage?
>
> If you try this
>
> file = 'E:\Program Files\Exelis\IDL84\examples\data\rose.jpg'
> im = read_image(file)
> xobjview, obj_new('IDLgrImage',im, channel='ff0000'x)
>
> What I expect to see is a red channel image, but instead I see cyan which is a combination of green and blue. So it is almost acting like a color subtraction. But if you try other hex combinations they don't work like subtractions either.
>
> Any ideas????
>
> Ronn Kling

Good question! It doesn't produce what I would expect from the documentation setting just the red channel in an RGB input image:

IDL> a = bytarr(3, 255, 255)
IDL> a[0, *, *] = 255B
IDL> xobjview, idlgrimage(a, channel = 'ff0000'x)
IDL> xobjview, idlgrimage(a, channel = '00ff00'x)
IDL> xobjview, idlgrimage(a, channel = '0000ff'x)

Compare with

IDL> xobjview, idlgrimage(a, channel = '000101'x)

Is Karl still out here on the internets?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Locking graphics in GUI / disable resize, rotate or translate
Next Topic: Image Subset

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

Current Time: Wed Oct 08 18:20:38 PDT 2025

Total time taken to generate the page: 0.00186 seconds