]> Creatis software - creaMaracasVisu.git/commitdiff
#3497 Mesh_tool_ApplyThresholdConnectivity
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Mon, 2 Jan 2023 16:24:42 +0000 (17:24 +0100)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Mon, 2 Jan 2023 16:24:42 +0000 (17:24 +0100)
bbtk/bbs/boxes/Mesh_tool_ApplyThresholdConnectivity.bbg
bbtk/bbs/boxes/Mesh_tool_ApplyThresholdConnectivity.bbs
bbtk/src/bbcreaMaracasVisuColorLayerImageView.cxx
bbtk/src/bbcreaMaracasVisuColorLayerImageView.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewPanel.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.cxx

index 31857b83a74de0ad41cba9d5436092e53e2ec972..f3674e1b2e4e925b888afb3d01e83ac75e16044d 100644 (file)
@@ -72,7 +72,7 @@ COMPLEX_PORT
 meshmanagermodel
 -150.374274:130.740991:-900.000000
 FIN_COMPLEX_PORT
-BOXES:59
+BOXES:63
 BOX
 creaMaracasVisu:ShowNPoints:showNpoints
 ISEXEC:FALSE
@@ -94,16 +94,16 @@ FIN_BOX
 BOX
 vtk:UpdateRender:Box11
 ISEXEC:FALSE
-21.895599:32.339150:-900.000000
-43.920599:29.839150:-900.000000
+42.216062:-22.758151:-900.000000
+64.241062:-25.258151:-900.000000
 PORT
 Active:"true"
 FIN_BOX
 BOX
 std:MultipleInputs:Box31
 ISEXEC:FALSE
-26.808134:53.553820:-900.000000
-48.778134:51.053820:-900.000000
+52.642658:-1.993608:-900.000000
+74.612658:-4.493608:-900.000000
 FIN_BOX
 BOX
 creaMaracasVisu:wxPopupMenu:Box57
@@ -154,8 +154,8 @@ FIN_BOX
 BOX
 creaVtk:BooleanOperationPolyDataFilter:Box77
 ISEXEC:FALSE
--85.849843:-22.221970:-900.000000
--62.119843:-24.721970:-900.000000
+-75.291259:-24.273250:-900.000000
+-51.561259:-26.773250:-900.000000
 PORT
 BoxProcessMode:"Manual"
 PORT
@@ -182,8 +182,8 @@ FIN_BOX
 BOX
 wx:CommandButton:Box80
 ISEXEC:FALSE
--107.184095:21.801731:-900.000000
--84.909095:19.301731:-900.000000
+-99.569055:58.854673:-900.000000
+-77.294055:56.354673:-900.000000
 PORT
 Label:"Refresh"
 FIN_BOX
@@ -202,10 +202,10 @@ FIN_BOX
 BOX
 creaMaracasVisu:PolyDataToActor_Widget:Box48
 ISEXEC:FALSE
-31.257913:65.319677:-900.000000
-54.277913:62.819677:-900.000000
+55.278169:7.595913:-900.000000
+78.298169:5.095913:-900.000000
 PORT
-meshOpacity:"100"
+meshOpacity:"50"
 FIN_BOX
 BOX
 vtk:vtkImageDataPointerRelay:Box35
@@ -248,16 +248,16 @@ FIN_BOX
 BOX
 wx:CommandButton:Box42
 ISEXEC:FALSE
--91.903796:13.441695:-900.000000
--69.628796:10.941695:-900.000000
+-90.674903:52.782696:-900.000000
+-68.399903:50.282696:-900.000000
 PORT
 Label:"Apply  (Magenta->To Red)"
 FIN_BOX
 BOX
 wx:CommandButton:Box43
 ISEXEC:FALSE
--85.356515:8.083838:-900.000000
--63.081515:5.583838:-900.000000
+-106.419163:69.428140:-900.000000
+-84.144163:66.928140:-900.000000
 PORT
 Label:"Reset Tool"
 FIN_BOX
@@ -302,20 +302,20 @@ FIN_BOX
 BOX
 std:MultipleInputs:Box53
 ISEXEC:FALSE
--96.292390:-13.293248:-900.000000
--74.322390:-15.793248:-900.000000
+-81.907379:-1.781615:-900.000000
+-59.937379:-4.281615:-900.000000
 FIN_BOX
 BOX
 std:MultipleInputs:Box55
 ISEXEC:FALSE
--50.149948:-172.122209:-900.000000
--28.179948:-174.622209:-900.000000
+-53.140304:-173.517708:-900.000000
+-31.170304:-176.017708:-900.000000
 FIN_BOX
 BOX
 creaMaracasVisu:MeshContours_Widget:Box62
 ISEXEC:FALSE
--236.876644:18.648362:-900.000000
--214.081644:16.148362:-900.000000
+-231.981368:-18.117247:-900.000000
+-209.186368:-20.617247:-900.000000
 PORT
 colorMesh:"1 1 0"
 FIN_BOX
@@ -352,8 +352,8 @@ FIN_BOX
 BOX
 creaMaracasVisu:MeshContours_Widget:Box72
 ISEXEC:FALSE
--159.681275:-116.816080:-900.000000
--136.886275:-119.316080:-900.000000
+-168.253628:-93.491307:-900.000000
+-145.458628:-95.991307:-900.000000
 PORT
 colorMesh:"0 1 1"
 FIN_BOX
@@ -380,28 +380,28 @@ FIN_BOX
 BOX
 wx:LayoutTab:Box86
 ISEXEC:FALSE
-77.320030:-67.527895:-900.000000
-110.640030:-70.027895:-900.000000
+85.280357:-100.695922:-900.000000
+118.600357:-103.195922:-900.000000
 FIN_BOX
 BOX
 creaVtk:MeshManager:Box92
 ISEXEC:FALSE
--52.953847:-93.118729:-900.000000
--30.923847:-95.618729:-900.000000
+-38.201426:-32.514189:-900.000000
+-16.171426:-35.014189:-900.000000
 FIN_BOX
 BOX
 creaVtk:MeshManager_tool:Box93
 ISEXEC:FALSE
--57.972412:-103.973581:-900.000000
--35.472412:-106.473581:-900.000000
+-57.573698:-124.706713:-900.000000
+-35.073698:-127.206713:-900.000000
 PORT
 Tool:"35"
 FIN_BOX
 BOX
 std:MagicBox:Box94
 ISEXEC:FALSE
--70.989776:-33.864327:-900.000000
--49.389776:-36.364327:-900.000000
+-68.796849:-31.671400:-900.000000
+-47.196849:-34.171400:-900.000000
 FIN_BOX
 BOX
 creaMaracasVisu:wxVtkBaseView_Info:Box96
@@ -452,40 +452,16 @@ FIN_BOX
 BOX
 creaVtk:ImageThresholdConnectivity:Box102
 ISEXEC:FALSE
-20.022876:88.062117:-900.000000
-43.542876:85.562117:-900.000000
+42.293746:33.734820:-900.000000
+65.813746:31.234820:-900.000000
 PORT
 Border:"50"
 FIN_BOX
 BOX
-vtk:ImageGaussianSmooth:Box103
-ISEXEC:FALSE
-25.113411:82.140430:-900.000000
-48.118411:79.640430:-900.000000
-PORT
-StdDevX:"1.5"
-PORT
-StdDevY:"1.5"
-PORT
-StdDevZ:"1.5"
-FIN_BOX
-BOX
-vtk:MarchingCubes:Box104
-ISEXEC:FALSE
-15.689652:74.345188:-900.000000
-37.974652:71.845188:-900.000000
-PORT
-BoxExecute:"Manual"
-PORT
-BoxProcessMode:"Manual"
-PORT
-Value:"128"
-FIN_BOX
-BOX
 wx:LayoutLine:Box105
 ISEXEC:FALSE
-84.502680:90.614393:-900.000000
-117.822680:88.114393:-900.000000
+100.486715:-57.780355:-900.000000
+133.806715:-60.280355:-900.000000
 PORT
 WinTitle:"1.2 Surface"
 FIN_BOX
@@ -521,7 +497,7 @@ Min:"0"
 PORT
 ReactiveOnTrack:"true"
 PORT
-Title:"Border"
+Title:"Border size"
 FIN_BOX
 BOX
 wx:CommandButton:Box108
@@ -542,8 +518,8 @@ FIN_BOX
 BOX
 std:MultipleInputs:Box111
 ISEXEC:FALSE
--33.806521:38.765414:-900.000000
--11.726521:36.265414:-900.000000
+-35.999448:19.228424:-900.000000
+-13.919448:16.728424:-900.000000
 FIN_BOX
 BOX
 std:MultipleInputs:Box112
@@ -551,7 +527,59 @@ ISEXEC:FALSE
 -124.029588:-67.860277:-900.000000
 -101.949588:-70.360277:-900.000000
 FIN_BOX
-CONNECTIONS:113
+BOX
+creaVtk:MarchingCubes2:Box113
+ISEXEC:FALSE
+47.211221:19.109734:-900.000000
+69.606221:16.609734:-900.000000
+PORT
+BoxProcessMode:"Manual"
+PORT
+Value:"128"
+FIN_BOX
+BOX
+creaVtk:ImageGaussianSmooth2:Box114
+ISEXEC:FALSE
+50.788309:26.751303:-900.000000
+73.903309:24.251303:-900.000000
+PORT
+StdDevX:"1.5"
+PORT
+StdDevY:"1.5"
+PORT
+StdDevZ:"1.5"
+FIN_BOX
+BOX
+std:MultipleInputs:Box118
+ISEXEC:FALSE
+19.227572:22.541579:-900.000000
+41.307572:20.041579:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box119
+ISEXEC:FALSE
+-63.571140:-72.648910:-900.000000
+-41.861140:-75.148910:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box120
+ISEXEC:FALSE
+-104.557988:63.517112:-900.000000
+-82.847988:61.017112:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ColorLayerImageView:Box122
+ISEXEC:FALSE
+29.206703:-47.220552:-900.000000
+69.566703:-49.720552:-900.000000
+PORT
+ColorBarPosition:"-1000 -1000"
+PORT
+TypeControlsInterface:"2"
+PORT
+lstTransparenceBoundaries:"0"
+FIN_BOX
+CONNECTIONS:124
 CONNECTION
 Box31:BoxChange:Box11:BoxExecute
 NumberOfControlPoints:0
@@ -634,24 +662,15 @@ CONNECTION
 showNpoints:WidgetShowNPoints:Box52:WidgetShowNPoints
 NumberOfControlPoints:0
 CONNECTION
-Box80:BoxChange:Box53:In2
-NumberOfControlPoints:0
-CONNECTION
 Box53:BoxChange:Box77:BoxExecute
 NumberOfControlPoints:0
 CONNECTION
 Box42:BoxChange:Box53:In3
 NumberOfControlPoints:0
 CONNECTION
-Box43:BoxChange:Box55:BoxExecute
-NumberOfControlPoints:0
-CONNECTION
 Box52:BoxChange:Box55:In2
 NumberOfControlPoints:0
 CONNECTION
-Box43:BoxChange:Box53:In6
-NumberOfControlPoints:0
-CONNECTION
 boxChange:boxChange:Box63:In
 NumberOfControlPoints:0
 CONNECTION
@@ -826,69 +845,111 @@ CONNECTION
 showNpoints:lstPointsZ:Box102:LstZ
 NumberOfControlPoints:0
 CONNECTION
-Box102:Out:Box103:In
+Box35:Out:Box102:In
 NumberOfControlPoints:0
 CONNECTION
-Box104:Out:Box48:polydata
+Box106:Widget:Box105:Widget2
 NumberOfControlPoints:0
 CONNECTION
-Box35:Out:Box102:In
+Box107:Out:Box102:Border
 NumberOfControlPoints:0
 CONNECTION
-Box104:Out:Box77:In2
+Box106:OutStart:Box110:In1
 NumberOfControlPoints:0
 CONNECTION
-Box104:Out:Box62:_polydata
+Box106:OutEnd:Box110:In3
 NumberOfControlPoints:0
 CONNECTION
-Box106:Widget:Box105:Widget2
+Box110:Out:Box102:Threshold
 NumberOfControlPoints:0
 CONNECTION
-Box107:Out:Box102:Border
+Box105:Widget:Box86:Widget5
 NumberOfControlPoints:0
 CONNECTION
-Box107:Widget:Box105:Widget3
+Box63:BoxChange:Box111:In1
 NumberOfControlPoints:0
 CONNECTION
-Box108:Widget:Box105:Widget4
+Box31:BoxChange:Box111:In3
 NumberOfControlPoints:0
 CONNECTION
-Box106:OutStart:Box110:In1
+Box111:BoxChange:Box62:_execute
 NumberOfControlPoints:0
 CONNECTION
-Box106:OutEnd:Box110:In3
+Box63:BoxChange:Box112:In1
 NumberOfControlPoints:0
 CONNECTION
-Box110:Out:Box102:Threshold
+Box37:boxchange:Box112:In3
 NumberOfControlPoints:0
 CONNECTION
-Box108:BoxChange:Box104:BoxExecute
+Box112:BoxChange:Box72:_execute
 NumberOfControlPoints:0
 CONNECTION
-Box104:BoxChange:Box31:BoxExecute
+Box113:BoxChange:Box31:BoxExecute
 NumberOfControlPoints:0
 CONNECTION
-Box105:Widget:Box86:Widget5
+Box113:Out:Box48:polydata
 NumberOfControlPoints:0
 CONNECTION
-Box63:BoxChange:Box111:In1
+Box113:Out:Box77:In2
 NumberOfControlPoints:0
 CONNECTION
-Box31:BoxChange:Box111:In3
+Box113:Out:Box62:_polydata
 NumberOfControlPoints:0
 CONNECTION
-Box111:BoxChange:Box62:_execute
+Box113:BoxChange:Box48:boxexecute
 NumberOfControlPoints:0
 CONNECTION
-Box63:BoxChange:Box112:In1
+Box102:Out:Box114:In
 NumberOfControlPoints:0
 CONNECTION
-Box37:boxchange:Box112:In3
+Box114:Out:Box113:In
 NumberOfControlPoints:0
 CONNECTION
-Box112:BoxChange:Box72:_execute
+Box118:BoxChange:Box113:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box108:BoxChange:Box118:In3
+NumberOfControlPoints:0
+CONNECTION
+Box80:BoxChange:Box53:In2
+NumberOfControlPoints:0
+CONNECTION
+Box43:BoxChange:Box118:In2
+NumberOfControlPoints:0
+CONNECTION
+Box43:BoxChange:Box120:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box120:BoxChange:Box53:In4
+NumberOfControlPoints:0
+CONNECTION
+Box43:BoxChange:Box55:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box42:BoxChange:Box118:In4
+NumberOfControlPoints:0
+CONNECTION
+Box64:Out:Box122:WxVtkBaseView
+NumberOfControlPoints:0
+CONNECTION
+Box65:Out:Box122:WxVtkBaseView1
+NumberOfControlPoints:0
+CONNECTION
+Box69:Out:Box122:WxVtkBaseView2
+NumberOfControlPoints:0
+CONNECTION
+Box108:Widget:Box105:Widget8
+NumberOfControlPoints:0
+CONNECTION
+Box107:Widget:Box105:Widget6
+NumberOfControlPoints:0
+CONNECTION
+Box106:BoxChange:Box122:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box122:Widget:Box105:Widget7
 NumberOfControlPoints:0
 CONNECTION
-Box103:Out:Box104:In
+Box102:Out:Box122:In
 NumberOfControlPoints:0
 APP_END
index 91100425a761cc496c1da2531d8dbe870112243d..2334e1c388bc208243940bc20be6b65540efa395 100644 (file)
@@ -68,7 +68,7 @@ new std:MagicBox Box66
 new std:MagicBox Box67
 
 new creaMaracasVisu:PolyDataToActor_Widget Box48
-  set Box48.meshOpacity "100"
+  set Box48.meshOpacity "50"
 
 new vtk:vtkImageDataPointerRelay Box35
 
@@ -160,16 +160,6 @@ new std:ConcatStrings Box101
 new creaVtk:ImageThresholdConnectivity Box102
   set Box102.Border "50"
 
-new vtk:ImageGaussianSmooth Box103
-  set Box103.StdDevX "1.5"
-  set Box103.StdDevY "1.5"
-  set Box103.StdDevZ "1.5"
-
-new vtk:MarchingCubes Box104
-  set Box104.BoxExecute "Manual"
-  set Box104.BoxProcessMode "Manual"
-  set Box104.Value "128"
-
 new wx:LayoutLine Box105
   set Box105.WinTitle "1.2 Surface"
 
@@ -186,7 +176,7 @@ new wx:Slider Box107
   set Box107.Max "40"
   set Box107.Min "0"
   set Box107.ReactiveOnTrack "true"
-  set Box107.Title "Border"
+  set Box107.Title "Border size"
 
 new wx:CommandButton Box108
   set Box108.Label "Refresh"
@@ -198,6 +188,26 @@ new std:MultipleInputs Box111
 
 new std:MultipleInputs Box112
 
+new creaVtk:MarchingCubes2 Box113
+  set Box113.BoxProcessMode "Manual"
+  set Box113.Value "128"
+
+new creaVtk:ImageGaussianSmooth2 Box114
+  set Box114.StdDevX "1.5"
+  set Box114.StdDevY "1.5"
+  set Box114.StdDevZ "1.5"
+
+new std:MultipleInputs Box118
+
+new std:MagicBox Box119
+
+new std:MagicBox Box120
+
+new creaMaracasVisu:ColorLayerImageView Box122
+  set Box122.ColorBarPosition "-1000 -1000"
+  set Box122.TypeControlsInterface "2"
+  set Box122.lstTransparenceBoundaries "0"
+
 
 connect Box31.BoxChange Box11.BoxExecute
 connect Box58.Out Box57.In
@@ -220,12 +230,9 @@ connect Box42.BoxChange Box51.BoxExecute
 connect Box45.BoxChange Box51.In2
 connect Box52.BoxChange Box51.In4
 connect showNpoints.WidgetShowNPoints Box52.WidgetShowNPoints
-connect Box80.BoxChange Box53.In2
 connect Box53.BoxChange Box77.BoxExecute
 connect Box42.BoxChange Box53.In3
-connect Box43.BoxChange Box55.BoxExecute
 connect Box52.BoxChange Box55.In2
-connect Box43.BoxChange Box53.In6
 connect Box63.BoxChange showNpoints.BoxExecute
 connect Box64.Out Box57.wxVtkBaseView2
 connect Box64.Out Box62._wxvtkbaseview2D1
@@ -275,20 +282,12 @@ connect Box57.Out Box100.sk1
 connect showNpoints.lstPointsX Box102.LstX
 connect showNpoints.lstPointsY Box102.LstY
 connect showNpoints.lstPointsZ Box102.LstZ
-connect Box102.Out Box103.In
-connect Box104.Out Box48.polydata
 connect Box35.Out Box102.In
-connect Box104.Out Box77.In2
-connect Box104.Out Box62._polydata
 connect Box106.Widget Box105.Widget2
 connect Box107.Out Box102.Border
-connect Box107.Widget Box105.Widget3
-connect Box108.Widget Box105.Widget4
 connect Box106.OutStart Box110.In1
 connect Box106.OutEnd Box110.In3
 connect Box110.Out Box102.Threshold
-connect Box108.BoxChange Box104.BoxExecute
-connect Box104.BoxChange Box31.BoxExecute
 connect Box105.Widget Box86.Widget5
 connect Box63.BoxChange Box111.In1
 connect Box31.BoxChange Box111.In3
@@ -296,7 +295,29 @@ connect Box111.BoxChange Box62._execute
 connect Box63.BoxChange Box112.In1
 connect Box37.boxchange Box112.In3
 connect Box112.BoxChange Box72._execute
-connect Box103.Out Box104.In
+connect Box113.BoxChange Box31.BoxExecute
+connect Box113.Out Box48.polydata
+connect Box113.Out Box77.In2
+connect Box113.Out Box62._polydata
+connect Box113.BoxChange Box48.boxexecute
+connect Box102.Out Box114.In
+connect Box114.Out Box113.In
+connect Box118.BoxChange Box113.BoxExecute
+connect Box108.BoxChange Box118.In3
+connect Box80.BoxChange Box53.In2
+connect Box43.BoxChange Box118.In2
+connect Box43.BoxChange Box120.BoxExecute
+connect Box120.BoxChange Box53.In4
+connect Box43.BoxChange Box55.BoxExecute
+connect Box42.BoxChange Box118.In4
+connect Box64.Out Box122.WxVtkBaseView
+connect Box65.Out Box122.WxVtkBaseView1
+connect Box69.Out Box122.WxVtkBaseView2
+connect Box108.Widget Box105.Widget8
+connect Box107.Widget Box105.Widget6
+connect Box106.BoxChange Box122.BoxExecute
+connect Box122.Widget Box105.Widget7
+connect Box102.Out Box122.In
 
 # Complex input ports
 input point showNpoints.In " "
index 9ae31d9b55d6bb2948dcdfa924e67df3c5ac8955..46cf052ced5a561e627098b08a26a71540f08e23 100644 (file)
@@ -68,8 +68,6 @@ void ColorLayerImageViewPanel_widgetBox::SetBox(ColorLayerImageView* box)
        mBox=box;       
 }
 
-
-
 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ColorLayerImageView)
 BBTK_BLACK_BOX_IMPLEMENTATION(ColorLayerImageView,bbtk::WxBlackBox);
 //=====
@@ -77,13 +75,12 @@ BBTK_BLACK_BOX_IMPLEMENTATION(ColorLayerImageView,bbtk::WxBlackBox);
 //=====
 void ColorLayerImageView::Process()
 {
     if ( !( (bbGetInputWxVtkBaseView()==NULL) && (bbGetInputWxVtkBaseView1()==NULL) && (bbGetInputWxVtkBaseView2()==NULL))  )
     {
         ColorLayerImageViewPanel_widgetBox *clivp = (ColorLayerImageViewPanel_widgetBox*)bbGetOutputWidget();
-           if (firsttime==true)
+        if (firsttime==true)
          {
-    //        firsttime=false;
+    //      firsttime=false;
             clivp->SetActive( bbGetInputActive() );
          }
         clivp->GetColorLayerImageViewManager()->SetwxVtkBaseView( 0 , bbGetInputWxVtkBaseView() );
@@ -104,19 +101,16 @@ void ColorLayerImageView::Process()
         clivp->SetImage( bbGetInputIn() );
         bbSetOutputNewImage( clivp->GetColorLayerImageViewManager()->GetImageChangeInformation(0) );
         bbSetOutputLookupTable( clivp->GetColorLayerImageViewManager()->GetLookupTable(0) );
-           bbSetOutputOutOpacity( clivp->GetOpacity() );
-        
-          if (firsttime==true)
+        bbSetOutputOutOpacity( clivp->GetOpacity() );
+        if (firsttime==true)
         {
             firsttime=false;
             clivp->ChangeOpacity();
             clivp->SetBox(this);
         }
-
     } else {
         printf("EED Error!!!  ColorLayerImageView::Process   (%s)  Missing Inputs:  WxVtkBaseView , WxVtkBaseView1 , WxVtkBaseView2 \n", bbGetFullName().c_str() );
     }// if xxVtkBaseView
-    
 }
 //=====
 // Don't edit this file. This file is generated from xml description..
@@ -126,6 +120,7 @@ void ColorLayerImageView::CreateWidget(wxWindow* parent)
        ColorLayerImageViewPanel_widgetBox *clivp = new ColorLayerImageViewPanel_widgetBox(parent, 0, 100, bbGetInputOpacity() ,bbGetInputTypeControlsInterface() );
        bbSetOutputWidget( (ColorLayerImageViewPanel*)clivp );
 }
+
 //=====
 // Don't edit this file. This file is generated from xml description..
 //=====
@@ -140,25 +135,24 @@ void ColorLayerImageView::bbUserSetDefaultValues()
     bbSetInputWxVtkBaseView(NULL);
     bbSetInputWxVtkBaseView1(NULL);
     bbSetInputWxVtkBaseView2(NULL);
-
        std::vector<int> lstColorBarPosition;
        lstColorBarPosition.push_back(10);
        lstColorBarPosition.push_back(105);
        bbSetInputColorBarPosition(lstColorBarPosition);
 }
+
 //=====
 // Don't edit this file. This file is generated from xml description..
 //=====
 void ColorLayerImageView::bbUserInitializeProcessing()
 {
-
 }
+
 //=====
 // Don't edit this file. This file is generated from xml description..
 //=====
 void ColorLayerImageView::bbUserFinalizeProcessing()
 {
-
 }
-}
-// EO namespace bbcreaMaracasVisu
+
+}// EO namespace bbcreaMaracasVisu
index 7e2dda039b5a74c8a57cb93539159fb0a6008598..907323bb785079eb6359fdf61f5511aeb90549c9 100644 (file)
@@ -108,12 +108,12 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(ColorLayerImageView,bbtk::WxBlackBox);
   BBTK_OUTPUT(ColorLayerImageView,OutOpacity,"Opacity",int,"");
 
 BBTK_END_DESCRIBE_BLACK_BOX(ColorLayerImageView);
+
 //=====
 // Don't edit this file. This file is generated from xml description..
 //=====
-}
-// EO namespace bbcreaMaracasVisu
 
+}// EO namespace bbcreaMaracasVisu
 #endif // __bbcreaMaracasVisuColorLayerImageView_h_INCLUDED__
 #endif // _USE_WXWIDGETS_
 
index 0ac45b649d867a372e35e754caa7e9305a67a290..869b844f9abc91838a89d33112a0b4c58cbcd402 100644 (file)
@@ -85,16 +85,13 @@ void ColorLayerImageView::SetZ2(int z2)
 //----------------------------------------------------------------------------
 int ColorLayerImageView::GetX() // virtual 
 {
-  int result=0;
+  int result = 0;
   if (_fix_dynamic==false)
     {
       result = _x2;
-    }
-  else
-    {
+    }  else  {
       result = LayerImageBase::GetX();
-    }  
-
+    }
   return result;
 }
 
@@ -103,13 +100,11 @@ int ColorLayerImageView::GetY() // virtual
 {
   int result=0;
   if (_fix_dynamic==false)
-    {
+  {
       result = _y2;
-    }
-  else
-    {
+  } else {
       result = LayerImageBase::GetY();
-    }  
+  }
 
   return result;
 }
@@ -465,9 +460,6 @@ int ColorLayerImageView::GrayLevel_TO_colorTableIndex( double VALUE )
   //...
 #endif
 
-
-
-
 //EED 20 oct 2015
 //  GetImage()->GetScalarRange(_range);
   GetImageScalarRange();
index 01f4c4d6394d36c86dc34e33f61ebd949b3a5a99..358817a627caa9457475defe4ea33b7d7fc6b8b4 100644 (file)
@@ -320,11 +320,12 @@ void ColorLayerImageViewPanel::SetImage(vtkImageData *img)
 
                GetColorLayerImageViewManager()->SetNewSpacingLayer(newSpc);
 
-    } // _firsttime_mode
+    } // img
 
        if (_active==true)
        {
            _colorLayerImageViewManager->onThreshold();
+        if (img==NULL)        _colorLayerImageViewManager->onThresholdRemove( );
                RefreshView();
        } // _ative     
 }
index f942447f82177f11e714cc0313aa57db4fd3ab1b..1b3bec6e4b4ff600f4c88364639b010583fd7045 100644 (file)
@@ -264,7 +264,7 @@ void LayerImageBase::SetNewSpacingLayer(double spc[3])
        _newSpcLayer[1] = spc[1];
        _newSpcLayer[2] = spc[2];
        _imageChangeInformation->SetOutputSpacing( _newSpcLayer );  
-_imageChangeInformation->Update();
+    _imageChangeInformation->Update();
 }
 
 
@@ -572,7 +572,8 @@ void LayerImageBase::onThreshold()
                int fontsize = _scalarbarActor->GetLabelTextProperty()->GetFontSize();
                _scalarbarActor->GetLabelTextProperty()->SetFontSize(fontsize/2);
 //             _scalarbarActor->SetTextPad(4);  ??
-               } // _image
+    } // if _image
+            
 }
 
 
@@ -594,12 +595,10 @@ void LayerImageBase::onThresholdInterpolation(bool interpolate)
                if (interpolate)
                {
                        _thresholdActor->InterpolateOn( );
-               }
-               else
-               {
+               } else {
                        _thresholdActor->InterpolateOff( );
-               }
-       }
+               } // if interpolate
+       } // if _thresholdActor
 }
 
 //----------------------------------------------------------------------------
@@ -637,8 +636,8 @@ void LayerImageBase::GetImageScalarRange()
        double min,max;
        GetRangeForColorBar(min,max);
 //     _image->GetScalarRange(_range);
-       _range[0]=min;
-       _range[1]=max;
+       _range[0] = min;
+       _range[1] = max;
 }
 
 vtkScalarsToColors* LayerImageBase::GetLookupTable()