Login  Register

Re: How to reference next image in Batch Macro

Posted by Anish Prasanna on Aug 13, 2015; 1:16pm
URL: http://imagej.273.s1.nabble.com/How-to-reference-next-image-in-Batch-Macro-tp5013954p5014010.html

here is the current code i have:

dir = getDirectory("DSC_0179.JPG");
files = getFileList(dir);
i=0;
for(i = 0; i < files.length - 1; i++){
     open(dir + files[i]);
     open(dir + files[i+1]);
     imageCalculator("Subtract create",(dir + files[i+1]),(dir + files[i]));
}