Re: How to reference next image in Batch Macro
Posted by
G. Esteban Fernandez on
URL: http://imagej.273.s1.nabble.com/How-to-reference-next-image-in-Batch-Macro-tp5013954p5014023.html
This is what I'd do:
dir = getDirectory("Choose a folder");
files = getFileList(dir);
for(i = 0; i < files.length - 1; i++){
open(dir + files[i]);
image1 = getTitle();
open(dir + files[i+1]);
image2 = getTitle();
imageCalculator("Subtract create", image2, image1);
selectWindow(image1);
close();
selectWindow(image2);
close();
}
At the end you're left with all the subtraction results open in separate
windows.
-Esteban
On Aug 13, 2015 11:25 AM, "Anish Prasanna" <
[hidden email]> wrote:
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html