]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageView.cxx
#2961 creaMaracasVisu Feature New Normal - new SliderMinMax-flexible complexbox
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / ThresholdImageView / ColorLayerImageView.cxx
index 38f25f35139a03833313d5b32021c68a0c48e0b6..f3760e9141f5643fa9178c66b4644a6c68be3731 100644 (file)
@@ -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();