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

Home » Public Forums » archive » Re: List of Points --> ROI via IDLVECTOR data type for iimage itool
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: List of Points --> ROI via IDLVECTOR data type for iimage itool [message #45816 is a reply to message #45815] Thu, 13 October 2005 13:15 Go to previous message
David Alexander is currently offline  David Alexander
Messages: 26
Registered: August 2005
Junior Member
Edward,

You want to display the pixels from the image after you run your
sampling routine, right?

After your sampling routine, do you end up with 3 vectors (x, y,
pixels)? If so you could either pass them directly into iImage (iimage
can take 3 vectors as input, but it will force you to grid the data),
or you can generate an image array with an alpha channel (RGBA) based
on your pixel data, and set the Alpha channel value for all the unused
pixels to 0. So, something like this:

pro test
imagePixels = randomu(s,1000)
x = bytscl(randomu(s,1000))
y = bytscl(randomu(s,1000))

newImage=fltarr(max(x)+1,max(y)+1)
newAlpha=fltarr(max(x)+1,max(y)+1)
newImage[x,y]=imagePixels
newAlpha[x,y]=255
newImage=[[[newImage]],[[newImage]],[[newImage]],[[newAlpha] ]]

iimage,newImage
end

My sample data is not RGB, so I triplicated the newImage variable. If
you already have RGB pixels, you won't need to do that.

Dave
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Calling IDL from C
Next Topic: Re: Deallocate Memory for a Structure

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

Current Time: Sat Oct 11 06:20:17 PDT 2025

Total time taken to generate the page: 0.80219 seconds