From 497867af0d89e85bac1566016ee3fe1014207489 Mon Sep 17 00:00:00 2001 From: davila Date: Wed, 11 Feb 2015 16:47:43 +0100 Subject: [PATCH] #2520 creaMaracasVisu Bug New Normal - Color Layer with double images --- .../ThresholdImageView/ColorLayerImageView.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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); } //---------------------------------------------------------------------------- -- 2.47.1