//Identify source directory sdir=getDirectory("Choose source directory "); list = getFileList(sdir); //Identify appropriate image file extension type Dialog.create("Specify File extension"); Dialog.addString("File extension","JPG",3); Dialog.show(); ext=Dialog.getString(); //Identify destination directory ddir=getDirectory("Choose destination directory "); //Identify ROI directory roidir=getDirectory("Locate appropriate ROI files "); //Get lower thresholding value Dialog.create("Specify lower value for thresholding "); Dialog.addString("Lower Threshold Value","70",3); Dialog.show(); lowthresh = Dialog.getString(); //Get name of output file Dialog.create("Specify name of output file "); Dialog.addString("Output file","ImageJ_detailed_output.xls",30); Dialog.show(); outfile = Dialog.getString(); //Prepare output file with column headings File.append("Area" + "\t" + "Major" + "\t" + "Minor" + "\t" + "Feret" + "\t" + "ImageName" + "\t" + "PatchRichness" + "\t" , ddir + "\\" + outfile); //Identify regions of interest run("ROI Manager..."); roiManager("Open", roidir + "\\FullArena.roi"); roiManager("Open", roidir + "\\LowRed.roi"); roiManager("Open", roidir + "\\ModerateYellow.roi"); roiManager("Open", roidir + "\\HighGreen.roi"); for (i=0; i