/*N. Vischer 27.04.19, 18:06 BioFormats must be loaded. It can be downloaded from: https://www.openmicroscopy.org/bio-formats/ Then put bioformats_package.jar into ImageJ's plugin folder (see File>Show Folder>plugins). This macro works as follows: a) From the chosen folder, all ".nd2" files are listed, b) after confirmation, these files are saved as tiff hyperstacks in the same folder. */ macro "ND2 to Hyperstack"{ List.setCommands; if (List.get("Bio-Formats Importer")=="") { msg = "Bio-Formats is not installed. \nIt can be downloaded from:\n"; msg += "https://www.openmicroscopy.org/bio-formats/"; print(msg); selectWindow("Log"); exit(msg); } dir = getDirectory("Choose a Directory "); print("\\Clear"); print("Path: " + dir); print("Files to be converted:"); print("---"); list = getFileList(dir); for (loop = 1; loop <=2; loop++){ if (loop == 2){ selectWindow("Log"); waitForUser; print(""); print(" -- saving tiff files: --"); } for (i=0; i