From c236d894ee52d99090ca28ac9bea8d90f8559e99 Mon Sep 17 00:00:00 2001 From: "eduardo.davila@creatis.insa-lyon.fr" Date: Tue, 30 Jan 2024 14:20:08 +0100 Subject: [PATCH] #3548 Mesh_tool_ApplyExternalMask --- .../bbs/boxes/Mesh_tool_ApplyExternalMask.bbg | 168 +++++++++++++----- .../bbs/boxes/Mesh_tool_ApplyExternalMask.bbs | 42 ++++- 2 files changed, 155 insertions(+), 55 deletions(-) diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplyExternalMask.bbg b/bbtk/bbs/boxes/Mesh_tool_ApplyExternalMask.bbg index 2682534..d86fc9d 100644 --- a/bbtk/bbs/boxes/Mesh_tool_ApplyExternalMask.bbg +++ b/bbtk/bbs/boxes/Mesh_tool_ApplyExternalMask.bbg @@ -60,7 +60,7 @@ COMPLEX_PORT OutDir -306.137122:136.559941:-900.000000 FIN_COMPLEX_PORT -BOXES:92 +BOXES:97 BOX wx:LayoutLine:Box08 ISEXEC:FALSE @@ -94,8 +94,8 @@ FIN_BOX BOX wx:CommandButton:Box80 ISEXEC:FALSE --99.608528:24.991444:-900.000000 --77.333528:22.491444:-900.000000 +-99.852160:24.016914:-900.000000 +-77.577160:21.516914:-900.000000 PORT Label:"Run" FIN_BOX @@ -276,8 +276,8 @@ FIN_BOX BOX vtk:ImageGaussianSmooth:Box99 ISEXEC:FALSE --255.182927:-47.291143:-900.000000 --232.287927:-49.791143:-900.000000 +-248.181699:-49.041450:-900.000000 +-225.286699:-51.541450:-900.000000 PORT StdDevX:"1" PORT @@ -344,22 +344,20 @@ FIN_BOX BOX vtk:BinaryOperations:Box56 ISEXEC:FALSE --259.088346:-34.548847:-900.000000 --236.793346:-37.048847:-900.000000 -PORT -BoxProcessMode:"Manual" +-250.061762:-37.999452:-900.000000 +-227.766762:-40.499452:-900.000000 FIN_BOX BOX vtk:ImageCastToUShort:Box60 ISEXEC:FALSE --256.026317:-29.121724:-900.000000 --233.506317:-31.621724:-900.000000 +-214.028528:-25.341948:-900.000000 +-191.508528:-27.841948:-900.000000 FIN_BOX BOX creaVtk:ImageThreshold:Box61 ISEXEC:FALSE --259.064677:-39.812250:-900.000000 --236.884677:-42.312250:-900.000000 +-248.712861:-43.400380:-900.000000 +-226.532861:-45.900380:-900.000000 PORT InValue:"255" PORT @@ -466,8 +464,8 @@ FIN_BOX BOX std:StringSelect:Box101 ISEXEC:FALSE --313.066927:72.210668:-900.000000 --288.546927:69.710668:-900.000000 +-314.947448:69.223958:-900.000000 +-290.427448:66.723958:-900.000000 FIN_BOX BOX std:ConcatStrings:Box102 @@ -475,7 +473,7 @@ ISEXEC:FALSE -295.693747:83.725640:-900.000000 -272.933747:81.225640:-900.000000 PORT -In1:"start /b " +In1:"start " FIN_BOX BOX std:Configuration:Box103 @@ -588,8 +586,8 @@ FIN_BOX BOX creaMaracasVisu:ColorLayerImageView2:Box123 ISEXEC:FALSE --295.086341:-75.891865:-900.000000 --267.046341:-78.391865:-900.000000 +-308.463688:-75.766843:-900.000000 +-280.423688:-78.266843:-900.000000 PORT ColorBarPosition:"-100 -100" PORT @@ -630,8 +628,8 @@ FIN_BOX BOX std:MultipleInputs:Box127 ISEXEC:FALSE --296.195768:-69.714919:-900.000000 --274.115768:-72.214919:-900.000000 +-294.945549:-62.963735:-900.000000 +-272.865549:-65.463735:-900.000000 FIN_BOX BOX vtk:UpdateRender:Box128 @@ -644,8 +642,8 @@ FIN_BOX BOX vtk:ImageGaussianSmooth:Box129 ISEXEC:FALSE --304.578465:-39.696287:-900.000000 --281.573465:-42.196287:-900.000000 +-326.207260:-35.945629:-900.000000 +-303.202260:-38.445629:-900.000000 PORT StdDevX:"1" PORT @@ -656,30 +654,30 @@ FIN_BOX BOX vtk:MarchingCubes:Box130 ISEXEC:FALSE --303.547461:-44.539928:-900.000000 --281.262461:-47.039928:-900.000000 +-325.176256:-40.789270:-900.000000 +-302.891256:-43.289270:-900.000000 PORT Value:"128" FIN_BOX BOX creaVtk:MeshReduction_DecimatePro:Box131 ISEXEC:FALSE --301.869874:-50.142101:-900.000000 --278.264874:-52.642101:-900.000000 +-323.498669:-46.391443:-900.000000 +-299.893669:-48.891443:-900.000000 PORT TargetReduction:"0.8" FIN_BOX BOX creaVtk:PolyDataNormals:Box132 ISEXEC:FALSE --300.853811:-54.739656:-900.000000 --278.448811:-57.239656:-900.000000 +-322.482606:-50.988998:-900.000000 +-300.077606:-53.488998:-900.000000 FIN_BOX BOX creaVtk:ImageThreshold:Box133 ISEXEC:FALSE --304.566132:-33.812250:-900.000000 --282.276132:-36.312250:-900.000000 +-326.194927:-30.061592:-900.000000 +-303.904927:-32.561592:-900.000000 PORT InValue:"255" PORT @@ -698,8 +696,8 @@ FIN_BOX BOX vtk:GetVectorVtkImageDataElement:Box135 ISEXEC:FALSE --292.846318:-20.153986:-900.000000 --268.901318:-22.653986:-900.000000 +-292.376664:-19.402539:-900.000000 +-268.431664:-21.902539:-900.000000 PORT I:"0" FIN_BOX @@ -753,7 +751,63 @@ ISEXEC:FALSE -330.398849:13.354404:-900.000000 -307.638849:10.854404:-900.000000 FIN_BOX -CONNECTIONS:142 +BOX +wx:ComboBox:Box143 +ISEXEC:FALSE +-201.409470:-2.395724:-900.000000 +-175.129470:-4.895724:-900.000000 +PORT +In:"Union Difference Replace" +FIN_BOX +BOX +std:StringSelect:Box144 +ISEXEC:FALSE +-206.331721:-9.288805:-900.000000 +-181.811721:-11.788805:-900.000000 +PORT +In0:"0" +PORT +In1:"1" +PORT +In2:"7" +FIN_BOX +BOX +wx:LayoutLine:Box145 +ISEXEC:FALSE +-106.107525:-23.103212:-900.000000 +-72.787525:-25.603212:-900.000000 +PORT +Orientation:"H" +FIN_BOX +BOX +vtk:RescaleSlopeIntercept:Box146 +ISEXEC:FALSE +-247.735491:-25.597076:-900.000000 +-224.800491:-28.097076:-900.000000 +PORT +A:"1" +PORT +B:"0" +PORT +OutputFormat:"VTK_SHORT" +PORT +Type:"0" +FIN_BOX +BOX +vtk:RescaleSlopeIntercept:Box147 +ISEXEC:FALSE +-269.992792:-24.763271:-900.000000 +-247.057792:-27.263271:-900.000000 +PORT +A:"1" +PORT +B:"0" +PORT +OutputFormat:"VTK_SHORT" +PORT +Type:"0" +FIN_BOX +CONNECTIONS:148 CONNECTION Box08:Widget:widget:widget NumberOfControlPoints:0 @@ -776,9 +830,6 @@ CONNECTION Box79:Widget:Box40:Widget2 NumberOfControlPoints:0 CONNECTION -Box80:Widget:Box44:Widget5 -NumberOfControlPoints:0 -CONNECTION meshmanagermodel:meshmanagermodel:Box46:In NumberOfControlPoints:0 CONNECTION @@ -902,15 +953,9 @@ CONNECTION Box97:Out:Box60:In NumberOfControlPoints:0 CONNECTION -Box60:Out:Box56:In2 -NumberOfControlPoints:0 -CONNECTION Box56:Out:Box61:In NumberOfControlPoints:0 CONNECTION -Box61:Out:Box99:In -NumberOfControlPoints:0 -CONNECTION Box85:Out:Box83:ImageMove NumberOfControlPoints:0 CONNECTION @@ -1112,9 +1157,6 @@ CONNECTION Box98:Out:Box135:ErrorValue NumberOfControlPoints:0 CONNECTION -Box135:Out:Box56:In1 -NumberOfControlPoints:0 -CONNECTION Box135:Out:Box87:In NumberOfControlPoints:0 CONNECTION @@ -1160,9 +1202,6 @@ CONNECTION Box139:Widget:Box141:Widget4 NumberOfControlPoints:0 CONNECTION -Box95:Out:Box101:In1 -NumberOfControlPoints:0 -CONNECTION Box108:BoxChange:Box117:In7 NumberOfControlPoints:0 CONNECTION @@ -1180,4 +1219,37 @@ NumberOfControlPoints:0 CONNECTION Box86:BoxChange:Box115:BoxExecute NumberOfControlPoints:0 +CONNECTION +Box102:Out:Box101:In1 +NumberOfControlPoints:0 +CONNECTION +Box61:Out:Box99:In +NumberOfControlPoints:0 +CONNECTION +Box143:Out:Box144:In +NumberOfControlPoints:0 +CONNECTION +Box144:Out:Box56:Operation +NumberOfControlPoints:0 +CONNECTION +Box143:Widget:Box145:Widget2 +NumberOfControlPoints:0 +CONNECTION +Box80:Widget:Box145:Widget4 +NumberOfControlPoints:0 +CONNECTION +Box145:Widget:Box44:Widget6 +NumberOfControlPoints:0 +CONNECTION +Box97:Out:Box146:In +NumberOfControlPoints:0 +CONNECTION +Box146:Out:Box56:In1 +NumberOfControlPoints:0 +CONNECTION +Box135:Out:Box147:In +NumberOfControlPoints:0 +CONNECTION +Box147:Out:Box56:In2 +NumberOfControlPoints:0 APP_END diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplyExternalMask.bbs b/bbtk/bbs/boxes/Mesh_tool_ApplyExternalMask.bbs index 13879d9..edcc34a 100644 --- a/bbtk/bbs/boxes/Mesh_tool_ApplyExternalMask.bbs +++ b/bbtk/bbs/boxes/Mesh_tool_ApplyExternalMask.bbs @@ -121,7 +121,6 @@ new wx:LayoutLine Box50 new vtk:MetaImageReader Box53 new vtk:BinaryOperations Box56 - set Box56.BoxProcessMode "Manual" new vtk:ImageCastToUShort Box60 @@ -169,7 +168,7 @@ new std:ConcatStrings Box95 new std:StringSelect Box101 new std:ConcatStrings Box102 - set Box102.In1 "start /b " + set Box102.In1 "start " new std:Configuration Box103 @@ -273,12 +272,34 @@ new wx:LayoutTab Box141 new std:ConcatStrings Box142 +new wx:ComboBox Box143 + set Box143.In "Union Difference Replace" + +new std:StringSelect Box144 + set Box144.In0 "0" + set Box144.In1 "1" + set Box144.In2 "7" + +new wx:LayoutLine Box145 + set Box145.Orientation "H" + +new vtk:RescaleSlopeIntercept Box146 + set Box146.A "1" + set Box146.B "0" + set Box146.OutputFormat "VTK_SHORT" + set Box146.Type "0" + +new vtk:RescaleSlopeIntercept Box147 + set Box147.A "1" + set Box147.B "0" + set Box147.OutputFormat "VTK_SHORT" + set Box147.Type "0" + connect Box66.Out Box11.Renderer connect Box35.Out Box68.In connect Box66.Out Box37.render connect Box79.Widget Box40.Widget2 -connect Box80.Widget Box44.Widget5 connect Box46.Out Box45.MeshManagerModel connect Box42.BoxChange Box51.BoxExecute connect Box45.BoxChange Box51.In2 @@ -314,9 +335,7 @@ connect Box43.Widget Box44.Widget2 connect Box49.Widget Box81.Widget1 connect Box40.Widget Box81.Widget4 connect Box97.Out Box60.In -connect Box60.Out Box56.In2 connect Box56.Out Box61.In -connect Box61.Out Box99.In connect Box85.Out Box83.ImageMove connect Box42.BoxChange Box83.BoxExecute connect Box87.TypeName Box85.OutputFormat @@ -381,7 +400,6 @@ connect Box132.Out Box126.In connect Box53.Out Box134.In0 connect Box134.Out Box135.In connect Box98.Out Box135.ErrorValue -connect Box135.Out Box56.In1 connect Box135.Out Box87.In connect Box135.Out Box83.ImageFix connect Box135.Out Box123.In @@ -397,13 +415,23 @@ connect Box37.widgetB Box139.Widget4 connect Box137.Widget Box141.Widget2 connect Box141.Widget Box79.Widget7 connect Box139.Widget Box141.Widget4 -connect Box95.Out Box101.In1 connect Box108.BoxChange Box117.In7 connect Box94.BoxChange Box117.In8 connect Box142.BoxChange Box53.BoxExecute connect Box142.BoxChange Box56.BoxExecute connect Box94.BoxChange Box142.BoxExecute connect Box86.BoxChange Box115.BoxExecute +connect Box102.Out Box101.In1 +connect Box61.Out Box99.In +connect Box143.Out Box144.In +connect Box144.Out Box56.Operation +connect Box143.Widget Box145.Widget2 +connect Box80.Widget Box145.Widget4 +connect Box145.Widget Box44.Widget6 +connect Box97.Out Box146.In +connect Box146.Out Box56.In1 +connect Box135.Out Box147.In +connect Box147.Out Box56.In2 # Complex input ports input mesh Box67.In " " -- 2.47.1