ImageJ toolbar

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

ImageJ toolbar

Jeffrey B. Woodward
From a plugin, what is the best way to inspect the state and potentially
modify the active tool (Rectangular selections, Elliptical selections,
..., Magnifying glass, etc) on the ImageJ toolbar? I have a plugin in
which I attach a mouse listener to the canvas looking for mouse clicked
events; however, it really only makes sense to take action if the "Point
Selections" tool is active.

Many thanks in advanced,

-Woody
Reply | Threaded
Open this post in threaded view
|

Re: ImageJ toolbar

dscho
Hi,

On Wed, 17 Jan 2007, Jeffrey B. Woodward wrote:

> I have a plugin in which I attach a mouse listener to the canvas looking
> for mouse clicked events; however, it really only makes sense to take
> action if the "Point Selections" tool is active.

        import ij.gui.Toolbar;

        ...

                if (Toolbar.getToolId() == Toolbar.POINT) {
                        ...
                }

Hth,
Dscho
Reply | Threaded
Open this post in threaded view
|

Re: ImageJ toolbar

Josh Doe-2
In reply to this post by Jeffrey B. Woodward
Try using the toolID macro (
http://rsb.info.nih.gov/ij/developer/macro/functions.html#T)
Josh D

On 1/17/07, Jeffrey B. Woodward <[hidden email]> wrote:

>
> From a plugin, what is the best way to inspect the state and potentially
> modify the active tool (Rectangular selections, Elliptical selections,
> ..., Magnifying glass, etc) on the ImageJ toolbar? I have a plugin in
> which I attach a mouse listener to the canvas looking for mouse clicked
> events; however, it really only makes sense to take action if the "Point
> Selections" tool is active.
>
> Many thanks in advanced,
>
> -Woody
>