/*This macro takes a folder of stacked three channel images (TxRed, DAPI, FITC) and takes user-defined thresholds to identify particles/cells that are above the given threshold. It applies the same thresholds to all files in the directory. It then saves two Excel files per image stack: one for DAPI and one for FITC. Prior to running the script, user must already know the threshold values to identify DAPI cells as well as FITC (H2AX) positive cells. When thresholding, the cells should be red and the background dark. Window outputs are suppressed until the end of the script*/ //Updated September 29, 2017, J. Bagnall inputFolder = getDirectory("Choose input folder"); var allImages; allImages = getFileList(inputFolder); numberOfImages = allImages.length; if (getVersion>="1.40e") setOption("display labels", true); setBatchMode(true); //Get thresholds from user Dialog.create("Choose Intensity Threshold Values"); Dialog.addNumber("Low DAPI threshold:", 491); Dialog.addNumber("High DAPI threshold:", 4095); Dialog.addNumber("Low FITC threshold:",385); Dialog.addNumber("High FITC threshold:", 4095); Dialog.show(); lowDAPIThreshold = Dialog.getNumber(); highDAPIThreshold = Dialog.getNumber(); lowFITCThreshold = Dialog.getNumber(); highFITCThreshold = Dialog.getNumber(); for (i=0; i