Saving multiple summaries as one file after Analyze Particle in FIJI

Currently I have the following macro.

    run("Smooth");
    run("Sharpen");
    resetThreshold();
    setAutoThreshold("Intermodes");
    setAutoThreshold("MaxEntropy");
    run("Convert to Mask");
    run("Convert to Mask");
    run("Convert to Mask");
    run("Make Binary");
    run("Analyze Particles...", "display summarize");
    close();

What it does, is to take individual TIF image and do some cleaning and count the particles using “Analyze Particles” module. Now at the end of this code it produce a single summary file for one image. What I want to do is to run this macro on twelve TIF images and then put all the summary as one single Excel file. How can I do it?

Just use the batch Process->Batch->Macro action, see:

https://imagej.nih.gov/ij/docs/guide/146-29.html#toc-Subsection-29.12

Summarize at the end (after batching all files) to get a summary from all files.

You can also do this programmatically:

See also this forum thread:

1 Like

How can I do summarize at the end? Can you give example of macro?

The easiest way would be to do it after the macro run in the Resuts table: Results->summarize.

1 Like

Where can I find Results->summarize. ?

In the results table where the measurements are listed:

1 Like

So my macro will simply be this? Note, that I remove the “display summarize” in Analyze particle.

I would display the values which you can then summarize (if you only have 12 images):

run("Analyze Particles...", "display include");

Use the macro recorder to find and customize the right macro commands (see my first post).

1 Like