//==================================================== macro "Assign Colors to Zeiss Z series [F4]" { requires("1.47n"); run("Select None"); //run("Stack to Hyperstack...", "order=xyczt(default) channels=3 slices=1 frames=1 display=Composite"); Stack.setChannel(1); run("Blue"); resetMinAndMax(); Stack.setChannel(2); run("Green"); resetMinAndMax(); Stack.setChannel(4); run("Red"); resetMinAndMax(); Stack.setDisplayMode("composite"); Stack.setActiveChannels("1101"); } //================================================== macro "Assign Colors to Zeiss Z series and Max Project" { requires("1.47n"); Stack.setChannel(1); run("Green"); Stack.setChannel(2); run("Blue"); Stack.setChannel(4); run("Red"); Stack.setDisplayMode("composite"); Stack.setActiveChannels("1101"); run("Median...", "radius=0.5"); run("Median...", "radius=0.5"); run("RGB Color", "slices"); s = nSlices(); run("Z Project...", "start=1 stop="+s+" projection=[Max Intensity]"); } //=================================================== macro "Split Channels" { requires("1.47n"); run("Select None"); run("Split Channels"); //close(); //close(); //setSlice(round(nSlices()/2)); } //======================================================== // This macro thresholds the nuclei so that nuclei voxels are 255 and background 0. // macro "Prep Nuclei for Measurement" { requires("1.47n"); run("Select None"); title = getTitle(); title = substring(title, 3); whereWeAreNow = getSliceNumber(); s = nSlices(); run("Duplicate...", "title=[" + title + "] duplicate range=1-"+s+""); setSlice(whereWeAreNow); run("Median...", "radius=6 stack"); setAutoThreshold("Default dark"); setOption("BlackBackground", true); run("Convert to Mask", "method=Default background=Dark black"); convertMaskTo32bits(); setMinAndMax(0, 1); run("Z Project...", "start=1 stop="+s+" projection=[Max Intensity]"); setMinAndMax(0, 1); roiManager("reset"); // each nucleus marked // box around each // count the white voxels of each and mult by dx dy dz run("Histogram", "stack"); } //===================================================================== macro "Convert Mask to 0 and 1" { convertMaskTo32bits(); } function convertMaskTo32bits() { requires("1.47n"); run("Select None"); run("32-bit"); run("Divide...", "value=255.000 stack"); setMinAndMax(0, 1); run("Save"); } // convertMaskTo32bits() //===================================================================== /========================================================= // This macro measures the INTENSITIES and VOLUMES of nuclei that are enclosed in ROIs // listed in the ROI Manager. // If running on a MASK, ignore the intensities. // macro "Measure Intensities of Volumes"{ requires("1.47n"); getVoxelSize(X, Y, Z, unit); print(getTitle + "_nucleus# \t pixels \t cubic"+unit + " \t intensitySum \t Mean" ); for (i=0; i Stacks > Make Montage command macro "Make vertical & horizontal reslices HYPERSTACK VERSION" { requires("1.47i"); boxWidth = 4; // how many pixels wide the reslice is; user may change this run("Colors...", "foreground=white background=black selection=yellow"); title = getTitle(); original = getImageID(); getVoxelSize(XYscale, XYscale, Zscale, unit); //Stack.setDisplayMode("composite"); if (!(isOpen("ROI Manager"))) exit("Must have ROI Manager open and populated."); roiManager("Remove Slice Info"); run("Set Measurements...", " centroid bounding redirect=None decimal=3"); for (i=0; i Stacks > Make Montage command macro "Make vertical & horizontal reslices NOT HYPERSTACK" { requires("1.47n"); boxWidth = 4; // how many pixels wide the reslice is; user may change this run("Colors...", "foreground=white background=black selection=yellow"); title = getTitle(); original = getImageID(); getVoxelSize(XYscale, XYscale, Zscale, unit); //Stack.setDisplayMode("composite"); if (!(isOpen("ROI Manager"))) exit("Must have ROI Manager open and populated."); roiManager("Remove Slice Info"); run("Set Measurements...", " centroid bounding redirect=None decimal=3"); for (i=0; i