Login  Register

call function for IJ tool

Posted by Tiago Ferreira on Oct 22, 2008; 6:40pm
URL: http://imagej.273.s1.nabble.com/call-function-for-IJ-tool-tp3694662.html

Hi,

I have to do a series of measurements with 'Analyze particles...' of a *subset*
of cells in random image fields.
So I wrote some simple macro that engulfs the cells I choose (4-5 per image)
in a oval selection just by point clicking over them.

But its not flexible enough.

So I realize that actually that 'brush' tool does this already (i.e., setting
a enough large size, shift clicking in distant points of the image makes
already multiple oval selections in a composite ROI);

But I fail to set the diameter of the brush tool in an interactive way:

So, if I have for e.g.:

// code ---
a=call("ij.Prefs.get","toolbar.brush.size","");
b=call("ij.Prefs.set","toolbar.brush.size",2*a);
a=call("ij.Prefs.get","toolbar.brush.size","");
print(a);
// code ---

I do change the brush but IJ does not recognize it, unless I double-click
on the tool.

Does anyone have a fix for this?

Thanks,

T.