image calculator batch macro help required
Posted by mfbx9nn4 on Aug 25, 2016; 12:34am
URL: http://imagej.273.s1.nabble.com/image-calculator-batch-macro-help-required-tp5017110.html
Hi,
First time macro user on ImageJ so very much learning as I go.
I'd like to process a series of images where i stack pairs, run functions such as smoothen etc, stack>images then divide one by the other. Each image ends with w3YFP_t1 or w2CFPexYFPem_t1.
I've tried browsing online to find a solution to this with no success. Essentially the issue is in the image calculator function, where I can't define images with a variable prefix for the image calculator. Below is what I have so far.
name = getTitle();
prefix = substring (name, 0, lastIndexOf(name, " "));
run("Images to Stack", "name=Stack title=[] use");
run("Smooth", "stack");
run("Subtract Background...", "rolling=125 stack");
run("32-bit");
run("16 colors");
run("Stack to Images");
imageCalculator("Divide create", "+prefix+" w3YFP_t1, "+prefix+" w2CFPexYFPem_t1);
selectWindow("Result of DPI 002 18hpa x4obj Eve Dead_w3YFP_t1");
Any advice on how to resolve this would be massively appreciated. Thanks!