X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FThresholdImageView%2FColorLayerImageView.cxx;h=f3760e9141f5643fa9178c66b4644a6c68be3731;hb=2154a89395b7e9869b0e3dea859425d52a5aa9bd;hp=38f25f35139a03833313d5b32021c68a0c48e0b6;hpb=94b0c79651e564f4627916e0f605b928457d39a5;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageView.cxx index 38f25f3..f3760e9 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageView.cxx @@ -318,8 +318,11 @@ void ColorLayerImageView::ConfigLookupTable() // virtual SetDefaultBaseColorAndGreyLevelBoundary(); } else { // If at least one color has been set, set the grey level boundaries to build an equipartition of the image grey levels, keeping the base colors defined. - if (GetBaseColorNb() != (int)_grey_level_boundary.size() ) + if (GetBaseColorNb() != (int)_grey_level_boundary.size()-1 ) { + +printf("EED ColorLayerImageView::ConfigLookupTable() %d %d\n", GetBaseColorNb() , (int)_grey_level_boundary.size()+1 ); + std::cout << "CM ColorLayerImageView::ConfigLookupTable : ERROR!!! Inconsistency between the sizes of vectors _base_color and _grey_level_boundary. _base_color.size()/3 (=" <<_base_color.size()/3 << ") should be equal to _grey_level_boundary.size() - 1 (=" << _grey_level_boundary.size() - 1 << ")." << std::endl; std::cout << "CM The default values for the base colors and the grey level boundaries will be set." << std::endl; SetDefaultGreyLevelBoundary();