From: Eduardo DAVILA Date: Fri, 30 Jun 2023 15:51:59 +0000 (+0200) Subject: Clean code X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=05b95bb6acca7d1f483894089e4f70bcb4693889;p=creaMaracasVisu.git Clean code --- diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbg b/bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbg index 58d5a4b..46efde3 100644 --- a/bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbg +++ b/bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbg @@ -72,7 +72,7 @@ COMPLEX_PORT meshmanagermodel -150.374274:130.740991:-900.000000 FIN_COMPLEX_PORT -BOXES:90 +BOXES:96 BOX creaMaracasVisu:ShowNPoints:showNpoints ISEXEC:FALSE @@ -348,8 +348,8 @@ FIN_BOX BOX creaVtk:MeshManager_tool:Box45 ISEXEC:FALSE --85.991381:-134.296045:-900.000000 --63.491381:-136.796045:-900.000000 +-85.582890:-134.568372:-900.000000 +-63.082890:-137.068372:-900.000000 PORT Tool:"30" FIN_BOX @@ -384,8 +384,8 @@ FIN_BOX BOX std:MultipleInputs:Box51 ISEXEC:FALSE --92.949669:-148.627142:-900.000000 --70.979669:-151.127142:-900.000000 +-100.525236:-149.444123:-900.000000 +-78.555236:-151.944123:-900.000000 FIN_BOX BOX creaMaracasVisu:ShowNPoints_Tools:Box52 @@ -398,14 +398,14 @@ FIN_BOX BOX std:MultipleInputs:Box53 ISEXEC:FALSE --96.292390:-13.293248:-900.000000 --74.322390:-15.793248:-900.000000 +-100.104016:-15.066233:-900.000000 +-78.134016:-17.566233:-900.000000 FIN_BOX BOX std:MultipleInputs:Box55 ISEXEC:FALSE --56.758371:-149.042885:-900.000000 --34.788371:-151.542885:-900.000000 +-50.378946:-149.242242:-900.000000 +-28.408946:-151.742242:-900.000000 FIN_BOX BOX creaMaracasVisu:MeshContours_Widget:Box62 @@ -788,12 +788,14 @@ creaVtk:CleanMeshWithPatch:Box135 ISEXEC:FALSE 10.527341:-109.019479:-900.000000 33.327341:-111.519479:-900.000000 +PORT +BoxProcessMode:"Manual" FIN_BOX BOX creaMaracasVisu:PolyDataToActor_Widget:Box136 ISEXEC:FALSE -2.128805:-136.236464:-900.000000 -25.258805:-138.736464:-900.000000 +8.675945:-154.885681:-900.000000 +31.805945:-157.385681:-900.000000 PORT active:"true" PORT @@ -804,20 +806,68 @@ FIN_BOX BOX wx:LayoutLine:Box137 ISEXEC:FALSE -1.468734:-145.464302:-900.000000 -34.788734:-147.964302:-900.000000 +9.589465:-167.431328:-900.000000 +42.909465:-169.931328:-900.000000 PORT WinTitle:"Beta" FIN_BOX BOX wx:CommandButton:Box138 ISEXEC:FALSE -52.385246:-124.247932:-900.000000 -74.770246:-126.747932:-900.000000 +58.068964:-92.270531:-900.000000 +80.453964:-94.770531:-900.000000 PORT Label:"Run" FIN_BOX -CONNECTIONS:188 +BOX +creaVtk:PolyDataToImageData:Box139 +ISEXEC:FALSE +58.318610:-119.259857:-900.000000 +81.228610:-121.759857:-900.000000 +FIN_BOX +BOX +vtk:CreateImage:Box140 +ISEXEC:FALSE +59.145307:-110.491091:-900.000000 +81.185307:-112.991091:-900.000000 +FIN_BOX +BOX +vtk:MarchingCubes:Box141 +ISEXEC:FALSE +51.358184:-129.539050:-900.000000 +73.643184:-132.039050:-900.000000 +PORT +Value:"128" +FIN_BOX +BOX +vtk:ImageGaussianSmooth:Box142 +ISEXEC:FALSE +55.739960:-125.030810:-900.000000 +78.744960:-127.530810:-900.000000 +PORT +StdDevX:"1" +PORT +StdDevY:"1" +PORT +StdDevZ:"1" +FIN_BOX +BOX +creaVtk:MeshReduction_DecimatePro:Box143 +ISEXEC:FALSE +50.853681:-135.841827:-900.000000 +74.458681:-138.341827:-900.000000 +PORT +TargetReduction:"0.8" +FIN_BOX +BOX +creaVtk:MeshManager_tool:Box144 +ISEXEC:FALSE +-77.502254:-149.176066:-900.000000 +-54.892254:-151.676066:-900.000000 +PORT +Tool:"30" +FIN_BOX +CONNECTIONS:198 CONNECTION Box06:LstContourPointsX:Box04:LstX NumberOfControlPoints:0 @@ -966,9 +1016,6 @@ CONNECTION Box49:OutString:Box06:NbPoints NumberOfControlPoints:0 CONNECTION -Box42:BoxChange:Box51:BoxExecute -NumberOfControlPoints:0 -CONNECTION Box45:BoxChange:Box51:In2 NumberOfControlPoints:0 CONNECTION @@ -984,9 +1031,6 @@ CONNECTION Box53:BoxChange:Box77:BoxExecute NumberOfControlPoints:0 CONNECTION -Box42:BoxChange:Box53:In3 -NumberOfControlPoints:0 -CONNECTION Box43:BoxChange:Box55:BoxExecute NumberOfControlPoints:0 CONNECTION @@ -1362,9 +1406,6 @@ CONNECTION showNpoints:lstIndexs:Box135:LstIndexs NumberOfControlPoints:0 CONNECTION -Box135:Out:Box136:polydata -NumberOfControlPoints:0 -CONNECTION Box66:Out:Box136:render NumberOfControlPoints:0 CONNECTION @@ -1377,9 +1418,48 @@ CONNECTION Box138:Widget:Box137:Widget4 NumberOfControlPoints:0 CONNECTION -Box138:BoxChange:Box136:boxexecute +Box68:Spacing:Box135:Spacing +NumberOfControlPoints:0 +CONNECTION +Box138:BoxChange:Box135:BoxExecute NumberOfControlPoints:0 CONNECTION -Box68:Spacing:Box135:Spacing +Box135:BoxChange:Box136:boxexecute +NumberOfControlPoints:0 +CONNECTION +Box135:Out:Box139:InPolyData +NumberOfControlPoints:0 +CONNECTION +Box68:Spacing:Box140:Spacing +NumberOfControlPoints:0 +CONNECTION +Box68:Size:Box140:Dimensions +NumberOfControlPoints:0 +CONNECTION +Box68:TypeName:Box140:OutputFormat +NumberOfControlPoints:0 +CONNECTION +Box140:Out:Box139:InImage +NumberOfControlPoints:0 +CONNECTION +Box139:Out:Box142:In +NumberOfControlPoints:0 +CONNECTION +Box142:Out:Box141:In +NumberOfControlPoints:0 +CONNECTION +Box141:Out:Box143:In +NumberOfControlPoints:0 +CONNECTION +Box135:Out:Box136:polydata +NumberOfControlPoints:0 +CONNECTION +Box46:Out:Box144:MeshManagerModel +NumberOfControlPoints:0 +CONNECTION +Box135:Out:Box144:Mesh +NumberOfControlPoints:0 +CONNECTION +Box42:BoxChange:Box144:BoxExecute NumberOfControlPoints:0 APP_END diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbs b/bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbs index 376c093..041c1de 100644 --- a/bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbs +++ b/bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbs @@ -288,6 +288,7 @@ new wx:LayoutLine Box134 set Box134.WinTitle "1.3 Apply Changes" new creaVtk:CleanMeshWithPatch Box135 + set Box135.BoxProcessMode "Manual" new creaMaracasVisu:PolyDataToActor_Widget Box136 set Box136.active "true" @@ -300,6 +301,24 @@ new wx:LayoutLine Box137 new wx:CommandButton Box138 set Box138.Label "Run" +new creaVtk:PolyDataToImageData Box139 + +new vtk:CreateImage Box140 + +new vtk:MarchingCubes Box141 + set Box141.Value "128" + +new vtk:ImageGaussianSmooth Box142 + set Box142.StdDevX "1" + set Box142.StdDevY "1" + set Box142.StdDevZ "1" + +new creaVtk:MeshReduction_DecimatePro Box143 + set Box143.TargetReduction "0.8" + +new creaVtk:MeshManager_tool Box144 + set Box144.Tool "30" + connect Box06.LstContourPointsX Box04.LstX connect showNpoints.lstIndexs Box06.LstIndexsIn @@ -344,13 +363,11 @@ connect Box38.Widget Box39.Widget2 connect Box79.Widget Box40.Widget2 connect Box46.Out Box45.MeshManagerModel connect Box49.OutString Box06.NbPoints -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 @@ -467,13 +484,25 @@ connect showNpoints.lstPointsX Box135.LstX connect showNpoints.lstPointsY Box135.LstY connect showNpoints.lstPointsZ Box135.LstZ connect showNpoints.lstIndexs Box135.LstIndexs -connect Box135.Out Box136.polydata connect Box66.Out Box136.render connect Box136.widget Box137.Widget2 connect Box137.Widget Box106.Widget4 connect Box138.Widget Box137.Widget4 -connect Box138.BoxChange Box136.boxexecute connect Box68.Spacing Box135.Spacing +connect Box138.BoxChange Box135.BoxExecute +connect Box135.BoxChange Box136.boxexecute +connect Box135.Out Box139.InPolyData +connect Box68.Spacing Box140.Spacing +connect Box68.Size Box140.Dimensions +connect Box68.TypeName Box140.OutputFormat +connect Box140.Out Box139.InImage +connect Box139.Out Box142.In +connect Box142.Out Box141.In +connect Box141.Out Box143.In +connect Box135.Out Box136.polydata +connect Box46.Out Box144.MeshManagerModel +connect Box135.Out Box144.Mesh +connect Box42.BoxChange Box144.BoxExecute # Complex input ports input point showNpoints.In " " diff --git a/bbtk/bbs/boxes/Mesh_tool_Help.bbg b/bbtk/bbs/boxes/Mesh_tool_Help.bbg index 54f6357..fe06757 100644 --- a/bbtk/bbs/boxes/Mesh_tool_Help.bbg +++ b/bbtk/bbs/boxes/Mesh_tool_Help.bbg @@ -16,7 +16,7 @@ widget 31.496471:-49.500047:-900.000000 FIN_COMPLEX_PORT COMPLEXINPUTS:0 -BOXES:23 +BOXES:26 BOX std:StringSelect:Box09 ISEXEC:FALSE @@ -33,7 +33,7 @@ BOX wx:LayoutLine:Box10 ISEXEC:FALSE 29.171044:-22.567013:-900.000000 -62.491044:-25.067013:-900.000000 +50.831044:-25.067013:-900.000000 PORT Orientation:"V" FIN_BOX @@ -43,13 +43,13 @@ ISEXEC:FALSE -36.547295:10.222482:-900.000000 -13.787295:7.722482:-900.000000 PORT -In2:"https&&2P&&//youtu.be/StkFyVv4xq8" +In2:"https&&2P&&//www.youtube.com/playlist?list=PLQN4UjAcVj8QX1uEVrW-EWB9iA4EsrPrF" FIN_BOX BOX std:ConcatStrings:Box12 ISEXEC:FALSE 58.079651:9.843039:-900.000000 -80.839651:7.343039:-900.000000 +80.049651:7.343039:-900.000000 PORT In2:"https&&2P&&//youtu.be/KQpokJXT_hA" FIN_BOX @@ -68,8 +68,8 @@ FIN_BOX BOX wx:CommandButton:Box15 ISEXEC:FALSE --51.996310:14.603546:-900.000000 --29.721310:12.103546:-900.000000 +-51.734245:14.603546:-900.000000 +-29.459245:12.103546:-900.000000 PORT Label:"video 1 General Tool" FIN_BOX @@ -91,7 +91,7 @@ BOX std:ConcatStrings:Box18 ISEXEC:FALSE -4.166231:8.925570:-900.000000 -18.593769:6.425570:-900.000000 +22.760000:6.425570:-900.000000 PORT In2:"https&&2P&&//youtu.be/VtBAtlMufDc" FIN_BOX @@ -99,7 +99,7 @@ BOX wx:CommandButton:Box19 ISEXEC:FALSE -12.774638:14.459544:-900.000000 -9.500362:11.959544:-900.000000 +21.000000:11.959544:-900.000000 PORT Label:"video 1.1.1 Surface from 3 or 4 pointsTool" FIN_BOX @@ -113,7 +113,7 @@ BOX std:ConcatStrings:Box21 ISEXEC:FALSE 26.973720:9.545316:-900.000000 -49.733720:7.045316:-900.000000 +48.943720:7.045316:-900.000000 PORT In2:"https&&2P&&//youtu.be/JB2otNTfWU0" FIN_BOX @@ -134,46 +134,46 @@ FIN_BOX BOX std:ConcatStrings:Box24 ISEXEC:FALSE -91.525425:10.770228:-900.000000 -114.285425:8.270228:-900.000000 +152.929168:8.446843:-900.000000 +174.899168:5.946843:-900.000000 PORT In2:"https&&2P&&//youtu.be/kHwBMocVmqU" FIN_BOX BOX wx:CommandButton:Box25 ISEXEC:FALSE -88.681576:16.073620:-900.000000 -110.956576:13.573620:-900.000000 +150.085319:13.750235:-900.000000 +172.360319:11.250235:-900.000000 PORT -Label:"video 1.4 Deformation Tool" +Label:"video 1.5 Deformation Tool" FIN_BOX BOX std:ExecSystemCommand:Box26 ISEXEC:FALSE -90.756817:3.237872:-900.000000 -113.591817:0.737872:-900.000000 +152.160560:0.914487:-900.000000 +174.995560:-1.585513:-900.000000 FIN_BOX BOX std:ConcatStrings:Box27 ISEXEC:FALSE -126.815858:13.004050:-900.000000 -149.575858:10.504050:-900.000000 +188.219601:10.680665:-900.000000 +210.189601:8.180665:-900.000000 PORT In2:"https&&2P&&//youtu.be/hHqvZXvQIqs" FIN_BOX BOX wx:CommandButton:Box28 ISEXEC:FALSE -123.972009:18.307443:-900.000000 -146.247009:15.807443:-900.000000 +185.375752:15.984058:-900.000000 +207.650752:13.484058:-900.000000 PORT -Label:"video 1.5 External Mask Tool" +Label:"video 1.6 External Mask Tool" FIN_BOX BOX std:ExecSystemCommand:Box29 ISEXEC:FALSE -126.047250:5.471694:-900.000000 -148.882250:2.971694:-900.000000 +187.450993:3.148309:-900.000000 +210.285993:0.648309:-900.000000 FIN_BOX BOX wx:OutputText:Box30 @@ -184,12 +184,34 @@ FIN_BOX BOX wx:LayoutCenter:Box31 ISEXEC:FALSE -29.271386:-35.084097:-900.000000 -51.201386:-37.584097:-900.000000 +31.926683:-31.930932:-900.000000 +53.856683:-34.430932:-900.000000 PORT WinTitle:"Help" FIN_BOX -CONNECTIONS:28 +BOX +std:ConcatStrings:Box32 +ISEXEC:FALSE +93.653939:10.698401:-900.000000 +115.623939:8.198401:-900.000000 +PORT +In2:"https&&2P&&//youtu.be/_Wva8ZcqdU8" +FIN_BOX +BOX +wx:CommandButton:Box33 +ISEXEC:FALSE +90.810090:16.001793:-900.000000 +113.085090:13.501793:-900.000000 +PORT +Label:"video 1.3 Patch Tool" +FIN_BOX +BOX +std:ExecSystemCommand:Box34 +ISEXEC:FALSE +92.885330:3.166045:-900.000000 +115.720330:0.666045:-900.000000 +FIN_BOX +CONNECTIONS:32 CONNECTION Box09:Out:Box11:In1 NumberOfControlPoints:0 @@ -254,24 +276,36 @@ CONNECTION Box25:Widget:Box10:Widget7 NumberOfControlPoints:0 CONNECTION -Box16:Widget:Box10:Widget6 +Box30:Widget:Box10:Widget1 NumberOfControlPoints:0 CONNECTION -Box22:Widget:Box10:Widget4 +Box31:Widget:widget:widget NumberOfControlPoints:0 CONNECTION -Box19:Widget:Box10:Widget3 +Box10:Widget:Box31:Widget2 +NumberOfControlPoints:0 +CONNECTION +Box33:BoxChange:Box34:BoxExecute +NumberOfControlPoints:0 +CONNECTION +Box32:Out:Box34:In +NumberOfControlPoints:0 +CONNECTION +Box09:Out:Box32:In1 NumberOfControlPoints:0 CONNECTION Box15:Widget:Box10:Widget2 NumberOfControlPoints:0 CONNECTION -Box30:Widget:Box10:Widget1 +Box19:Widget:Box10:Widget3 NumberOfControlPoints:0 CONNECTION -Box31:Widget:widget:widget +Box22:Widget:Box10:Widget4 NumberOfControlPoints:0 CONNECTION -Box10:Widget:Box31:Widget2 +Box16:Widget:Box10:Widget5 +NumberOfControlPoints:0 +CONNECTION +Box33:Widget:Box10:Widget6 NumberOfControlPoints:0 APP_END diff --git a/bbtk/bbs/boxes/Mesh_tool_Help.bbs b/bbtk/bbs/boxes/Mesh_tool_Help.bbs index 0ca10fe..c165344 100644 --- a/bbtk/bbs/boxes/Mesh_tool_Help.bbs +++ b/bbtk/bbs/boxes/Mesh_tool_Help.bbs @@ -24,7 +24,7 @@ new wx:LayoutLine Box10 set Box10.Orientation "V" new std:ConcatStrings Box11 - set Box11.In2 "https://youtu.be/StkFyVv4xq8" + set Box11.In2 "https://www.youtube.com/playlist?list=PLQN4UjAcVj8QX1uEVrW-EWB9iA4EsrPrF" new std:ConcatStrings Box12 set Box12.In2 "https://youtu.be/KQpokJXT_hA" @@ -61,7 +61,7 @@ new std:ConcatStrings Box24 set Box24.In2 "https://youtu.be/kHwBMocVmqU" new wx:CommandButton Box25 - set Box25.Label "video 1.4 Deformation Tool" + set Box25.Label "video 1.5 Deformation Tool" new std:ExecSystemCommand Box26 @@ -69,7 +69,7 @@ new std:ConcatStrings Box27 set Box27.In2 "https://youtu.be/hHqvZXvQIqs" new wx:CommandButton Box28 - set Box28.Label "video 1.5 External Mask Tool" + set Box28.Label "video 1.6 External Mask Tool" new std:ExecSystemCommand Box29 @@ -78,6 +78,14 @@ new wx:OutputText Box30 new wx:LayoutCenter Box31 set Box31.WinTitle "Help" +new std:ConcatStrings Box32 + set Box32.In2 "https://youtu.be/_Wva8ZcqdU8" + +new wx:CommandButton Box33 + set Box33.Label "video 1.3 Patch Tool" + +new std:ExecSystemCommand Box34 + connect Box09.Out Box11.In1 connect Box09.Out Box12.In1 @@ -100,12 +108,16 @@ connect Box27.Out Box29.In connect Box09.Out Box27.In1 connect Box28.Widget Box10.Widget8 connect Box25.Widget Box10.Widget7 -connect Box16.Widget Box10.Widget6 -connect Box22.Widget Box10.Widget4 -connect Box19.Widget Box10.Widget3 -connect Box15.Widget Box10.Widget2 connect Box30.Widget Box10.Widget1 connect Box10.Widget Box31.Widget2 +connect Box33.BoxChange Box34.BoxExecute +connect Box32.Out Box34.In +connect Box09.Out Box32.In1 +connect Box15.Widget Box10.Widget2 +connect Box19.Widget Box10.Widget3 +connect Box22.Widget Box10.Widget4 +connect Box16.Widget Box10.Widget5 +connect Box33.Widget Box10.Widget6 # Complex input ports