On May 13, 2014, at 11:35 AM, fm017 wrote:
> Dear All,
>
> I have an Image Sequence (about 100 slices) as 8bit in ImageJ. Now I would
> like to export the grayscale values (like with ANALYZE/HISTOGRAM/LIST) for
> every slice into a text or Excel file.
> All values in one file. I mean a table with one column for grayscale values
> followed by many columns (for each slice one column) with the (pixel-)
> counts.
> I would be glad for any suggestions, plugins, macros or something.
Here is a macro that saves histogram counts of all images in a stack as a comma separated text file:
run("Clear Results");
setOption("ShowRowNumbers", false);
for (slice=1; slice<=nSlices; slice++) {
setSlice(slice);
getRawStatistics(n, mean, min, max, std, hist);
for (i=0; i<hist.length; i++) {
setResult("Value", i, i);
setResult("Count"+slice, i, hist[i]);
}
}
path = getDirectory("home")+"histogram-counts.csv";
saveAs("Results", path);
> --
> View this message in context:
http://imagej.1557.x6.nabble.com/Export-grayscale-values-from-a-stack-into-text-or-excel-file-tp5007716.html> Sent from the ImageJ mailing list archive at Nabble.com.
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html