/* Macros written to count spots in plates. This macro was tested on 16 bit images. It may work on 8 bot Images. Color images would need to be converted using Image > Type > 16-bit. Instructions: * Open image and run "Auto Threshold Plate". * Draw a circle over the well to be counted. This may be a region of interest saved in the ROIManager so that the size is always exactly the same. * Run macro "Measure spots in area [q]" or just type the letter q. * Drag ROI to next area to be measured and repeat. */ macro "Auto Threshold Plate" { setAutoThreshold("Default"); setOption("BlackBackground", true); run("Convert to Mask"); run("Erode"); run("Dilate"); run("Watershed"); } macro "Measure spots in area [q]" { run("Set Measurements...", " redirect=None decimal=3"); original = getImageID; run("Duplicate...", " "); tempimage = getImageID; run("Analyze Particles...", "pixel show=Outlines exclude include summarize"); outlinesimage = getImageID; selectImage(tempimage); close(); selectImage(original); selectImage(outlinesimage); selectWindow("Summary"); }