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 #55955 is a reply to message #55954] Mon, 24 September 2007 13:41 Go to previous messageGo to previous message
rpertaub@gmail.com is currently offline  rpertaub@gmail.com
Messages: 43
Registered: January 2007
Member
On Sep 24, 4:09 pm, David Fanning <da...@dfanning.com> wrote:
> rpert...@gmail.com writes:
>> i think this is a fairly easy problem to which i dunno the answer.
>> Here goes:
>
>> I have 3 images, and used where function 3 times to find 3 specific
>> characterizations.
>> mask1=where(image ge thresh1)
>> mask2=where(image2 ge thresh2)
>> mask 3=where(image3 ge thresh3)
>
>> Now I have 3 sets of indices of pixels of my interest.
>
>> I want to use image 4 and color pixels indices 1 red, indices 2= blue,
>> indices 3=green.
>
>> image[indices1]=red
>> image[indices2]=blue
>> image[indices3]=green
>
>> How do I do that?
>
> I would do it like this, since you may want to
> see the overlap in the indices:
>
> s = Size(image, /Dimensions)
> nelem = N_Elements(image)
> image4 = BytArr(s[0], s[1], 3]
> image4[mask1] = 255B
> image4[mask3 + nelem] = 255B
> image4[mask2 + (nelem*2)] = 255B
> TV, image4, True=3
>
> This presumes all three image used to construct the masks
> are the same size.
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/

Thanks so much!
However, this seems to combine the 3 masks onto one. I am trying to
use the 3 masks combined onto a 4th image which ...
i am essentially taking monochromator images at R,G,B and then color
image, and want to false color my image using the 3 masks...not sure
if I am making sense
[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: Sat Nov 29 01:48:49 PST 2025

Total time taken to generate the page: 0.88019 seconds