How to know if a pixel is inside a selection ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to know if a pixel is inside a selection ?

YuriGagarine
Hi all,

I want to know if a pixel is inside a selection thanks to the txt file that I get after saving the ROI. The text file only give the tops of the polygon selection and what I want to have is a binary mask that distinguish pixel that are in the selection from the other.

Thanks in advance and sorry for my english.
Reply | Threaded
Open this post in threaded view
|

Re: How to know if a pixel is inside a selection ?

Rainer M. Engel
I don't know what you already have tried to solve your problem but there
is a function to check if a point is inside a selection.

selectionContains(x, y)


Am 11.04.2014 13:18, schrieb YuriGagarine:
> Hi all,
>
> I want to know if a pixel is inside a selection thanks to the txt file that
> I get after saving the ROI. The text file only give the tops of the polygon
> selection and what I want to have is a binary mask that distinguish pixel
> that are in the selection from the other.
>
> Thanks in advance and sorry for my english.

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: How to know if a pixel is inside a selection ?

YuriGagarine
Thanks a lot, it worked !