[vtkusers] Can't control the number of bins used by vtkImageHistogramStatistics?

David Gobbi david.gobbi at gmail.com
Tue Oct 18 11:18:28 EDT 2016


Out of curiosity, do you want to increase the number of bins in
order to increase the precision?

When I wrote this class, my main intent was to compute statistics
on 8-bit and 16-bit images, and a histogram-based method is very
fast for integer images and also is also very robust.  It's also very
robust for float images, in the sense that the error is small and
bounded.

However, if you want to compute statistics on float data, and to close
to the limits of float precision, then other methods might be better.

 - David

On Tue, Oct 18, 2016 at 9:10 AM, Elvis Stansvik <
elvis.stansvik at orexplore.com> wrote:

> 2016-10-18 16:53 GMT+02:00 David Gobbi <david.gobbi at gmail.com>:
> > On Tue, Oct 18, 2016 at 8:40 AM, Elvis Stansvik
> > <elvis.stansvik at orexplore.com> wrote:
> >>
> >> It seems that even if I call SetNumberOfBins(256), the default (65536)
> >> is always used (float input).
> >>
> >> The docs says "By default, 65536 bins are used for float data, giving
> >> at least 16 bits of precision.", which I thought meant that I could
> >> change this default.
> >>
> >> Is it possible?
> >>
> >> Elvis
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20161018/5c6bbf53/attachment.html>


More information about the vtkusers mailing list