[Insight-users] Histogram-Size for Histogram-Metric

Miller, James V (Research) millerjv@crd.ge.com
Wed May 12 13:45:40 EDT 2004


There are several "rules of thumb" published in the literature for deciding
how many histogram bins to use. 

Freedman and Diaconis suggest the formula (this is summarized in Izenman
1991)

      W = 2*(IQR)N^(-1/3)

where:
	W is the bin width
	N is the number of samples (pixels)
	IQR = CDF^(-1)(0.75) - CDF^(-1)(0.25)

The number of bins is then

	Nbins = Intensity Dynamic Range / W

So for CT data, the dynamic range may be 2500 HU, while the inverse CDF
evaluations may be something like 1000 HU and 100 HU respectively (this
depends on the portion of the anatomy imaged and the field of view). The
standard image size for CT is 512x512 pixels. Using the above formulas, the
suggested number of bins is approximately 100.

100 bins is a pretty good number for CT data. Though you may want to adjust
this
based on what you are trying to accomplish.  For some CT applications, you
may 
want to drop down to 20-40 bins.  The choice comes down to what you want the
histogram to tell you.  If you are trying to identify modes, you might want
fewer bins than 100. This depends heavily on the distribution of
intensities.

Chapter 1 of Wand and Jones' book "Kernel Smoothing" give a nice discussion
on how histograms can lie.  Page 6 has a nice set of histograms derived from
one
set of data where the histograms differ in their bin size or differ in where
the left edge of the histogram starts (shifted by half a bin in two cases).
Looking at the histograms individually, you would draw several different
conclusions from the data. 

But the above formulas usually give a pretty good starting point.



-----Original Message-----
From: Raghavendra Chandrashekara [mailto:rc3@doc.ic.ac.uk]
Sent: Wednesday, May 12, 2004 6:43 AM
To: Michael
Cc: insight-users@itk.org
Subject: Re: [Insight-users] Histogram-Size for Histogram-Metric


Hi Michael,

The choice of histogram size will depend on the distribution of 
intensities in the images that you are using. I have found that for 
cardiac  TrueFISP MR images a resonable choice is 64 x 64.

Raghavendra

Michael wrote:

> Hi,
>
> when using one of the metric classes derived from 
> HistogramImageToImageMetric, what is a reasonable size for the 
> histogram? I've noticed that the default size is set to 256x256. If an 
> image pixel is represented by an 8-bit value, this would mean we have 
> a histogram bin for every intensity value pair that can occur. Is this 
> reasonable in any case? I mean, if a pixel is coded using, say, 16 
> bits, should the histogram size be 2^16*2^16? This would obviously 
> increase the computational complexity, since instead of iterateing 
> through (2^8)^2 = 2^16 bins we now have to iterate through more that 
> (2^16)^2 = 2^32 > 4*10^9 bins in the EvaluateMeasure method.
>
> Are there any hints that help to estimate a reasonable histogram size?
>
> Thanks,
>
> Michael
>
> _______________________________________________
> Insight-users mailing list
> Insight-users@itk.org
> http://www.itk.org/mailman/listinfo/insight-users



_______________________________________________
Insight-users mailing list
Insight-users@itk.org
http://www.itk.org/mailman/listinfo/insight-users



More information about the Insight-users mailing list