Batch process with Image Calculator

Hello,
I just discovered Fiji and I am using Image Calculator to process my images. It works great and now I would like to use the Batch mode and create a macro to analyze several images automatically, but I have no idea where to start. So, any help is more than welcome!

Here is my plan:
I have two folders with pictures:
Folder “S”: contains sample pictures
Folder “R”: contains reference Pictures

Now I would like to compare these pictures with each other in the following way:
Picture “Sample1” from folder “S” should be compared with every reference pictures in folder “R”.
Something like: imageCalculator(“Average create”, “Sample1.Tiff”,“Reference1.Tiff”);

The file name should be changed in “Sample1+Reference1” and saved in a new folder “Output”

This steps should be repeated till “Sample1” was compared with all references in folder “R”.

After that, “Sample2” in folder “S” should be processed and so on …
I hope it is not too confusing.

If anyone has an idea where to start or links to tutorials, I would be very happy!

Regards
James

Hello Herbie,

Thank you so much for your help and work!

I already had the possibility to test the ImageJ-macro and it works just perfectly!

I just had to exclude “requires( “1.52k” );” (I placed “//” in front of it). Otherwise, a window appears which I could only confirm with “ok” and then the macro stopped.

Again, many thanks!

Regards
James