]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewPanel.cxx
#2651 creaMaracasVisu Feature New Normal - Color Layer: Transparent Base, Refresh
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / ThresholdImageView / ColorLayerImageViewPanel.cxx
index d6efc9123ee1ebbf4b0249a3c1d2370295f6592b..20a723cd68e948279419dddbffd77dd57f5b2860 100644 (file)
@@ -289,15 +289,16 @@ void ColorLayerImageViewPanel::SetImage(vtkImageData *img)
 
             img->SetSpacing(spc);
         } // spc !_spcBase   dim!__dimBase
+    } // _firsttime_mode
 
-               if (_active==true)
-               {
-                   _colorLayerImageViewManager->onThreshold();
-                RefreshView();
-               }
-
+printf("EED ColorLayerImageViewPanel::SetImage\n");
+       if (_active==true)
+       {
+printf("EED ColorLayerImageViewPanel::SetImage _active=true \n");
+           _colorLayerImageViewManager->onThreshold();
+               RefreshView();
+       } // _ative 
 
-    }
 }
 
 
@@ -354,6 +355,7 @@ void ColorLayerImageViewPanel::onThresholdChange(wxCommandEvent& event)
 void ColorLayerImageViewPanel::onThresholdShow(wxCommandEvent& event)
 {
         _thresholdGo = _cb_ShowHide->GetValue();
+                       _active = _thresholdGo;
         if (_thresholdGo)
         {
                    _colorLayerImageViewManager->onThreshold();
@@ -411,8 +413,8 @@ void ColorLayerImageViewPanel::onSliceImage(wxScrollEvent& event)
 //----------------------------------------------------------------------------
 void ColorLayerImageViewPanel::onChangeOpacity(wxScrollEvent& event)
 {
-        int opacity = _opacity->GetValue();
-        _colorLayerImageViewManager->onThresholdChangeOpacity(opacity);
+       int opacity = _opacity->GetValue();
+       _colorLayerImageViewManager->onThresholdChangeOpacity(opacity);
        RefreshView();
 }