//This file takes a folder of stacked dual channel images (DAPI, FITC) //It has the user define a threshold value for DAPI, and uses them for all files //in the directory. It uses the DAPI mask to find intensity values for the FITC channel. //Prior to running the script, user must already know the threshold values to identify //DAPI. When thresholding, the nuclei should be red and the background dark. //It then saves all data in one Excel sheet // //J. Bagnall //Updated August 29, 2018 inputFolder = getDirectory("Choose input folder"); var allImages; allImages = getFileList(inputFolder); numberOfImages = allImages.length; if (getVersion>="1.40e") setOption("display labels", true); setBatchMode(true); //Get threshold from user Dialog.create("Choose Threshold Values"); Dialog.addNumber("Low threshold:", 0); Dialog.addNumber("High threshold:", 65535); Dialog.show(); lowThreshold = Dialog.getNumber(); highThreshold = Dialog.getNumber(); resultfilename = getString("Enter result file name: ", resultfilename); //loop through all images in folder for (i=0; i