Calculator Plus Plugin with Batch>Macro

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Calculator Plus Plugin with Batch>Macro

Elyar
Hi Everyone!

I'm trying to use a Macro to subtract a set of images from a specific image (Background Image) with Calculator Plus plugin.

I use the following Macro, which has been recorded by Macro Recorder:

open("newfolder1\\DSC_5314.JPG");
open("newfolder1\\DSC_5318.JPG");
run("Calculator Plus", "i1=DSC_5314.JPG i2=DSC_5318.JPG operation=[Subtract: i2 = (i1-i2) x k1 + k2] k1=2.5 k2=0");
run("Close");
run("Close");


Using Batch>Macro, the problem is that it saves the original files in the output folder. I removed the tick of "Create New Window" in the Calculator Plus, but no luck except for the first iteration, as long as the recorder does not record this action.

I also realized if I delete both close commands, it will extract the subtracted image of the first input and will keep extracting the same subtracted image for all of the images!


Any suggestions of how I can make it work?

FYI, I use ImageJ 1.48g on Windows 7 and here is the link for Calculator Plus:
http://rsb.info.nih.gov/ij/plugins/calculator-plus.html