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 #90169 is a reply to message #90168] Wed, 04 February 2015 16:29 Go to previous messageGo to previous message
Dick Jackson is currently offline  Dick Jackson
Messages: 347
Registered: August 1998
Senior Member
On Wednesday, 4 February 2015 15:53:14 UTC-8, Jim P wrote:
> 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?

Or perhaps Don J Lindler who, 14 years ago, claimed to have been "able to use IDLgrImage objects with the channel set ('ff0000'x for red, '00ff00'x for green, and '0000ff',x for blue).":

https://groups.google.com/forum/#!searchin/comp.lang.idl-pvw ave/IDLgrImage$20channel/comp.lang.idl-pvwave/j9LozjSkkFQ/9B e5T_DCTzcJ

:-)

FWIW, how it looks to me is indeed "subtractive colour" handling... note that if you pass '000000'X what you get is the white background, not a black image, so perhaps '000001'X means to add a blue subtracting filter only: where B in the RGB image is high, it passes blue (along with full, unfiltered red and green, giving white), and where B is low, only blue is lowered (again, along with full, unfiltered red and green, giving yellow)

Cheers,
-Dick

Dick Jackson Software Consulting Inc.
Victoria, BC, Canada --- http://www.d-jackson.com
[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 16:08:04 PDT 2025

Total time taken to generate the page: 0.00451 seconds