Best Method for using ImageJ Plugins in python?

Hi Everyone,

I wanted to ask the community what the best method is for accessing ImageJ plugins in python. I know that you can write scripts/macros through jython, but it would be better for our workflow to use a different package. Does anyone have experience using ImageJ plugins with the PyImageJ package? Specifically, I am trying to utilize the MIST stitching plugin ( and I am wondering what may be the most accessible way to access such a plugin in custom python scripts. Thanks for your help!

Edit: I have found that using the run_plugin feature with PyImageJ works great! If there are any other cool solutions that people have found I would love to hear them.


Yes, This is a good first trial -

in your python script -

import imagej
import scyjava
import jgo

ij = imagej.init(‘C:\Programs\ImageJ2\’, headless=False) # Look up the documentation for this command online…“plugin name”)

Search either imagej.init() or and you will find examples…
obviously, the .init() command should be modified to where your imagej2 resides or an official version that the script will download.
you will also need JRE 8 and pip install pyimagej…

1 Like