defroi [message #94396] |
Tue, 09 May 2017 03:48  |
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  |
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.
|
|
|