Computing Histograms of Image Data

You can use the Histogram tool that is available in the Tools box on the Data Properties and Settings panel to visualize the distribution of intensity values over a set interval and to extract basic statistics, such as the minimum, maximum, mean, and median values within the selected data.

Click the Histogram tool on the Data Properties and Settings panel to plot a distribution of intensity values, as shown in the following screen capture.

Histogram Analysis dialog

Histogram Analysis dialog

The following statistics are available for analyzing histograms of image data. Distributions can be extracted from the whole dataset, from data points that correspond to the labeled voxels of the region of interest, or that are contained within a shape. You should note that statistics are calculated from the histogram and not directly from the data. This means that selecting the correct bin count is critical for achieving meaningful results and some experimentation might be needed to determine an appropriate width.

However, there are various useful guidelines and methods to compute bin counts. These include the 'square-root choice', which takes the square root of the number of data points in the sample and rounds to the next integer, Sturges' formula, Freedman–Diaconis' choice, and others. The Wikipedia page on histograms (https://en.wikipedia.org/wiki/Histogram) lists eight such methods.

Histogram statistics and options
  Description
Tools panel The tools at the top of the dialog let you to pan, zoom, and reset the histogram, as well as save the figure and export the plotted values in the comma-separated values (*.csv extension) file format (see Histogram Tools).
Histogram Displays the plotted values, in which each column represents a range of the values and the height of a column corresponds to how many values are in that range.
Y log If selected, the Y-axis will be plotted in log scale.
Bin count Determines the interval in which values will be binned.

Note It is especially important to specify the optimal bin size. Bins that are too wide can hide important details about the distribution, while bins that are too narrow can cause spikes just by coincidence.

Statistics Lets you select the measurements that will be computed. Selected measurements are shown on the histogram and in the Statistics box.

You should note that measurements are calculated from the histogram, not directly from the data.

5th Percentile… Is the value below which 5% of the values in the distribution may be found.

95th Percentile… Is the value below which 95% of the values in the distribution may be found.

Full Width Half Maximum… Is the width of the curve as measured between points on the Y-axis which are at the peak half maximum level.

Note FWHM can be more sensitive to bin count than other statistics. It might not be possible to compute FWHM when the bin count becomes too high and there are not enough bins with values greater than 'Maximum/2'.

Maximum… Is the maximum intensity value within the distribution.

Mean… Is the mean intensity value within the distribution.

Median… Is the median intensity value within the distribution.

Minimum… Is the minimum intensity value within the distribution.

Mode… Is the most commonly occurring value within the distribution.

Standard Deviation… Is the population standard deviation, which is a measure of the amount of variation or dispersion within a set of values. Shown as the range from the mean value on the histogram.

Note Although both population and sample standard deviations measure variability, there are differences between these two computations. If you are calculating the population standard deviation, then you divide by 'n', which is the number of data values. If you are calculating the sample standard deviation, then you divide by 'n -1', which is one less than the number of data values. This means that the sample standard deviation will have greater variability than that of the population.

Sum… Is the integral of all intensities of all of the pixels.

Dataset For regions of interest and shapes, lets you select the dataset from which values will be extracted.
Show legend If selected, a legend with the selected measurements will be superimposed on the plotted values.
Statistics Shows the value of the selected measurement(s).
Copy to Clipboard Copies the selected statistics to the clipboard, which can be pasted into any word processing or spreadsheet application.