Posted by
Michael Schmid on
Jun 04, 2010; 8:00am
URL: http://imagej.273.s1.nabble.com/Get-continuous-pixel-coordinates-from-a-line-ROI-tp3688036p3688041.html
Hi Gerald,
sometimes plugins cause the shortcuts not to work - especially if
they register as keyListeners to ImageJ and don't de-register. Can
you run the plugin from the Plugins Menu?
If you can't run it from the Plugins menu, maybe you have some static
variables that prevent it from running again?
In the constructor, your first statement should probably be something
like
super("title of my plugin");
but I think that omitting it would not cause your problem.
close() at the end is fine; you may also want to add a
public void windowClosing(WindowEvent e) { close(); }
method in case someone closes it via the 'close' box of the window.
Funny enough, this is missing in PlugInFrame.windowClosing.
Michael
________________________________________________________________
On 3 Jun 2010, at 16:31, Gerald Ruiner Torgersen wrote:
> Hi everybody,
>
> I have written a plugin to do some dental measurements on X-rays.
> The plugin is uses the PlugInFrame interface
> and opens a menu in a new frame. It starts every time if called
> from the compile and run-command. I have installed the plugin with
> shortcut F5 and a command. After starting ImageJ I can run the
> plugin once by pressing F5 or using the Plugins-menu, but after the
> plugin is stopped it won't start again until ImageJ is restarted. I
> cannot find the reason for this behavior.
> The program is ended by the close() command. Can anybody help me?
>
> I will release the plugin to public domain later if it proves
> useful, but still the code is to messy to publish it.
>
> Mvh
>
>
> Gerald R. Torgersen
> IT-seksjonen,
> Det odontologiske fakultet / Faculty of Dentistry
> Universitetet i Oslo / University of Oslo