Can Fiji(imageJ) be summonsed from python?


I’m new to computer programing but I am trying to write a script in python that will summons some of the capabilities Fiji(imageJ) is able to preform on some of my image processing. Is this even possible? I know you can write a script in Fiji using Jython and other scripting language and I also believe you are able to write a script in python that can be transferred into Fiji, but like I said I am new to this so I could be completely wrong.

Any input would be greatly appreciated!

1 Like

Hi @acamillek,

yes you can write Jython scripts in Fiji but there two big limitations to this: you can only use Python 2 and you won’t be able to use external packages like Numpy.

The best solution if you want to mix Python and Fiji is to use the great package pyimagej. You can find more information here:

Essentially, the package allows you to launch fiji from within Python, typically from a Jupyter Notebook, and have access to all its functions (it’s possible however that some plugins are difficult or cannot be used through this). A good start is this example notebook from the imagej repository:

Good luck!



Hi @acamillek,
I’ve had the same question few mouths ago.
Nevertheless, I have the feeling that Jython or pyimageJ not included all the functions in FIJI. For this, only one line in a FIJI macro could become a nightmare to correct in pyhton.
I’m a beginner too, but I think that the learning of scikit-image and opencv packages in python could represent a good alternative to imageJ.

I’m not certain of my propose, but, after few years of experience in FIJI, all functions included in FIJI are basic imaging process functions used in other languages Matlab, Python, Java with the help of specialised packages. The first steps of the code development take lot of time but allow full-stack development for image processing, data processing and analysis.

Best regards.

1 Like