imagej / pyimagej

Use ImageJ from Python
https://pyimagej.readthedocs.io/
Other
474 stars 83 forks source link

Finish the global gateway logic for better macOS support #295

Open ctrueden opened 11 months ago

ctrueden commented 11 months ago

The global-gateway branch enables a global gateway field of PyImageJ, along with a new callback registration function when_imagej_starts, so that it becomes possible to start PyImageJ in gui mode along with additional actions you want to perform with the newly created ij instance. This is especially useful on macOS, which does not currently support the interactive mode. Initial testing of this feature by @ctrueden and @elevans indicates it's working, so it needs to be polished up, filed as a PR, reviewed, and merged ASAP, to bring this functionailty to Mac users. (Sadly, it will not solve all the problems on Mac—use of the ImageJ/Fiji GUI from Jupyter for example—but it is still better than what we have now.)

ctrueden commented 11 months ago

There is also logic in napari-imagej to make use of the global gateway if it is present. If napari is launched via a Python script that starts PyImageJ in GUI mode along side napari, then it becomes possible to (mostly) use both GUIs together on macOS. We should test this also as part of addressing this issue.

elevans commented 9 months ago

Just updating this issue. The global gateway works on macOS (yay!). I still need to test the global gateway with napari. After that I think we'll be good to go to merge into main. This next on my todo list so I'm hoping to get this done soon.