You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unclear how to initialize pyimagej in python scripts #12
import imagej
ij = imagej.init()
print(ij.getVersion())
produces output: 2.16.0/Inactive
I'm not sure if I should be initializing differently. Presumably I don't need to point to my local install? But I'm not sure how to get the legacy service active.
Also, isn't it problematic to be running imagej.init repeatedly? My intuition is that we want to initialize pyimagej once when launching in python mode, ensure it is done properly, make ij available for all, and kill other attempts to call init in the script editor..
I tried adding a ScriptHeader that would automatically populate this text on new scripts. This functionality seems disabled by default and even then possibly unsupported... I think this would be a good direction though to avoid anyone attempting to initialize their own pyimagej
Activity
hinerm commentedon Aug 24, 2025
Ah found it..
#@ ImageJ ijhinerm commentedon Aug 24, 2025
I tried adding a
ScriptHeaderthat would automatically populate this text on new scripts. This functionality seems disabled by default and even then possibly unsupported... I think this would be a good direction though to avoid anyone attempting to initialize their own pyimagejhinerm commentedon Aug 24, 2025
At the least we need some templates for
Python (pyimagej)and to work this into the pyimagej docs. imagej/pyimagej#333