From: davila Date: Wed, 11 Feb 2015 15:47:43 +0000 (+0100) Subject: #2520 creaMaracasVisu Bug New Normal - Color Layer with double images X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=497867af0d89e85bac1566016ee3fe1014207489;hp=-c;p=creaMaracasVisu.git #2520 creaMaracasVisu Bug New Normal - Color Layer with double images --- 497867af0d89e85bac1566016ee3fe1014207489 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageView.cxx index 6a6e3ad..61bb9bb 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageView.cxx @@ -206,17 +206,17 @@ void ColorLayerImageView::SetDefaultGreyLevelBoundary() } // Grey level extrema are set by default to the image grey level extrema. - int minTot = floor (_range[0]); - int maxTot = ceil (_range[1]); + double minTot = _range[0]; + double maxTot = _range[1]; - _grey_level_boundary.push_back((double)minTot); + _grey_level_boundary.push_back(minTot); // By default, the histogram is split into BaseColorNb areas of equal width. double delta = (maxTot - minTot)/GetBaseColorNb(); for (int i = 1; i <= GetBaseColorNb() ; i ++) { - _grey_level_boundary.push_back((double)minTot + i * delta); - } + _grey_level_boundary.push_back(minTot + i * delta); + } // for } //---------------------------------------------------------------------------- @@ -245,17 +245,17 @@ void ColorLayerImageView::SetDefaultBaseColorAndGreyLevelBoundary() _range[1]=255; } - int minTot = floor (_range[0]); - int maxTot = ceil (_range[1]); + double minTot = floor (_range[0]); + double maxTot = ceil (_range[1]); - _grey_level_boundary.push_back((double)minTot); + _grey_level_boundary.push_back(minTot); // By default, the histogram is split into three areas of equal width. double delta = (maxTot - minTot)/3.0; _grey_level_boundary.push_back(minTot + delta); _grey_level_boundary.push_back(minTot + 2*delta); - _grey_level_boundary.push_back((double)maxTot); + _grey_level_boundary.push_back(maxTot); } //----------------------------------------------------------------------------