Login  Register

Re: add x number of stacks

Posted by ved sharma-2 on Sep 08, 2010; 8:23pm
URL: http://imagej.273.s1.nabble.com/add-x-number-of-stacks-tp3687001p3687002.html

Hi Fabrice,

I think it will also work your way. See the code below:

---------------------
dir = getDirectory("Choose a Directory ");
list = getFileList(dir);
open(dir+list[0]);
rename("combined");

for (i=1; i<list.length; i++) {
        showProgress(i, list.length);
        open(dir+list[i]);
        current = getTitle();
        imageCalculator("Add stack", "combined",current);
        selectWindow(current);
        close();
}
----------------------

Ved