// These macros open all the files in a folder and place them in a stack // Two dialog boxes are displayed. Select the source folder in the // first and the destination folder in the second. // // This macro assumes that the files are named in some kind of logical order // the images are placed in a first in / first out stack with image #1 // on top followed by image #2 and so on // // gma - 28 mar 05 // macro "Batch Convert TIFFs to Stack" { convert("tiff"); } function convert(format) { requires("1.33s"); // prompt user for source directory dir1 = getDirectory("Choose Source Directory "); // prompt user for dsetination directory dir2 = getDirectory("Choose Destination Directory "); // read in file listing from source directory list = getFileList(dir1); // call the sort function and sort the list sort(list); // loop over the files in the source directory setBatchMode(true); for (i=0; ia[i]) i++; while (j>from && center