Re: Can you retrieve values from the Log window in a macro?
Posted by
HoweLab on
Oct 14, 2009; 1:09pm
URL: http://imagej.273.s1.nabble.com/Can-you-retrieve-values-from-the-Log-window-in-a-macro-tp3690795p3690797.html
Hi Gabriel.
We're specifically interested in getting the 3-point data (x, y, r) for the minimum bounding circle (MBC) generated by your plugin, then having the macro do a whole host of downstream functions with those parameters.
I was up until ~3am last night playing around. At first, I just opened up a dialog box so the user could enter the values manually. This works fine, but obviously limits the automation of the process. I finally came up with what appears to be a reasonable solution, in that I simply add the MBC to the ROI manager, then pulled the relevant numbers, with a few calculations, from there. Seems to work fine, but I'm sure there are better ways to do it.
Thanks for your help (& your contributions to the community).
-Alan
P.S. Thanks to the other users that responded - always very good advice.
Gabriel Landini wrote
On Wednesday 14 October 2009 11:53:06 HoweLab wrote:
> I am writing a macro that uses a number of plugins (right now, I'm using
> Gabriel Landini's Convex Hull Plus extensively), all of which return values
> into the Log window. Is there some way of reading those values so the macro
> can use them for later steps?
Hi,
which values do you want to retrieve? Maybe the Particles8 plugin returns
these into the ResultsTable.
CHull: Convex Hull or convex polygon calculated from pixel centres. (This
value is the same as the perimeter only for rectangular particles),
CArea: Area of the Convex Hull polygon,
and some other.
Although thinking about it, that would not work only if you are analysing the
convex disconnected components.
Regards
G.