/* macros for ImageJ 1.50 by Michael Cammer - please cite NYULMC Microscopy Core if data published Office of Collaborative Science, NYU Langone Medical Center & Skirball Institute Please cite NYULMC OCS Microscopy Core if data published using these methods http://www.med.nyu.edu/ocs/microscopy/acknowledging-us Useful website for importing files directly from Zeiss: https://www.openmicroscopy.org/site/support/bio-formats5.1/users/imagej/ Macros for Lightsheet.Z1 v102 20151112 v107 adds subtraction of one channel from another v109 fixes a problem so that hyperstacks remain hyperstacks with all slices and channels */ //================================================================== var median = true; // change to false if don't want to median filter images var compare = newArray(1 ,2 ); // The channels to compare, in this case green and blue var tab = " \t "; // For clean printout in cells or columns /*================================================================== This is a simple method to save all ROIs in the ROI Manager in the same directory/folder as the image. It does not take into account specific locations in hyperstacks (channels, z slices, frames, times, etc). It simply saves the ROI Manger as-is. */ macro "Save ROI Manager [F7]" { imageDir = getDirectory("image"); // where to save results originalTitle = getTitleStripExtension(); newName = imageDir + originalTitle + ".zip"; roiManager("Save", newName); } // end Save ROI Manager //================================================= macro "Check Dimensions" { Stack.getDimensions(width, height, channels, slices, frames); print("\n", getTitle()); print("channels: ", channels); print("slices (Z): ", slices); print("frames (T): ", frames); selectWindow("Log"); } // end Check Dimensions //================================================= /* This macro opens a series of .czi files, and does subtraction */ macro "Open images, process, and save results [q]" { requires("1.50"); printDateTime(); run("Close All"); openPath = getDirectory("Choose a Directory"); fileList = getFileList(openPath); run("Colors...", "foreground=white background=black selection=cyan"); filecount = 0; for (i=0; i