I'm having trouble with an ImageJ macro. Functions selectImage(id) and selectWindow(name) are causing ImageJ to crash completely, even so that I have to reset Unity altogether (I'm on Ubuntu 12.04), since all GUI input just freezes.
The macro in which this happens is rather long. When I use the aforementioned functions in short and simple macros nothing happens. I first open the images, then perform some thousands of operations, and then request the window switch. That's when the whole thing freezes.
Is anyone familiar enough with these so as to suggest what might be the problem?
If you prefix your macro with setBatchMode(true)
then ImageJ will execute the macro in the background, not displaying or updating any windows until the macro is complete (or until setBatchMode(false)
is called). This will prevent selectWindow
and selectImage
calls from actually bringing windows to the foreground, and in your case crashing Unity. Your macro will also be orders of magnitude faster.