Commit 4d038036 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[FIX] - fixed round-bug

parent 4c05945a
...@@ -259,7 +259,7 @@ void WMHistogramEqualization::moduleMain() ...@@ -259,7 +259,7 @@ void WMHistogramEqualization::moduleMain()
for ( size_t vi = 0; vi < valueSet->rawSize(); ++vi ) for ( size_t vi = 0; vi < valueSet->rawSize(); ++vi )
{ {
size_t idx = hist->getIndexForValue( valueSet->getScalarDouble( vi ) ); size_t idx = hist->getIndexForValue( valueSet->getScalarDouble( vi ) );
newData[ vi ] = static_cast< unsigned char >( idx / maxI * 255 ); newData[ vi ] = static_cast< unsigned char >( static_cast< double >( idx )/ static_cast< double >( maxI ) * 255.0 );
} }
} }
++*progress; ++*progress;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment