Re: Change selection brush size in macro
Posted by dscho on Nov 21, 2008; 9:34pm
URL: http://imagej.273.s1.nabble.com/Change-selection-brush-size-in-macro-tp3694419p3694423.html
Hi,
On Fri, 21 Nov 2008, Josh D wrote:
> I'm trying to change the size of the selection brush tool in a macro. I
> haven't had any luck figuring out how to do it. The size seems to be set
> in ij.gui.Toolbar. There is a public static int getBrushSize, but I see
> no matching setBrushSize. Is there some other way that I could change
> the brush size from a macro?
This is stored in the brushSize member of ij.gui.Toolbar, which is
private, unfortunately.
You can play games with java.lang.reflect.Field.setAccessible(), but that
is rather dirty.
Ciao,
Dscho