Login  Register

Re: how to run multiple copies of ImageJ?

Posted by cudmore on Oct 09, 2016; 8:10pm
URL: http://imagej.273.s1.nabble.com/how-to-run-multiple-copies-of-ImageJ-tp5001939p5017326.html

I am also trying to run multiple instances of Fiji/ImageJ on the mac and can not get it working.

There is no 'Run single instance listener' available in 'Edit>Options>Misc...'

I tried running Fiji from the command line using '/Fiji.app/Contents/MacOS/ImageJ-macosx --allow-multiple'. This does not work either and I get '[INFO] Detected existing ImageJ; passing arguments along' at my command prompt.

Fiji version: 2.0.0-rc-49/1.51d, Build e01a259e5d, Date 2016-05-06

I am tring to run multiple instances of a plugin so I can make my batch processing faster. In particular I want to run MultiStackReg on a number of .tif files at the same time. It appears MultiStackReg (and the underlying Stackreg) is not multithread aware? This is why I am trying to run multiple copies of Fiji at the same time.

How can we run multiple instance of fiji at the same time? I want to do this from a python script as follows. 'testspawn_.py' is my fiji code that will call MultiStackReg.

    import subprocess

    fijipath = '/Users/cudmore/Fiji_20160914.app/Contents/MacOS/ImageJ-macosx'
    switches = '--run' # do not use -macro
    plugin = '/mydirectory/testspawn_.py'
    args = 'tiffile="mytif.tif"'
    subprocess.Popen([fijipath, switches, plugin, args])

bob