How to make a Jython ImageJ plugin faster?

Hi everyone,

I’m trying to write a plugin to make montages of microscopy images. I have even tried to implement a GUI to allow the user to change the colors of the channels, with other things.

For now, it works as intended, though the interface is a bit messy (but it’s not my main problem at the moment), there are some problems with the refreshing of the icons when i change the selected image file or serie, and the result image must be manually refreshed (by changing the Z-depth or Z-project) after messing with the channels (i’m still struggling with that but it’s not the main problem for now), and globally, there is still room for improvement.

The main problem is that the plugin is painfully slow when trying to apply the tunings to all the images of the directory. Are there any ways to improve that?

I uploaded the plugin on Github (GitHub - mmongy/ImageF-Fiji--microscopy-montage-plugin). You can use it on ImageJ/Fiji by Plugins/Macro/Run.

Best regards, Marc.