[Insight-developers] question about itkHistogram upper bounds

gang song songgang97 at gmail.com
Fri Aug 26 18:06:58 EDT 2011


Hi,

I was trying to run histogram matching (HistogramMatchingImageFilter)
on a pair of binary images and came across some NaN numbers in the
output image. After some digging, the underlying reason may be that in
itk::Histogram, samples are thrown out if they equal to the upper
bound. So in this implementation, the samples are collected in bounds
left close and right open:
[ lower_bound, upper_bound ) .

This gives inconvenience in designing the bins of histogram. In some
applications, a small epsilon has to be added to upper bound. But the
scale of the epsilon depends on applications.

I am thinking about changing the sampling behavior to include the
upper bound as close bounds:
[ lower_bound, upper_bound ]
And the samples equaling to upper bound will be counted in the last
bin.  I would like to push a gerrit patch for this, but not sure if
the original behavior is deliberately designed.



Thanks

-Gang


More information about the Insight-developers mailing list