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

Elvis Stansvik elvis.stansvik at orexplore.com
Tue Oct 18 12:26:41 EDT 2016


Den 18 okt. 2016 5:18 em skrev "David Gobbi" <david.gobbi at gmail.com>:
>
> Out of curiosity, do you want to increase the number of bins in
> order to increase the precision?

Ah, no the opposite actually. I wanted to reduce the number of bins from
the default of 65536 (for float) to something like 256 or 512, as I had no
need for greater precision.

The reason I picked this class was because it seemed convenient that I
could get both the histogram itself and also some rough stats at the same
time.

Elvis

>
> 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/18c8cddb/attachment.html>


More information about the vtkusers mailing list