]> Creatis software - creaMaracasVisu.git/commitdiff
#3555 ColorLayer box input Interpolation
authoreduardo.davila@creatis.insa-lyon.fr <eduardo.davila@creatis.insa-lyon.fr>
Fri, 5 Apr 2024 11:19:46 +0000 (13:19 +0200)
committereduardo.davila@creatis.insa-lyon.fr <eduardo.davila@creatis.insa-lyon.fr>
Fri, 5 Apr 2024 11:19:46 +0000 (13:19 +0200)
bbtk/src/bbcreaMaracasVisuColorLayerImageView.cxx
bbtk/src/bbcreaMaracasVisuColorLayerImageView.h
bbtk/src/bbcreaMaracasVisuColorLayerImageView2.cxx
bbtk/src/bbcreaMaracasVisuColorLayerImageView2.h
bbtk/src/bbmaracasvisuViewerNV.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewPanel.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewPanel.h

index 6fde87a4c8705862f9e6faf623ee10003b5751a1..be7f756587472f2932624f3c7566a398d70cfc59 100644 (file)
@@ -107,6 +107,7 @@ void ColorLayerImageView::Process()
                 bbSetOutputNewImage( clivp->GetColorLayerImageViewManager()->GetImageChangeInformation(0) );
                 bbSetOutputLookupTable( clivp->GetColorLayerImageViewManager()->GetLookupTable(0) );
                 bbSetOutputOutOpacity( clivp->GetOpacity() );
+                bbSetOutputInterpolation( clivp->GetInterpolation() );
                 if (firsttime==true)
                 {
                     firsttime=false;
index 8af663fd1df7d98ea64e1f0a2a2c11ca4f01d666..b3bc2f35bb7eb474af2ad68682cd3e5826dbfbb9 100644 (file)
@@ -64,6 +64,7 @@ class bbcreaMaracasVisu_EXPORT ColorLayerImageView
   BBTK_DECLARE_OUTPUT(NewImage,vtkImageData*);
   BBTK_DECLARE_OUTPUT(LookupTable,vtkScalarsToColors*);
   BBTK_DECLARE_OUTPUT(OutOpacity,int);
+  BBTK_DECLARE_OUTPUT(Interpolation,bool);
   BBTK_PROCESS(Process);
   void Process();
   BBTK_CREATE_WIDGET(CreateWidget);
@@ -104,6 +105,7 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(ColorLayerImageView,bbtk::WxBlackBox);
   BBTK_OUTPUT(ColorLayerImageView,NewImage,"Image with correct Spacing",vtkImageData*,"");
   BBTK_OUTPUT(ColorLayerImageView,LookupTable,"LookupTable",vtkScalarsToColors*,"");
   BBTK_OUTPUT(ColorLayerImageView,OutOpacity,"Opacity",int,"");
+  BBTK_OUTPUT(ColorLayerImageView,Interpolation,"Interpolation",bool,"");
 
 BBTK_END_DESCRIBE_BLACK_BOX(ColorLayerImageView);
 
index aa0941f9765c591b11db147eb6f8f00e5aba9f7c..692bc2e157b943d2964764c1c551384bdd623ca5 100644 (file)
@@ -65,6 +65,7 @@ void ColorLayerImageView2::Process()
                 _colorLayerImageViewManager->SetBaseTransparence        ( transparence_level_boundaries );
                 _colorLayerImageViewManager->SetPlainOrGradientColor    ( bbGetInputPlainOrGradientColor() );
                 _colorLayerImageViewManager->onThresholdChangeOpacity   ( bbGetInputOpacity() );
+                _colorLayerImageViewManager->onThresholdInterpolation   ( bbGetInputInterpolation() );
                 _colorLayerImageViewManager->SetActive                  ( bbGetInputActive() );
 
                 int fitting_mode=3;
@@ -118,6 +119,7 @@ void ColorLayerImageView2::bbUserSetDefaultValues()
     bbSetInputIn(NULL);
     bbSetInputActive(true);
     bbSetInputOpacity(100);
+    bbSetInputInterpolation(true);
     bbSetInputPlainOrGradientColor(false);
 //    bbSetInputTypeControlsInterface(1);
     bbSetInputWxVtkBaseView(NULL);
index 094833bca3b5aa4b457ae4dc18c8c1ec64219bcd..6f867e5efa922c55f02922b051e3787631bb72e7 100644 (file)
@@ -29,6 +29,7 @@ class bbcreaMaracasVisu_EXPORT ColorLayerImageView2
     BBTK_DECLARE_INPUT(In,vtkImageData*);
     BBTK_DECLARE_INPUT(Active,bool);
     BBTK_DECLARE_INPUT(Opacity,int);
+    BBTK_DECLARE_INPUT(Interpolation,bool);
 //    BBTK_DECLARE_INPUT(TypeControlsInterface,int);
     BBTK_DECLARE_INPUT(WxVtkBaseView,wxVtkBaseView *);
     BBTK_DECLARE_INPUT(WxVtkBaseView1,wxVtkBaseView *);
@@ -62,6 +63,7 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(ColorLayerImageView2,bbtk::AtomicBlackBox);
   BBTK_INPUT(ColorLayerImageView2,In,"Input Image",vtkImageData*,"");
   BBTK_INPUT(ColorLayerImageView2,Active,"Active True/False (default True)",bool,"");
   BBTK_INPUT(ColorLayerImageView2,Opacity,"(default 100) 0..100",int,"");
+  BBTK_INPUT(ColorLayerImageView2,Interpolation,"(default true) true/false",bool,"");
 //  BBTK_INPUT(ColorLayerImageView2,TypeControlsInterface,"1 (default) All controls, 2 just transparency",int,"");
   BBTK_INPUT(ColorLayerImageView2,WxVtkBaseView," 0 creaMaracasVisuViewer viewer XY,YZ ou XZ",wxVtkBaseView*,"");
   BBTK_INPUT(ColorLayerImageView2,WxVtkBaseView1," 1 creaMaracasVisuViewer viewer XY,YZ ou XZ",wxVtkBaseView*,"");
index 71910917db3f261462b458a0035f1e48fc79953a..86542adb76a34e395a2574cc9b83efba0b1eaa53 100644 (file)
@@ -273,6 +273,5 @@ void ViewerNV::updateObservers()
        } // if interactor
 }
 
-}
-// EO namespace bbcreaMaracasVisu
+}// EO namespace bbcreaMaracasVisu
 
index 3d84d0746a14a2a44754b93ba6d2383adbde9c26..37df70cfcb1791b9776818fa121983a408d4fb1b 100644 (file)
@@ -124,6 +124,7 @@ ColorLayerImageViewPanel::ColorLayerImageViewPanel(wxWindow* parent, int min, in
 //: wxPanel(parent, -1, wxDefaultPosition, wxSize(600,100), wxBORDER_SUNKEN)
 : wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL)
 {
+    _interpolationCheckBox=NULL;
        _spcBase[0] = _spcBase[1] = _spcBase[2] = 0;
        _dimBase[0] = _dimBase[1] = _dimBase[2] = 0;
        _cb_ShowHide                            = NULL;
@@ -518,6 +519,18 @@ int ColorLayerImageViewPanel::GetOpacity()
        return _opacity->GetValue();
 }
 
+//----------------------------------------------------------------------------
+bool ColorLayerImageViewPanel::GetInterpolation()
+{
+    if (_interpolationCheckBox!=NULL)
+    {
+        return _interpolationCheckBox->GetValue();
+    } else {
+        return false;
+    } // if _interpolationCheckBox
+}
+
+
 //----------------------------------------------------------------------------
 void ColorLayerImageViewPanel::ChangeOpacity()
 {
index 91093454c035165e5ffa192aee205e9ee35e1704..514071eae1ebd95b4255889fae623235b3bf1a00 100644 (file)
@@ -75,7 +75,9 @@ class ColorLayerImageViewPanel
                        ColorLayerImageViewPanel(wxWindow * parent, int min, int max,int opacity, int type);
                        ~ColorLayerImageViewPanel();
                        void onThresholdStop();
-                       int GetOpacity();
+                       int  GetOpacity();
+            bool GetInterpolation();
+
                        virtual void ChangeOpacity();
                        ColorLayerImageViewManager* GetColorLayerImageViewManager();
 //EED01                        ColorLayerImageView* GetColorLayerImageView();