Login  Register

Re: Change selection brush size in macro

Posted by Josh Doe-2 on Nov 21, 2008; 9:29pm
URL: http://imagej.273.s1.nabble.com/Change-selection-brush-size-in-macro-tp3694419p3694422.html

Agh, egg on my face for not checking the latest source. I was referencing
the browseable API source, which is 1.41k. Sorry for that.

But thanks for pointing it out, so glad to see you read my mind months ago!

-Josh

On Fri, Nov 21, 2008 at 3:56 PM, Wayne Rasband <[hidden email]> wrote:

>  On Nov 21, 2008, at 3:41 PM, Josh D wrote:
>
> Hello,
>> 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?
>>
>
> You can set the size of the selection brush tool in a macro using
>
>    call("ij.gui.Toolbar.setBrushSize", size);
>
> The Toolbar.setBrushSize() method was added in ImageJ 1.41o.
>
> You can get the current size using
>
>    size = call("ij.gui.Toolbar.getBrushSize");
>
> -wayne
>