/* macros for ImageJ 1.51 by Michael Cammer - please cite NYULMC Microscopy Core if data published Division of Advanced Research Technology & Skirball Institute https://med.nyu.edu/research/research-resources/scientific-cores-shared-resources/microscopy-laboratory/policies These macros are for importing files saved as two separate channels where matching images end with: 0 red 1 green Example: MFGTMP-PC_170619130001_A01f00d0 MFGTMP-PC_170619130001_A01f00d1 v101 works for both TIF and TIFF extensions. */ //================================================= /* This macro opens a series of paired JPEG files and merges them. There must be an even number of JPEG files in pairs in the directory for this macro to work. Best practices would error check. THIS MACRO DOES NOT ERROR CHECK. If there is a stray JPEG file without a pairing, this macro will crash. Files that don't have the JPEG extension are ignored. */ macro "Open images, process, and save results [q]" { run("Close All"); openPath = getDirectory("Choose a Directory"); fileList = getFileList(openPath); counter = 0; for (i=0; i