Posted by
BenTupper on
URL: http://imagej.273.s1.nabble.com/Disjoint-ROI-selection-using-macro-language-tp3692854p3692869.html
On Apr 17, 2009, at 4:23 AM, Michael Schmid wrote:
> Hi Ben,
>
> maybe deleting those particles that don't match from the roi manager
> would be a solution?
That might be a solution - I have not tried that. In the meantime, I
think I have figured out a way to do this - but the approach is to add
to the Manager only those particles that I want in there. It turns it
into a "front-end" problem rather than a "back-end" problem. I was
trying the back end solution because I mistakenly thought that I
needed to use the ROI manager is I wanted to use...
xs = getResult("XStart", i);
ys = getResult("YStart", i);
doWand(xs, ys);
getSelectionCoordinates(xc,yc);
It turns out that it works even if the particle is not added to the
ROI Manager but has a record in the results table (you might think the
"getResult" would have been an obvious clue for me. Doh!)
My current solution doesn't even use the ROI Manager now. (Whew!)
In case you are interested, I want to determine the smallest distance
between particle perimeters - if two or more are close enough then I
want to consider them a single object (like a chain of pearls). I
think this macro ...
http://www.tidewater.net/~pemaquid/FITVIS_neighbors.ijm... shows what I mean.
Thanks again for all the help!
Cheers,
Ben
Ben Tupper