Page MenuHomePhabricator

Statistics view automatically sets an extreme small bin size if a size of less then 1.0 entered
Closed, ResolvedPublic

Description

(1) Load the disk image from the grayvalues.dcm ( MITK-Data/ImageStatisticsTestData )

(2) open the Statistics view
(3) uncheck the 'Use default bin size'
(4) try to set some size less then one ( f.i. 0.5 ),

==> the bin size then sets the value to 0.00001

This leads to an extreme memory consumption and freeze of the application.

Event Timeline

Ok, after several tests:

(1) the bin size gets resetted into its minimal value (set in the Controls.ui) if a value less than one is entered

(2) the freeze seems to happen in the JS part

Weird... the problem is not in the histogram computation itself, by sufficient time left for computation, the histogram appears.

The freeze happens if an interaction with the UI or the render windows happens during the computation.

Pausing a debug session during the initiated freeze, the program remains in the Qt5WebKit.so, so it is the Histogram.js and associated.

Maybe the bin size is first propagated after an initial interaction ( change event ) and a call to recompute the histogram. This then freezes in the computation due to a big number of bins.

Sebastian and me found that some datatypes were wrong in the file "QmitkImageStatisticsCalculationThread.h", "QmitkImageStatisticsCalculationThread.cpp", "ImageStatisticsCalculator.cpp" and "ImageStatisticsCalculator.h". The return type of "GetHistogramBinSize ()" should be DOUBLE!

After changing the datatypes, it seems work well.

User zhangyan has pushed new remote branch:

bug-19061-ImageStatisticsSmallBinsizeFix