fiji / Trainable_Segmentation

Fiji library to perform image segmentation based on the Weka learning schemes
https://imagej.net/Trainable_Weka_Segmentation
GNU General Public License v3.0
106 stars 60 forks source link

Closing Weka GUI Chooser started from Trainable Weka Segmentation ends ImageJ2 #62

Open christianrickert opened 3 years ago

christianrickert commented 3 years ago

Hello, hope everyone is well.

There seems to be an issue with closing the Weka GUI Chooser, when started from the segmentation plugin:

Bug: Exiting the Weka GUI Chooser started by the Trainable Weka Segmentation Plugin in ImageJ2 exits ImageJ2 and all open files instead of the Weka GUI Chooser window only

Example:

// open the ImageJ2 Interactive Interpreter (CTRL+J)
// and run a copy of this code (CTRL+R)
run("Blobs (25K)");
run("Trainable Weka Segmentation");
selectWindow("Trainable Weka Segmentation v3.2.34");
call("trainableSegmentation.Weka_Segmentation.launchWeka");

Description The example code will open the Weka GUI Chooser window from the Trainable Weka Segmentation. Interestingly, the close button from the Window itself is non-functional, i.e. the window doesn't close and can't be closed without restarting ImageJ2. If you now want to exit this window (CTRL+E), you'll get a confirmation dialog, prompting you to close "this window" However, this will actually exit ImageJ2 and all dependent windows without further confirmation.

Expected behavior: Only the Weka GUI Chooser window should close, when exiting (command) or closing (clicking) the window.

Versions: Microsoft Windows [Version 10.0.19042.685] ImageJ 2, 1.53g with Java 1.8.0_172 (64-bit) Trainable Weka Segmentation 3.2.34 Weka GUI Chooser 3.9.4

This might be a Weka GUI Chooser issue (calling a global exit function) or a Trainable Weka Segmentation issue (forwarding the local exit function call) or perhaps a combination of the two?

Chris