Login  Register

Re: Intersection point(s) of two roi's.

Posted by Rasband, Wayne (NIH/NIMH) [E] on Sep 16, 2010; 5:05pm
URL: http://imagej.273.s1.nabble.com/Intersection-point-s-of-two-roi-s-tp3686903p3686906.html

The 1.44g daily build has a selectionContains(x,y) macro function.

-wayne

_______________________________________
From: Norbert Vischer [[hidden email]]
Sent: Thursday, September 16, 2010 5:22 AM
To: List IMAGEJ
Subject: Re: Intersection point(s) of two roi's.

> eah, I wish it was that easy. In my original email I said oval(ellipse), just to keep things simple. In reality, I am looking for the intersection points of a straight line and a ROI drawn with the freehand selection (representing cell boundary). Thanks for your reply though!
>
> Ved


Travel along all points of your line and check where it enters and leaves the roi.

Wayne, it would be nice if there was a macro like
        selectionContains(x, y)

Currently, you have to do this in JavaScript:

roi = IJ.getImage().getRoi();
inside = roi.contains(100, 100);
print(inside);



http://imagej.588099.n2.nabble.com/eval-script-roi-contains-x-y-td4854845.html#a4855568

Norbert