On Jul 14, 2015, at 5:03 AM, damien.schnebelen <
[hidden email]> wrote:
>
> Dear all,
> I have calculated stacks histograms using the StackStatisticks function and
> I have noticed that the maximum counts value is truncated to 2^31 -1.
> Is it possible to get a long precision histogram?
The ImageStatistics.getHistogram() method returns a long precision histogram. The following is a JavaScript example.
-wayne
imp = IJ.createImage("Untitled", "8-bit black", 1024, 1024, 2050);
stats = new StackStatistics(imp);
longHistogram = stats.getHistogram();
print("pixel count: "+stats.longPixelCount);
print("stats.histogram[0]: "+stats.histogram[0]);
print("longHistogram[0]: "+longHistogram[0]);
print("2^31-1: "+ (Math.pow(2,31)-1));
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html