setBatchMode("show"); oldTitle=getTitle(); run("32-bit"); run("ROF Denoise", "theta=25"); run("Enhance Contrast...", "saturated=0.3 normalize"); setAutoThreshold("Default dark no-reset"); setOption("BlackBackground", false); msg = "Adjust threshold sliders (if auto is insufficient), DON\'T CLICK APPLY, click OK here."; waitForUser("Engulf Cells", msg); getThreshold(lower1, upper1); setThreshold(lower1, upper1); run("Convert to Mask"); run("Fill Holes"); run("Watershed"); run("Invert LUT"); File.append(oldTitle+" : LowerThreshold= "+lower1+" UpperThreshold = "+upper1, getDirectory("image")+"Maps"+File.separator+"ThresholdingInfo.txt"); setBatchMode("hide");