Accuracy error when converting float (-4.31608963) to string.
Mantis Issue 791, reported by jmichel, assigned to salbert, created: 2013-10-15
When running the dimensionnality reduction application on some image, when the application processing is over, data ingestion begins but a pop-up window says "Accuracy error when converting float (-4.31608963) to string." and the data is not ingested.
1381933665 - salbert1. The application also displayed a "std::bad_alloc" pop-up with lena512color.jp2; Inverse OFF or ON; Algo PCA.
1381935002 - salbertException is raised in mvdAlgorithm.h:574. It is due to a bad comparison between floatString.toDouble() and floatValue. It should be floatString.toFloat() and floatValue.
1382002307 - salbertChangeset: http://hg.orfeo-toolbox.org/Monteverdi2/rev/d8bcb100b8c9 -- Fixed bad comparison floatQString.toDouble()==floatValue instead of floatQString.toFloat()==floatValue. -- Fixed missing parenthesis in Scott's formula used to compute number of bins of histogram. A negative number of bins was calculated and casted to (huge) unsigned int used to allocate std::vector<> container. This lead to a std::bad_alloc exception raised.