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

Home » Public Forums » archive » Re: color pixel by index
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: color pixel by index [message #55952 is a reply to message #55951] Mon, 24 September 2007 14:15 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> Maybe you just want image 4 to start out as image 4, and then
> my example will work. Instead of this:
>
> image4 = Bytarr(s[0], s[1], 3)
>
> Try this:
>
> image4 = [[[image4]],[[image4]],[[image4]]]
>
> Then, the rest of it.

Oh, that won't work. How about this:

s = Size(image, /Dimensions)
nelem = N_Elements(image)
image4 = [[[image4]],[[image4]],[[image4]]]

image4[mask1] = 255B
image4[mask1 + nelem] = 0B
image4[mask1 + (nelem*2)] = 0B

image4[mask3] = 0B
image4[mask3 + nelem] = 255B
image4[mask3 + (nelem*2)] = 0B

image4[mask2] = 0B
image4[mask2 + nelem] = 255B
image4[mask2 + (nelem*2)] = 255B
TV, image4, True=3

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ITK and IDL interface
Next Topic: Mosaic_doit

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

Current Time: Sun Nov 30 03:05:02 PST 2025

Total time taken to generate the page: 1.36283 seconds