// Macro to open all LSM files in a directory, filter them, and save the filtered results in new // directories, one directory for each type of image processing. // This version 20130625 by M Cammer and J Muller. // ImageJ 1.47u // There may a few superfluous or redundant comands in here, but it works. macro "Process files in directory" { print ("NEW RUN============================"); // debugging doMaxProject =true; path = getDirectory("Choose a Dir"); filename = getFileList(path); newDir = path + "Max Projections" + File.separator; newDirBkg = path + "Background Subtract" + File.separator; if (File.exists(newDir)) exit("Destination directory already exists(Max); remove it and then run this macro again"); File.makeDirectory(newDir); if (File.exists(newDirBkg)) exit("Destination directory already exists (Bkg); remove it and then run this macro again"); File.makeDirectory(newDirBkg); for (i=0; i