##First batch run. Saves files that are grayscale with even illumination #Convert each image to grayscale run("8-bit"); #Apply an already prepared image to account for uneven illumination. Use Gaussian blur with radius of 200. Blurred image must be open in ImageJ before running the Batch function currentTitle = getTitle(); referenceTitle = "gauss200blur.jpg" imageCalculator("Subtract create 32-bit", currentTitle, referenceTitle); saveAs("Jpeg", ("Result of " + currentTitle)); ##Second batch run #Enhance contrast //run("Brightness/Contrast..."); run("Enhance Contrast", "saturated=0.35"); run("Enhance Contrast...", "saturated=1 normalize"); #Threshold the image, making only the animals of interest black and the rest of the pixels white run("Auto Threshold", "method=Yen"); #Measure pixels in each image from several ROIs. First define ROIs and save them as RoiSet //roiManager("Open", "../RoiSet.zip"); roiManager("multi-measure measure_all one append");