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

Home » Public Forums » archive » defroi
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
defroi [message #94396] Tue, 09 May 2017 03:48 Go to next message
gunvicsin11 is currently offline  gunvicsin11
Messages: 93
Registered: November 2012
Member
Hi all,
I am using defroi to select a region of interest.

x=defroi(700,700)
x is the subscripts of the pixels inside the region.
I want to make all the values inside the region =1 and rest of the region to be zero.
How to do that.
thanks
Re: defroi [message #94400 is a reply to message #94396] Tue, 09 May 2017 05:04 Go to previous message
Nikola is currently offline  Nikola
Messages: 53
Registered: November 2009
Member
On Tuesday, May 9, 2017 at 11:49:00 AM UTC+1, sid wrote:
> Hi all,
> I am using defroi to select a region of interest.
>
> x=defroi(700,700)
> x is the subscripts of the pixels inside the region.
> I want to make all the values inside the region =1 and rest of the region to be zero.
> How to do that.
> thanks

So, I guess you did something like:

window, xsi = 700, ysi = 700
tvimage, bytscl(image)
x = defroi(700, 700)

Then made a map:
map = image *0

And fill with 1's only the selected pixels
map[x] = 1

I really don't want to sound pretentious, but if you plan to work further in IDL, it may help you a lot to read the IDL documentation on the array operations and manipulation. There is many excellent tutorials on-line.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Convert string to image matrix (like xyouts)
Next Topic: change colors on colortable

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

Current Time: Wed Oct 08 13:33:43 PDT 2025

Total time taken to generate the page: 0.00449 seconds