Login  Register

Different histograms in the macro and Java

Posted by Avital Steinberg on Sep 03, 2015; 9:31am
URL: http://imagej.273.s1.nabble.com/Different-histograms-in-the-macro-and-Java-tp5014228.html

Hi,
I would like to get the same histogram as the one obtained in Analyze,
histogram - using Javascript, and get the values  obtained when clicking on
"List" in the histogram window in ImageJ. (without displaying the histogram)

The problem is that the command recorder records nothing when I click on
list, so it's not clear to me how to get the values after using the command:

IJ.run(imp, "Histogram", "");

Also, if I use the getHistogram function from the ImageProcessor or
ImagePlus class in the Java API, it gives a different histogram. The bin
width is 1, instead of (xmax - xmin)/nBins bin width. I would like to get
the same histogram as the one in Analyze, histogram.

Is there an easy way to do this?

Thanks,
Avital

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html