Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
When launching ImageJ with a display from Python on macOS, it hangs. See 68dad62 for the current workaround and links to more information. The pyimagej code should try to be clever and start the Cocoa event loop itself before spinning up Java.
Same issue here, the script hangs when
import time import imagej ij = imagej.init('/Applications/Fiji.app', headless=False) ij.ui().showUI() while True: time.sleep(1)
However, the fiji menu didn't show as expected, any idea? @ctrueden
@oeway Hmm. I guess that since Java is started inside the Python process, the usual macOS menu bar logic does not work?
I don't immediately know how to fix it. But one quick workaround is to use:
ij = imagej.init('/Applications/Fiji.app', headless=False) ij.ui().showUI("swing")
This will pop up the Swing UI instead of the legacy ImageJ1 UI. In my quick experimentation, major things including legacy IJ1 plugins do still work—although you may encounter rough edges in some cases.
Relatedly: I am exploring integrating the