]> Creatis software - creaMaracasVisu.git/commitdiff
#3086 creaMaracasVisu Bug New Normal - Init opacity in ColorLayer box
authorEduardo DAVILA <davila@localhost.localdomain>
Wed, 5 Apr 2017 21:05:41 +0000 (23:05 +0200)
committerEduardo DAVILA <davila@localhost.localdomain>
Wed, 5 Apr 2017 21:05:41 +0000 (23:05 +0200)
bbtk/src/bbcreaMaracasVisuColorLayerImageView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewManager.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewPanel.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewPanel.h

index 9b1d4386a2c4bcbfb94d66cc629f412d25d88aea..483943e2993b19b715ca3df8e54ecbe29aeb4672 100644 (file)
@@ -45,15 +45,15 @@ void ColorLayerImageView::Process()
 
         if (firsttime==true)
         {
-               firsttime=false;
+//             firsttime=false;
        clivp->SetActive( bbGetInputActive() );
         }
 
-
     clivp->GetColorLayerImageViewManager()->SetwxVtkBaseView( 0 , bbGetInputWxVtkBaseView() );
     clivp->GetColorLayerImageViewManager()->SetwxVtkBaseView( 1 , bbGetInputWxVtkBaseView1() );
     clivp->GetColorLayerImageViewManager()->SetwxVtkBaseView( 2 , bbGetInputWxVtkBaseView2() );
 
+
     std::vector<double> range = bbGetInputlstRangeForColorBar();
     clivp->GetColorLayerImageViewManager()->SetRangeForColorBar( range );
 
@@ -78,16 +78,11 @@ void ColorLayerImageView::Process()
 
     bbSetOutputNewImage( clivp->GetColorLayerImageViewManager()->GetImageChangeInformation(0) );
 
-
-
-//   std::string msg;
-//    if (bbGetInputTitle()!="")
-//    {
-//        msg = bbGetInputTitle()+": " + bbGetInputIn();
-//    }else{
-//        msg = bbGetInputIn();
-//    }
-//   ((wxStaticText*)bbGetOutputWidget())->SetLabel( bbtk::std2wx( msg ) );
+        if (firsttime==true)
+        {
+               firsttime=false;
+       clivp->ChangeOpacity();
+        }
 
 }
 //=====
index b086e9e78a9376074ae95b8b120483e4ce25df9a..f5c9c4cf6a9c76c22057ae3343cd5472726090c9 100644 (file)
@@ -75,7 +75,7 @@ class  ColorLayerImageViewManager
          void                          GetSpcBase                                      (int id,double  *spc);
          void                          GetDimensionOriginalLayer       (int id,int     *dim);
          void                          GetSpcOriginalLayer                     (int id,double  *spc);
-         void                          SetNewSpacingLayer(double *spc);
+         void                          SetNewSpacingLayer                      (double *spc);
 
   private:
 
index 586ea0db2a72b67589c1392400c44a0fb0d4eab9..ce2da483f3ec559d4639eed7cda810679e284a68 100644 (file)
@@ -462,13 +462,22 @@ void ColorLayerImageViewPanel::onSliceImage(wxScrollEvent& event)
 }
 
 //----------------------------------------------------------------------------
-void ColorLayerImageViewPanel::onChangeOpacity(wxScrollEvent& event)
+void ColorLayerImageViewPanel::ChangeOpacity()
 {
        int opacity = _opacity->GetValue();
        _colorLayerImageViewManager->onThresholdChangeOpacity(opacity);
        RefreshView();
 }
 
+//----------------------------------------------------------------------------
+void ColorLayerImageViewPanel::onChangeOpacity(wxScrollEvent& event)
+{
+       ChangeOpacity();
+//     int opacity = _opacity->GetValue();
+//     _colorLayerImageViewManager->onThresholdChangeOpacity(opacity);
+//     RefreshView();
+}
+
 
 //----------------------------------------------------------------------------
 bool ColorLayerImageViewPanel::IsVisible()
index 00b7f4c50f33fad286e5021471ef8f8174b3c691..abdefc1c075f267a2577492e4efe345fa475cedf 100644 (file)
@@ -75,6 +75,7 @@ class ColorLayerImageViewPanel
                        ColorLayerImageViewPanel(wxWindow * parent, int min, int max,int opacity, int type);
                        ~ColorLayerImageViewPanel();
                        void onThresholdStop();
+                       void ChangeOpacity();
                        ColorLayerImageViewManager* GetColorLayerImageViewManager();
 //EED01                        ColorLayerImageView* GetColorLayerImageView();
 //EED01                        void SetColorLayerImageView(ColorLayerImageView* colorLayerImageView);