From 49cb3ed3b5b7e58ab54dd3b6eb4ad8adee824ef2 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Sun, 21 Feb 2016 00:53:50 +0100 Subject: [PATCH] #2841 BBTK Bug New Normal - bbpConfigurator Cleaning string package:boxname -> boxname #2840 BBTK Bug New Normal - Update Pipeline order in complex boxes imageVtkPropertiesWidget bbIsoSurfaceExtractor bbvtkImageVtkProperties.cxx bbIsoSurfaceWidget --- .../appli/bbpConfigurator/bbpConfigurator.cpp | 56 ++++++++++++---- .../bbs/boxes/imageVtkPropertiesWidget.bbg | 65 +++++++++++++++---- .../bbs/boxes/imageVtkPropertiesWidget.bbs | 33 +++++++--- .../vtk/bbs/boxes/bbIsoSurfaceExtractor.bbg | 23 +++---- .../vtk/bbs/boxes/bbIsoSurfaceExtractor.bbs | 12 ++-- packages/vtk/src/bbvtkImageVtkProperties.cxx | 20 +++--- packages/wx/src/bbwxColourSelectorButton.cxx | 4 ++ .../wxvtk/bbs/boxes/bbIsoSurfaceWidget.bbg | 59 +++++++++-------- .../wxvtk/bbs/boxes/bbIsoSurfaceWidget.bbs | 46 ++++++------- 9 files changed, 205 insertions(+), 113 deletions(-) diff --git a/kernel/appli/bbpConfigurator/bbpConfigurator.cpp b/kernel/appli/bbpConfigurator/bbpConfigurator.cpp index fdabc26..4de87c8 100644 --- a/kernel/appli/bbpConfigurator/bbpConfigurator.cpp +++ b/kernel/appli/bbpConfigurator/bbpConfigurator.cpp @@ -106,15 +106,46 @@ int main(int argc, char **argv) BoxesVector boxs; - for (int i = 0; i < (int)files.size(); ++i) { + for (int i = 0; i < (int)files.size(); ++i) + { bbtk::BBPInterpreter::Pointer I = bbtk::BBPInterpreter::New(); I->InterpretFile(files[i].string()); + + boxs.push_back( ((bbtk::BBPInterpreter*)(I.get()))->boxName ); - deps.push_back( ((bbtk::BBPInterpreter*)(I.get()))->dependencies ); - //print box name and dependencies +// EED 2016/02/19 +// deps.push_back( ((bbtk::BBPInterpreter*)(I.get()))->dependencies ); + //--> Cleanning string package:boxname -> boxname + std::set tmpDependencies1= ((bbtk::BBPInterpreter*)(I.get()))->dependencies ; + std::set tmpDependencies2; + std::set::const_iterator sit(tmpDependencies1.begin()), send(tmpDependencies1.end()); + int pos; + std::string tmpStr; // std::cout << ((bbtk::BBPInterpreter*)(I.get()))->boxName << ": "; -// for( + for(;sit!=send;++sit) + { + pos=(*sit).find(":"); + if (pos== std::string::npos ) + { + tmpDependencies2.insert( *sit ); +// std::cout << *sit << ' '; + } else { + tmpStr=(*sit).substr(pos+1); + tmpDependencies2.insert( tmpStr ); +// std::cout << tmpStr << ' '; + } // if + + } // for +// std::cout << std::endl; + deps.push_back( tmpDependencies2 ); + //<-- + + + +// //print box name and dependencies OLD VERSION +// std::cout << ((bbtk::BBPInterpreter*)(I.get()))->boxName << ": "; +// for( // Dependencies::iterator it = ((bbtk::BBPInterpreter*)(I.get()))->dependencies.begin(); // it != ((bbtk::BBPInterpreter*)(I.get()))->dependencies.end(); // it++) { @@ -122,22 +153,21 @@ int main(int argc, char **argv) // } // std::cout << std::endl; - } + } // for i // Only keep dependencies from package Dependencies boxNamesSet(boxs.begin(), boxs.end()); - //std::cout << "after: " << std::endl; - for (DependenciesVector::iterator it = deps.begin(); it != deps.end(); it++) { +//std::cout << "after: " << std::endl; + for (DependenciesVector::iterator it = deps.begin(); it != deps.end(); it++) + { BoxesVector tmp; std::set_intersection(it->begin(), it->end(), boxNamesSet.begin(), boxNamesSet.end(),std::back_inserter(tmp)); Dependencies tmp1(tmp.begin(),tmp.end()); it->swap( tmp1 ); - //print clean dependencies -// for( -// Dependencies::iterator it1 = it->begin(); -// it1 != it->end(); -// it1++) { +// //print clean dependencies +// for( Dependencies::iterator it1 = it->begin(); it1 != it->end(); it1++) +// { // std::cout << *it1 << ", "; // } // std::cout << std::endl; @@ -210,7 +240,9 @@ int main(int argc, char **argv) // find max priority level int mx_priority = 0; for (int i = 0; i < (int)priorities.size(); i++) + { mx_priority = std::max(mx_priority, priorities[i]); + } // for each priority level print scripts in that level. for (int i = 0; i <= mx_priority; i++) diff --git a/packages/toolsbbtk/bbs/boxes/imageVtkPropertiesWidget.bbg b/packages/toolsbbtk/bbs/boxes/imageVtkPropertiesWidget.bbg index b9251f0..59c4792 100644 --- a/packages/toolsbbtk/bbs/boxes/imageVtkPropertiesWidget.bbg +++ b/packages/toolsbbtk/bbs/boxes/imageVtkPropertiesWidget.bbg @@ -1,6 +1,6 @@ # ---------------------------------- # - BBTKGEditor v 1.4 BBG BlackBox Diagram file -# - /home/davila/Creatis/creaTools/creatools_source/bbtk/packages/toolsbbtk/bbs/boxes/imageVtkPropertiesWidget.bbg +# - /tmpEED/creaTools/creatools_source/bbtk/packages/toolsbbtk/bbs/boxes/imageVtkPropertiesWidget.bbg # ---------------------------------- APP_START @@ -35,16 +35,20 @@ COMPLEX_PORT TypeName 88.917806:-71.094563:-900.000000 FIN_COMPLEX_PORT -COMPLEXINPUTS:2 +COMPLEXINPUTS:3 COMPLEX_PORT in -34.967521:145.605564:-900.000000 +20.217710:145.236819:-900.000000 FIN_COMPLEX_PORT COMPLEX_PORT FileName -102.519294:151.601731:-900.000000 +105.100511:147.914278:-900.000000 FIN_COMPLEX_PORT -BOXES:9 +COMPLEX_PORT +boxExecute +-92.186317:150.079323:-900.000000 +FIN_COMPLEX_PORT +BOXES:10 BOX wx:OutputText:Box02 ISEXEC:FALSE @@ -56,8 +60,8 @@ FIN_BOX BOX wx:OutputText:Box17 ISEXEC:FALSE --80.770416:34.681383:-900.000000 --35.195416:24.681383:-900.000000 +-81.960343:34.681383:-900.000000 +-36.385343:24.681383:-900.000000 PORT Title:"Size" FIN_BOX @@ -72,24 +76,24 @@ FIN_BOX BOX wx:OutputText:Box22 ISEXEC:FALSE --35.332320:1.230494:-900.000000 -10.242680:-8.769506:-900.000000 +-33.844911:1.230494:-900.000000 +11.730089:-8.769506:-900.000000 PORT Title:"TypeName" FIN_BOX BOX wx:OutputText:Box26 ISEXEC:FALSE --131.615626:26.628991:-900.000000 --86.040626:16.628991:-900.000000 +-128.670557:28.919600:-900.000000 +-83.095557:18.919600:-900.000000 PORT Title:"Min Max" FIN_BOX BOX vtk:ImageVtkProperties:Box09 ISEXEC:FALSE -33.571051:113.198814:-900.000000 -79.146051:103.198814:-900.000000 +14.396297:109.880107:-900.000000 +59.971297:99.880107:-900.000000 FIN_BOX BOX wx:OutputText:Box10 @@ -115,7 +119,13 @@ ISEXEC:FALSE PORT Title:"Name" FIN_BOX -CONNECTIONS:21 +BOX +std:MagicBox:Box14 +ISEXEC:FALSE +-98.823731:125.742136:-900.000000 +-53.248731:115.742136:-900.000000 +FIN_BOX +CONNECTIONS:30 CONNECTION Box09:Components:Box10:In NumberOfControlPoints:0 @@ -179,4 +189,31 @@ NumberOfControlPoints:0 CONNECTION Box13:Widget:Box11:Widget7 NumberOfControlPoints:0 +CONNECTION +boxExecute:boxExecute:Box14:In +NumberOfControlPoints:0 +CONNECTION +Box14:Out:Box10:BoxExecute +NumberOfControlPoints:0 +CONNECTION +Box14:Out:Box02:BoxExecute +NumberOfControlPoints:0 +CONNECTION +Box14:Out:Box17:BoxExecute +NumberOfControlPoints:0 +CONNECTION +Box14:Out:Box20:BoxExecute +NumberOfControlPoints:0 +CONNECTION +Box14:Out:Box22:BoxExecute +NumberOfControlPoints:0 +CONNECTION +Box14:Out:Box13:BoxExecute +NumberOfControlPoints:0 +CONNECTION +Box14:BoxChange:Box09:BoxExecute +NumberOfControlPoints:0 +CONNECTION +Box14:Out:Box26:BoxExecute +NumberOfControlPoints:0 APP_END diff --git a/packages/toolsbbtk/bbs/boxes/imageVtkPropertiesWidget.bbs b/packages/toolsbbtk/bbs/boxes/imageVtkPropertiesWidget.bbs index 5272b3b..00c5bd3 100644 --- a/packages/toolsbbtk/bbs/boxes/imageVtkPropertiesWidget.bbs +++ b/packages/toolsbbtk/bbs/boxes/imageVtkPropertiesWidget.bbs @@ -1,12 +1,13 @@ # ---------------------------------- # - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box) -# - /home/davila/Creatis/creaTools/creatools_source/bbtk/packages/toolsbbtk/bbs/boxes/imageVtkPropertiesWidget.bbs +# - /tmpEED/creaTools/creatools_source/bbtk/packages/toolsbbtk/bbs/boxes/imageVtkPropertiesWidget.bbs # ---------------------------------- include std include itkvtk include wx include vtk +include std define ImageVtkPropertiesWidget toolsbbtk @@ -15,32 +16,34 @@ description "Description ??" category "" -new OutputText Box02 +new wx:OutputText Box02 set Box02.Title "Dimensions" -new OutputText Box17 +new wx:OutputText Box17 set Box17.Title "Size" -new OutputText Box20 +new wx:OutputText Box20 set Box20.Title "Spacing" -new OutputText Box22 +new wx:OutputText Box22 set Box22.Title "TypeName" -new OutputText Box26 +new wx:OutputText Box26 set Box26.Title "Min Max" -new ImageVtkProperties Box09 +new vtk:ImageVtkProperties Box09 -new OutputText Box10 +new wx:OutputText Box10 set Box10.Title "Components" -new LayoutLine Box11 +new wx:LayoutLine Box11 set Box11.WinTitle "Image properties" -new OutputText Box13 +new wx:OutputText Box13 set Box13.Title "Name" +new std:MagicBox Box14 + connect Box09.Components Box10.In connect Box09.MinMax Box26.In @@ -55,10 +58,19 @@ connect Box22.Widget Box11.Widget5 connect Box26.Widget Box11.Widget6 connect Box09.Dimension Box02.In connect Box13.Widget Box11.Widget7 +connect Box14.Out Box10.BoxExecute +connect Box14.Out Box02.BoxExecute +connect Box14.Out Box17.BoxExecute +connect Box14.Out Box20.BoxExecute +connect Box14.Out Box22.BoxExecute +connect Box14.Out Box13.BoxExecute +connect Box14.BoxChange Box09.BoxExecute +connect Box14.Out Box26.BoxExecute # Complex input ports input in Box09.In " " input FileName Box13.In " " +input boxExecute Box14.In " " # Complex output ports output widget Box11.Widget " " @@ -68,5 +80,6 @@ output Size Box09.Size " " output Spacing Box09.Spacing " " output TypeName Box09.TypeName " " +message endefine diff --git a/packages/vtk/bbs/boxes/bbIsoSurfaceExtractor.bbg b/packages/vtk/bbs/boxes/bbIsoSurfaceExtractor.bbg index a81e328..a10d53f 100644 --- a/packages/vtk/bbs/boxes/bbIsoSurfaceExtractor.bbg +++ b/packages/vtk/bbs/boxes/bbIsoSurfaceExtractor.bbg @@ -1,6 +1,6 @@ # ---------------------------------- # - BBTKGEditor v 1.4 BBG BlackBox Diagram file -# - /home/davila/Creatis/creaTools/creatools_install/bin/../share/bbtk/bbs/vtk/boxes/bbIsoSurfaceExtractor.bbg +# - /tmpEED/creaTools/creatools_source/bbtk/packages/vtk/bbs/boxes/bbIsoSurfaceExtractor.bbg # ---------------------------------- APP_START @@ -42,30 +42,30 @@ Transform FIN_COMPLEX_PORT COMPLEX_PORT BoxExecute --19.682203:99.666647:-900.000000 +-19.682203:95.133203:-900.000000 FIN_COMPLEX_PORT BOXES:3 BOX vtk:MarchingCubes:mc ISEXEC:FALSE --13.834130:38.831538:-900.000000 -31.740870:28.831538:-900.000000 +11.855384:37.572248:-900.000000 +57.430384:27.572248:-900.000000 FIN_BOX BOX vtk:PolyDataToActor:polydatatoactor ISEXEC:FALSE --99.833324:8.498185:-900.000000 --28.658324:-1.501815:-900.000000 +-89.255289:4.468457:-900.000000 +-18.080289:-5.531543:-900.000000 FIN_BOX BOX std:MultipleInputs:Box03 ISEXEC:FALSE --27.966362:71.986554:-900.000000 -17.608638:61.986554:-900.000000 +-40.307403:60.149229:-900.000000 +5.267597:50.149229:-900.000000 PORT BoxProcessMode:"reactive" FIN_BOX -CONNECTIONS:11 +CONNECTIONS:10 CONNECTION mc:Out:polydatatoactor:In NumberOfControlPoints:0 @@ -94,9 +94,6 @@ CONNECTION BoxExecute:BoxExecute:Box03:In1 NumberOfControlPoints:0 CONNECTION -Box03:Out:polydatatoactor:BoxExecute -NumberOfControlPoints:0 -CONNECTION -Box03:Out:mc:BoxExecute +Box03:BoxChange:polydatatoactor:BoxExecute NumberOfControlPoints:0 APP_END diff --git a/packages/vtk/bbs/boxes/bbIsoSurfaceExtractor.bbs b/packages/vtk/bbs/boxes/bbIsoSurfaceExtractor.bbs index 48d3ab6..0a0add3 100644 --- a/packages/vtk/bbs/boxes/bbIsoSurfaceExtractor.bbs +++ b/packages/vtk/bbs/boxes/bbIsoSurfaceExtractor.bbs @@ -1,6 +1,6 @@ # ---------------------------------- # - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box) -# - /home/davila/Creatis/creaTools/creatools_install/bin/../share/bbtk/bbs/vtk/boxes/bbIsoSurfaceExtractor.bbs +# - /tmpEED/creaTools/creatools_source/bbtk/packages/vtk/bbs/boxes/bbIsoSurfaceExtractor.bbs # ---------------------------------- include std @@ -15,17 +15,16 @@ description "Extracts an iso-surface of a 3D image and creates a vtkProp3D objec category "3D object creator" -new MarchingCubes mc +new vtk:MarchingCubes mc -new PolyDataToActor polydatatoactor +new vtk:PolyDataToActor polydatatoactor -new MultipleInputs Box03 +new std:MultipleInputs Box03 set Box03.BoxProcessMode "reactive" connect mc.Out polydatatoactor.In -connect Box03.Out polydatatoactor.BoxExecute -connect Box03.Out mc.BoxExecute +connect Box03.BoxChange polydatatoactor.BoxExecute # Complex input ports input In mc.In " " @@ -39,5 +38,6 @@ input BoxExecute Box03.In1 " " # Complex output ports output Out polydatatoactor.Out " " +message endefine diff --git a/packages/vtk/src/bbvtkImageVtkProperties.cxx b/packages/vtk/src/bbvtkImageVtkProperties.cxx index 9a8b563..f9d8b7d 100644 --- a/packages/vtk/src/bbvtkImageVtkProperties.cxx +++ b/packages/vtk/src/bbvtkImageVtkProperties.cxx @@ -50,7 +50,9 @@ void ImageVtkProperties::Process() std::vector vspacing; std::vector vrange; - if ( bbGetInputIn() ){ + if ( bbGetInputIn() ) + { + bbGetInputIn()->Modified(); bbGetInputIn()->Update(); bbGetInputIn()->GetWholeExtent(ext); @@ -68,23 +70,25 @@ void ImageVtkProperties::Process() bbGetInputIn()->GetSpacing(spc); for (unsigned int i=0;iGetScalarType()==VTK_BIT) nametype="VTK_BIT"; // 1 - if (bbGetInputIn()->GetScalarType()==VTK_CHAR) nametype="VTK_CHAR"; // 2 + if (bbGetInputIn()->GetScalarType()==VTK_BIT) nametype="VTK_BIT"; // 1 + if (bbGetInputIn()->GetScalarType()==VTK_CHAR) nametype="VTK_CHAR"; // 2 if (bbGetInputIn()->GetScalarType()==VTK_SIGNED_CHAR) nametype="VTK_SIGNED_CHAR"; // 15 if (bbGetInputIn()->GetScalarType()==VTK_UNSIGNED_CHAR) nametype="VTK_UNSIGNED_CHAR"; // 3 - if (bbGetInputIn()->GetScalarType()==VTK_SHORT) nametype="VTK_SHORT"; // 4 + if (bbGetInputIn()->GetScalarType()==VTK_SHORT) nametype="VTK_SHORT"; // 4 if (bbGetInputIn()->GetScalarType()==VTK_UNSIGNED_SHORT) nametype="VTK_UNSIGNED_SHORT"; // 5 - if (bbGetInputIn()->GetScalarType()==VTK_INT) nametype="VTK_INT"; // 6 + if (bbGetInputIn()->GetScalarType()==VTK_INT) nametype="VTK_INT"; // 6 if (bbGetInputIn()->GetScalarType()==VTK_UNSIGNED_INT) nametype="VTK_UNSIGNED_INT"; // 7 - if (bbGetInputIn()->GetScalarType()==VTK_LONG) nametype="VTK_LONG"; // 8 + if (bbGetInputIn()->GetScalarType()==VTK_LONG) nametype="VTK_LONG"; // 8 if (bbGetInputIn()->GetScalarType()==VTK_UNSIGNED_LONG) nametype="VTK_UNSIGNED_LONG"; // 9 - if (bbGetInputIn()->GetScalarType()==VTK_FLOAT) nametype="VTK_FLOAT"; // 10 - if (bbGetInputIn()->GetScalarType()==VTK_DOUBLE) nametype="VTK_DOUBLE"; // 11 + if (bbGetInputIn()->GetScalarType()==VTK_FLOAT) nametype="VTK_FLOAT"; // 10 + if (bbGetInputIn()->GetScalarType()==VTK_DOUBLE) nametype="VTK_DOUBLE"; // 11 } else { dim = 0; numberoOfComponents = 0; diff --git a/packages/wx/src/bbwxColourSelectorButton.cxx b/packages/wx/src/bbwxColourSelectorButton.cxx index e0c2278..df4ed6e 100644 --- a/packages/wx/src/bbwxColourSelectorButton.cxx +++ b/packages/wx/src/bbwxColourSelectorButton.cxx @@ -164,6 +164,7 @@ void wxColourPickerCtrlWidget::UpdateBox() void ColourSelectorButton::Process() { +/* // The widget may not be created : have to test it before using it wxColourPickerCtrlWidget* w = ( wxColourPickerCtrlWidget* )bbGetOutputWidget(); if (w) @@ -176,6 +177,8 @@ void wxColourPickerCtrlWidget::UpdateBox() // to the input (which may have changed if the user set it) bbSetOutputOut(bbGetInputIn()); } +*/ + } @@ -199,6 +202,7 @@ void wxColourPickerCtrlWidget::UpdateBox() cr , cg , cb ); bbSetOutputWidget( w ); + bbSetOutputOut(bbGetInputIn()); } diff --git a/packages/wxvtk/bbs/boxes/bbIsoSurfaceWidget.bbg b/packages/wxvtk/bbs/boxes/bbIsoSurfaceWidget.bbg index a79e53b..c353d2f 100644 --- a/packages/wxvtk/bbs/boxes/bbIsoSurfaceWidget.bbg +++ b/packages/wxvtk/bbs/boxes/bbIsoSurfaceWidget.bbg @@ -1,6 +1,6 @@ # ---------------------------------- # - BBTKGEditor v 1.4 BBG BlackBox Diagram file -# - /home/davila/Creatis/creaTools/creatools_install/bin/../share/bbtk/bbs/wxvtk/boxes/bbIsoSurfaceWidget.bbg +# - /tmpEED/creaTools/creatools_source/bbtk/packages/wxvtk/bbs/boxes/bbIsoSurfaceWidget.bbg # ---------------------------------- APP_START @@ -70,16 +70,16 @@ PORT Orientation:"HORIZONTAL" FIN_BOX BOX -vtk:IsoSurfaceExtractor:surface +vtk:IsoSurfaceExtractor:Asurface ISEXEC:FALSE -36.840302:-236.896173:-900.000000 -108.015302:-246.896173:-900.000000 +43.917303:-225.853762:-900.000000 +115.092303:-235.853762:-900.000000 FIN_BOX BOX wx:Slider:isovalue ISEXEC:FALSE -97.623363:33.580835:-900.000000 -149.023363:23.580835:-900.000000 +98.069545:33.134653:-900.000000 +149.469545:23.134653:-900.000000 PORT ChangeResolution:"true" PORT @@ -106,8 +106,8 @@ FIN_BOX BOX wx:ColourSelectorButton:colour ISEXEC:FALSE -10.003991:41.822344:-900.000000 -81.178991:31.822344:-900.000000 +5.737517:35.117885:-900.000000 +76.912517:25.117885:-900.000000 FIN_BOX BOX std:MultipleInputs:refresh @@ -116,18 +116,18 @@ ISEXEC:FALSE -47.043071:-114.029679:-900.000000 FIN_BOX BOX -std:Div:div +std:Div:Adiv ISEXEC:FALSE -0.000000:-110.000000:-900.000000 -26.375000:-120.000000:-900.000000 +1.523741:-151.750497:-900.000000 +34.298741:-161.750497:-900.000000 PORT In2:"100" FIN_BOX BOX vtk:UpdateRender:Box08 ISEXEC:FALSE --7.502993:-172.858283:-900.000000 -38.072007:-182.858283:-900.000000 +-38.587305:-230.303310:-900.000000 +6.987695:-240.303310:-900.000000 PORT Active:"true" FIN_BOX @@ -137,18 +137,18 @@ ISEXEC:FALSE 170.465036:-148.550905:-900.000000 216.040036:-158.550905:-900.000000 FIN_BOX -CONNECTIONS:27 +CONNECTIONS:28 CONNECTION -isovalue:Out:surface:Isovalue +isovalue:Out:Asurface:Isovalue NumberOfControlPoints:0 CONNECTION -opacity:Out:div:In1 +opacity:Out:Adiv:In1 NumberOfControlPoints:0 CONNECTION -div:Out:surface:Opacity +Adiv:Out:Asurface:Opacity NumberOfControlPoints:0 CONNECTION -colour:Out:surface:Colour +colour:Out:Asurface:Colour NumberOfControlPoints:0 CONNECTION isovalue:BoxChange:refresh:In1 @@ -157,9 +157,6 @@ CONNECTION opacity:BoxChange:refresh:In2 NumberOfControlPoints:0 CONNECTION -colour:BoxChange:refresh:In3 -NumberOfControlPoints:0 -CONNECTION colour:Widget:controls:Widget3 NumberOfControlPoints:0 CONNECTION @@ -169,7 +166,7 @@ CONNECTION opacity:Widget:controls:Widget2 NumberOfControlPoints:0 CONNECTION -Box09:Out:surface:Renderer +Box09:Out:Asurface:Renderer NumberOfControlPoints:0 CONNECTION Box09:Out:Box08:Renderer @@ -193,7 +190,7 @@ CONNECTION BoxExecute:BoxExecute:refresh:In4 NumberOfControlPoints:0 CONNECTION -In:In:surface:In +In:In:Asurface:In NumberOfControlPoints:0 CONNECTION maxIsovalue:maxIsovalue:isovalue:Max @@ -202,21 +199,27 @@ CONNECTION vtkRenderer:vtkRenderer:Box09:In NumberOfControlPoints:0 CONNECTION -surface:Out:Out:Out +Asurface:Out:Out:Out NumberOfControlPoints:0 CONNECTION controls:Widget:Widget:Widget NumberOfControlPoints:0 CONNECTION -refresh:Out:BoxChange:BoxChange +opacity:BoxChange:refresh:BoxExecute NumberOfControlPoints:0 CONNECTION -refresh:Out:Box08:BoxExecute +refresh:BoxChange:BoxChange:BoxChange NumberOfControlPoints:0 CONNECTION -refresh:Out:surface:BoxExecute +refresh:BoxChange:Asurface:BoxExecute NumberOfControlPoints:0 CONNECTION -opacity:BoxChange:refresh:BoxExecute +refresh:BoxChange:Box08:BoxExecute +NumberOfControlPoints:0 +CONNECTION +refresh:BoxChange:Adiv:BoxExecute +NumberOfControlPoints:0 +CONNECTION +colour:BoxChange:refresh:In3 NumberOfControlPoints:0 APP_END diff --git a/packages/wxvtk/bbs/boxes/bbIsoSurfaceWidget.bbs b/packages/wxvtk/bbs/boxes/bbIsoSurfaceWidget.bbs index 6c25ef9..e2fd238 100644 --- a/packages/wxvtk/bbs/boxes/bbIsoSurfaceWidget.bbs +++ b/packages/wxvtk/bbs/boxes/bbIsoSurfaceWidget.bbs @@ -1,6 +1,6 @@ # ---------------------------------- # - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box) -# - /home/davila/Creatis/creaTools/creatools_install/bin/../share/bbtk/bbs/wxvtk/boxes/bbIsoSurfaceWidget.bbs +# - /tmpEED/creaTools/creatools_source/bbtk/packages/wxvtk/bbs/boxes/bbIsoSurfaceWidget.bbs # ---------------------------------- include std @@ -16,51 +16,52 @@ description "Image iso-surface extractor (vtk" category "image;mesh;widget;viewer" -new LayoutLine controls +new wx:LayoutLine controls set controls.Orientation "HORIZONTAL" -new IsoSurfaceExtractor surface +new vtk:IsoSurfaceExtractor Asurface -new Slider isovalue +new wx:Slider isovalue set isovalue.ChangeResolution "true" set isovalue.Max "5000" set isovalue.Title "Isovalue" -new Slider opacity +new wx:Slider opacity set opacity.In "100" set opacity.Max "100" set opacity.Min "0" set opacity.ReactiveOnTrack "true" set opacity.Title "Opacity" -new ColourSelectorButton colour +new wx:ColourSelectorButton colour -new MultipleInputs refresh +new std:MultipleInputs refresh -new Div div - set div.In2 "100" +new std:Div Adiv + set Adiv.In2 "100" -new UpdateRender Box08 +new vtk:UpdateRender Box08 set Box08.Active "true" -new MagicBox Box09 +new std:MagicBox Box09 -connect isovalue.Out surface.Isovalue -connect opacity.Out div.In1 -connect div.Out surface.Opacity -connect colour.Out surface.Colour +connect isovalue.Out Asurface.Isovalue +connect opacity.Out Adiv.In1 +connect Adiv.Out Asurface.Opacity +connect colour.Out Asurface.Colour connect isovalue.BoxChange refresh.In1 connect opacity.BoxChange refresh.In2 -connect colour.BoxChange refresh.In3 connect colour.Widget controls.Widget3 connect isovalue.Widget controls.Widget1 connect opacity.Widget controls.Widget2 -connect Box09.Out surface.Renderer +connect Box09.Out Asurface.Renderer connect Box09.Out Box08.Renderer -connect refresh.Out Box08.BoxExecute -connect refresh.Out surface.BoxExecute connect opacity.BoxChange refresh.BoxExecute +connect refresh.BoxChange Asurface.BoxExecute +connect refresh.BoxChange Box08.BoxExecute +connect refresh.BoxChange Adiv.BoxExecute +connect colour.BoxChange refresh.In3 # Complex input ports input Title controls.WinTitle " " @@ -69,14 +70,15 @@ input Isovalue isovalue.In " " input Colour colour.In " " input Vertical controls.Orientation " " input BoxExecute refresh.In4 " " -input In surface.In " " +input In Asurface.In " " input maxIsovalue isovalue.Max " " input vtkRenderer Box09.In " " # Complex output ports -output Out surface.Out " " +output Out Asurface.Out " " output Widget controls.Widget " " -output BoxChange refresh.Out " " +output BoxChange refresh.BoxChange " " +message endefine -- 2.47.1