1) How can I read the values in a histogram within ImageJ
I can export the values but I want to perform a calculation within imageJ.
Presumably the data in the histogram exists somewhere as a 256,1 32 bit array.
2) When thresholding it would be helpful to be able to see the log version of the histogram, to identify how well the threshold fits minor peaks. The log version is available from analyse/histogram.
-----Original Message-----
From: ImageJ Interest Group [mailto:
[hidden email]] On Behalf Of Rasband, Wayne (NIH/NIMH) [E]
Sent: den 13 maj 2014 19:45
To:
[hidden email]
Subject: Re: Export grayscale values from a stack into text or excel file
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--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html