From: Eduardo DAVILA Date: Thu, 8 Jun 2023 14:28:05 +0000 (+0200) Subject: Clean code X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=6e457517b7d7285e00d89a2888513cad34affa11;p=creaMaracasVisu.git Clean code --- diff --git a/bbtk/bbs/boxes/MeshContours_Interface.bbg b/bbtk/bbs/boxes/MeshContours_Interface.bbg index 5a84f43..b196e4e 100644 --- a/bbtk/bbs/boxes/MeshContours_Interface.bbg +++ b/bbtk/bbs/boxes/MeshContours_Interface.bbg @@ -1,6 +1,6 @@ # ---------------------------------- # - BBTKGEditor v 1.5 BBG BlackBox Diagram file -# - /Users/davila/Creatis/C22/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/MeshContours_Interface.bbg +# - /Users/davila/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/MeshContours_Interface.bbg # ---------------------------------- APP_START @@ -10,11 +10,7 @@ AUTHOR:Author ?? COMPLEXBOX:TRUE COMPLEXBOXNAME:MeshContours_Interface PACKAGENAME:creaMaracasVisu -COMPLEXOUTPUTS:3 -COMPLEX_PORT -Opacity1 --78.427592:-20.488061:-900.000000 -FIN_COMPLEX_PORT +COMPLEXOUTPUTS:2 COMPLEX_PORT widget -69.516706:-21.006612:-900.000000 @@ -24,7 +20,7 @@ active -89.058002:-21.047792:-900.000000 FIN_COMPLEX_PORT COMPLEXINPUTS:0 -BOXES:4 +BOXES:2 BOX wx:LayoutLine:Box54 ISEXEC:FALSE @@ -34,30 +30,6 @@ PORT Orientation:"V" FIN_BOX BOX -wx:Slider:Box63 -ISEXEC:FALSE --56.419817:21.711801:-900.000000 --26.619817:19.211801:-900.000000 -PORT -In:"100" -PORT -Label:"true" -PORT -Max:"100" -PORT -ReactiveOnTrack:"true" -PORT -Title:"Contour opacity " -FIN_BOX -BOX -std:Div:Box64 -ISEXEC:FALSE --75.435715:14.613059:-900.000000 --54.510715:12.113059:-900.000000 -PORT -In2:"100" -FIN_BOX -BOX wx:CheckBox:Box07 ISEXEC:FALSE -86.093387:21.763572:-900.000000 @@ -67,13 +39,7 @@ In:"false" PORT Title:"Contour" FIN_BOX -CONNECTIONS:6 -CONNECTION -Box63:Out:Box64:In1 -NumberOfControlPoints:0 -CONNECTION -Box64:Out:Opacity1:Opacity1 -NumberOfControlPoints:0 +CONNECTIONS:3 CONNECTION Box54:Widget:widget:widget NumberOfControlPoints:0 @@ -83,7 +49,4 @@ NumberOfControlPoints:0 CONNECTION Box07:Out:active:active NumberOfControlPoints:0 -CONNECTION -Box63:Widget:Box54:Widget6 -NumberOfControlPoints:0 APP_END diff --git a/bbtk/bbs/boxes/MeshContours_Interface.bbs b/bbtk/bbs/boxes/MeshContours_Interface.bbs index 5c410f4..9f0e319 100644 --- a/bbtk/bbs/boxes/MeshContours_Interface.bbs +++ b/bbtk/bbs/boxes/MeshContours_Interface.bbs @@ -1,12 +1,11 @@ # ---------------------------------- # - BBTKGEditor v 1.5 BBS BlackBox Script (Complex Box) -# - /Users/davila/Creatis/C22/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/MeshContours_Interface.bbs +# - /Users/davila/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/MeshContours_Interface.bbs # ---------------------------------- include std include itkvtk include wx -include std define MeshContours_Interface creaMaracasVisu @@ -18,29 +17,16 @@ category "" new wx:LayoutLine Box54 set Box54.Orientation "V" -new wx:Slider Box63 - set Box63.In "100" - set Box63.Label "true" - set Box63.Max "100" - set Box63.ReactiveOnTrack "true" - set Box63.Title "Contour opacity " - -new std:Div Box64 - set Box64.In2 "100" - new wx:CheckBox Box07 set Box07.In "false" set Box07.Title "Contour" -connect Box63.Out Box64.In1 connect Box07.Widget Box54.Widget3 -connect Box63.Widget Box54.Widget6 # Complex input ports # Complex output ports -output Opacity1 Box64.Out " " output widget Box54.Widget " " output active Box07.Out " " diff --git a/bbtk/bbs/boxes/MeshContours_Widget.bbg b/bbtk/bbs/boxes/MeshContours_Widget.bbg index 23cdd68..ee9c057 100644 --- a/bbtk/bbs/boxes/MeshContours_Widget.bbg +++ b/bbtk/bbs/boxes/MeshContours_Widget.bbg @@ -1,6 +1,6 @@ # ---------------------------------- # - BBTKGEditor v 1.5 BBG BlackBox Diagram file -# - /Users/davila/Creatis/C22/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/MeshContours_Widget.bbg +# - /Users/davila/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/MeshContours_Widget.bbg # ---------------------------------- APP_START @@ -10,11 +10,15 @@ AUTHOR:Author ?? COMPLEXBOX:TRUE COMPLEXBOXNAME:MeshContours_Widget PACKAGENAME:creaMaracasVisu -COMPLEXOUTPUTS:1 +COMPLEXOUTPUTS:2 COMPLEX_PORT _widget -98.407711:-38.881249:-900.000000 FIN_COMPLEX_PORT +COMPLEX_PORT +ActiveOut +-104.528773:-38.804811:-900.000000 +FIN_COMPLEX_PORT COMPLEXINPUTS:7 COMPLEX_PORT _polydata @@ -44,7 +48,7 @@ COMPLEX_PORT colorMesh -168.291265:32.654278:-900.000000 FIN_COMPLEX_PORT -BOXES:9 +BOXES:10 BOX std:MagicBox:Box36 ISEXEC:FALSE @@ -84,14 +88,14 @@ FIN_BOX BOX creaMaracasVisu:MeshContours_Interface:Box52 ISEXEC:FALSE --104.618353:11.572832:-900.000000 --81.628353:9.072832:-900.000000 +-101.622755:13.669751:-900.000000 +-78.632755:11.169751:-900.000000 FIN_BOX BOX creaMaracasVisu:MeshContours:Box53 ISEXEC:FALSE --92.083118:-23.289432:-900.000000 --70.068118:-25.789432:-900.000000 +-81.898085:-25.835690:-900.000000 +-59.883085:-28.335690:-900.000000 FIN_BOX BOX std:MagicBox:Box08 @@ -99,7 +103,15 @@ ISEXEC:FALSE -167.907549:21.270126:-900.000000 -146.307549:18.770126:-900.000000 FIN_BOX -CONNECTIONS:19 +BOX +std:ConcatStrings:Box09 +ISEXEC:FALSE +-86.401462:-4.075584:-900.000000 +-63.641462:-6.575584:-900.000000 +PORT +In1:"1" +FIN_BOX +CONNECTIONS:20 CONNECTION _polydata:_polydata:Box38:In NumberOfControlPoints:0 @@ -119,9 +131,6 @@ CONNECTION Box52:widget:_widget:_widget NumberOfControlPoints:0 CONNECTION -Box52:Opacity1:Box53:opacity1 -NumberOfControlPoints:0 -CONNECTION Box38:Out:Box53:polydata NumberOfControlPoints:0 CONNECTION @@ -143,18 +152,24 @@ CONNECTION Box36:BoxChange:Box53:execute NumberOfControlPoints:0 CONNECTION -Box52:Opacity1:Box53:opacity2 +Box52:active:Box53:activeContour NumberOfControlPoints:0 CONNECTION -Box52:Opacity1:Box53:opacity3 +Box08:Out:Box53:colorForMesh NumberOfControlPoints:0 CONNECTION -Box52:active:Box53:activeContour +colorMesh:colorMesh:Box08:In NumberOfControlPoints:0 CONNECTION -Box08:Out:Box53:colorForMesh +Box52:active:ActiveOut:ActiveOut NumberOfControlPoints:0 CONNECTION -colorMesh:colorMesh:Box08:In +Box09:Out:Box53:opacity1 +NumberOfControlPoints:0 +CONNECTION +Box09:Out:Box53:opacity2 +NumberOfControlPoints:0 +CONNECTION +Box09:Out:Box53:opacity3 NumberOfControlPoints:0 APP_END diff --git a/bbtk/bbs/boxes/MeshContours_Widget.bbs b/bbtk/bbs/boxes/MeshContours_Widget.bbs index a8a3a58..5095836 100644 --- a/bbtk/bbs/boxes/MeshContours_Widget.bbs +++ b/bbtk/bbs/boxes/MeshContours_Widget.bbs @@ -1,6 +1,6 @@ # ---------------------------------- # - BBTKGEditor v 1.5 BBS BlackBox Script (Complex Box) -# - /Users/davila/Creatis/C22/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/MeshContours_Widget.bbs +# - /Users/davila/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/MeshContours_Widget.bbs # ---------------------------------- include std @@ -33,18 +33,21 @@ new creaMaracasVisu:MeshContours Box53 new std:MagicBox Box08 +new std:ConcatStrings Box09 + set Box09.In1 "1" + -connect Box52.Opacity1 Box53.opacity1 connect Box38.Out Box53.polydata connect Box45.Out Box53.wxvtkbaseview2D1 connect Box46.Out Box53.wxvtkbaseview2D2 connect Box47.Out Box53.wxvtkbaseview2D3 connect Box51.Out Box53.wxvtkbaseview3D1 connect Box36.BoxChange Box53.execute -connect Box52.Opacity1 Box53.opacity2 -connect Box52.Opacity1 Box53.opacity3 connect Box52.active Box53.activeContour connect Box08.Out Box53.colorForMesh +connect Box09.Out Box53.opacity1 +connect Box09.Out Box53.opacity2 +connect Box09.Out Box53.opacity3 # Complex input ports input _polydata Box38.In " " @@ -57,6 +60,7 @@ input colorMesh Box08.In " " # Complex output ports output _widget Box52.widget " " +output ActiveOut Box52.active " " endefine