/* Create table of statistic from Results table using array statistics * Peter J. Lee - NHMFL - This version: v160809 v211117 Updated functions */ macroL = "Summary_Statistics_Table_v211117.ijm"; setBatchMode(true); N = nResults; if (N==0) { showMessageWithCancel("No results to play with ¯|_(?)_/¯","This macro requires a results table and will proceed with the Blobs demo instead."); if (isOpen("blobs.gif")) selectWindow("blobs.gif"); else run("Blobs (25K)"); run("Make Binary"); run("Analyze Particles...", "size=0-Infinity circularity=0.00-1.00 show=Nothing display exclude"); } N = nResults; imageTitle = getTitle(); dirImage = getDirectory("image"); stats = newArray( "N", "Sum", "Mean", "Median", "StdDev\(sample\)", "CoeffVar\(%\)", "SE","95% CI", "Min","Max", "Range", "IQR", "Scott's Bin size", "FD Bin Size", "log stats mean", "log stats -stdDev", "log stats +stdDev", "log stats -coeffVar\(%\)", "log stats +coeffVar\(%\)"); cleanUp(); /* Before ROI manager check */ headings = split(String.getResultsHeadings); for (i=0; i0) { hideResultsAs("Statistical_Summary"); restoreResultsFrom("Results_Main"); } resultsArray = newArray(N); logResultsArray = newArray(N); for (r=0; r