Page history Edit this page How do I edit this website?

Python

You can use ImageJ from Python:

  • If you want to write ImageJ scripts in the Python language, which run from inside ImageJ similar to other scripts, check out the Jython Scripting page.
    • Advantage: Such scripts are able to take advantage of SciJava script parameters and run within several tools that support SciJava.
    • Disadvantage: You will not be able to use many of the Python modules requiring native code such as numpy or scipy.
    • Disadvantage: As of this writing, Jython implements only Python 2, not Python 3.
  • If you want to embed ImageJ2 inside of your Python code, such as within a Jupyter notebook using the Python kernel, check out the PyImageJ Python package. It allows you to create an ImageJ2 gateway with full access to its API from Python. See the ImageJ2 tutorial notebooks for an introduction.
    • Advantage: It is possible to combine ImageJ with other image analysis libraries like scikit-image, ITK, OpenCV and more in a single Python program.
    • Disadvantage: Wrapping ImageJ in Python has some limitations, particularly surrounding use of original ImageJ features when running headless.