point inside mask (mask inside mask)

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

point inside mask (mask inside mask)

Rainer M. Engel
Is there a function or macro that does this already?

Is the point X,Y inside the area of mask N?
Returning "true" if the condition is met.

At this time I only see workarounds with boolean operations with the
advantage of being able to test if masks intersect a.s.o.

Best Regards,
Rainer


--
Rainer M. Engel, Dipl. Digital Artist
scientific|Media GbR
Pichelsdorfer Str. 143
13595 Berlin

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

Re: point inside mask (mask inside mask)

Rasband, Wayne (NIH/NIMH) [E]
On Aug 7, 2013, at 1:01 PM, Rainer M. Engel wrote:

> Is there a function or macro that does this already?
>
> Is the point X,Y inside the area of mask N?
> Returning "true" if the condition is met.
>
> At this time I only see workarounds with boolean operations with the
> advantage of being able to test if masks intersect a.s.o.

Convert the mask to a selection using Edit>Selection>Create Selection and use the selectionContains() macro function to determine if the the point is inside the selection.

   run("Create Selection");
   if (selectionContains(x, y))
      print(x+","+y+" is inside the mask");

-wayne

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

Re: point inside mask (mask inside mask)

Addie H
Thanks a lot for your input.
I just found the plugin on the website last night and tried to run it and got the error messages. I'm not familiar with the editor's intended logic.  I have not written plugins or macros for Image J.  I wish I had the time to explore them, but don't right now.  I am hoping to find a ready-made plugin that will measure the fluorescence intensities of microscopic images of cells.
Thanks.

Addie

> Date: Wed, 7 Aug 2013 23:05:13 +0000
> From: [hidden email]
> Subject: Re: point inside mask (mask inside mask)
> To: [hidden email]
>
> On Aug 7, 2013, at 1:01 PM, Rainer M. Engel wrote:
>
> > Is there a function or macro that does this already?
> >
> > Is the point X,Y inside the area of mask N?
> > Returning "true" if the condition is met.
> >
> > At this time I only see workarounds with boolean operations with the
> > advantage of being able to test if masks intersect a.s.o.
>
> Convert the mask to a selection using Edit>Selection>Create Selection and use the selectionContains() macro function to determine if the the point is inside the selection.
>
>    run("Create Selection");
>    if (selectionContains(x, y))
>       print(x+","+y+" is inside the mask");
>
> -wayne
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
     
--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html