How to save colocalization report and log in headless mode: Fiji ImageJ2?

Hi All,

I am trying to automate the procedure of comparing the colocalization in two images using the headless mode in Fiji.

A brief procedure of what I am trying to do:

  1. Open an image, split channels, and close the blue and green channels.
  2. Open a second image and again split channels, and close the blue and green channels.
  3. Analyze the two red channel images using coloc 2 and save the log file.

I have added the imagej source folder to the path.

Here is the batch code I have so far:

imagej-win64 --ij2 --headless MZ_104.0263.png -run "Split Channels" -run "Close" -run "Close" MZ_108.0951.png -run "Split Channels" -run "Close" -run "Close" -run "Coloc 2" 

How do I proceed after this? Manipulating the various options that coloc 2 offers, then running it and then saving the report and the log files (using a naming scheme of my choice)?

Also, I need to do this for multiple pairs of images, if there is a way to do that efficiently.

This bat file would be created as a part of a larger python script and the log text file saved from it would be used for further analysis. Mentioning this just in case there is a python based solution to this problem. I am using python 3.7

Any help will be much appreciated. I have attached the images I am using.

Veerupaksh

0263 0951

@veerupaksh

Calling Coloc 2 headlessly doesn’t really work - unfortunately. The calculations are really tied to the generation of the output GUI - so it has to be created to get access to all measures. Read through this older forum post (and linked posts within as well) to have a look:

Depending on what you need for your analysis… you can potentially use colocalization ops instead as indicated by @ctrueden’s reply in that thread.