1 # ----------------------------------
2 # - BBTKGEditor v 1.5 BBS BlackBox Script (Complex Box)
3 # - /Users/davila/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplyExternalMask.bbs
4 # ----------------------------------
11 include creaMaracasVisu
15 define Mesh_tool_ApplyExternalMask creaMaracasVisu
17 author "info-dev@creatis.insa-lyon.fr"
18 description "Show N Points"
22 new wx:LayoutLine Box08
24 new vtk:UpdateRender Box11
25 set Box11.Active "true"
27 new vtk:ImageVtkProperties Box68
29 new wx:LayoutLine Box79
30 set Box79.Orientation "H"
31 set Box79.WinTitle "New Surface ( Magenta )"
33 new wx:CommandButton Box80
36 new std:MagicBox Box66
38 new std:MagicBox Box67
40 new vtk:vtkImageDataPointerRelay Box35
42 new creaMaracasVisu:PolyDataToActor_Widget Box37
43 set Box37.color "0 1 1"
44 set Box37.meshOpacity "100"
46 new wx:LayoutTab Box40
48 new wx:CommandButton Box42
49 set Box42.Label "Apply (Magenta->To Red)"
51 new wx:CommandButton Box43
52 set Box43.Label "Reset Tool"
54 new wx:LayoutLine Box44
55 set Box44.Orientation "V"
56 set Box44.WinTitle "1.2 Mesh Action"
58 new creaVtk:MeshManager_tool Box45
61 new std:MagicBox Box46
63 new std:MultipleInputs Box51
65 new std:MagicBox Box63
67 new std:MagicBox Box64
69 new std:MagicBox Box65
71 new std:MagicBox Box69
73 new std:MagicBox Box71
75 new creaMaracasVisu:MeshContours_Widget Box72
76 set Box72.colorMesh "0 1 1"
78 new wx:LayoutLine Box81
79 set Box81.WinTitle "Step 1. Surface"
81 new wx:LayoutTab Box82
83 new wx:OutputText Box84
85 new creaVtk:MeshManager Box92
87 new creaVtk:MeshManager_tool Box93
88 set Box93.BoxProcessMode "Manual"
91 new creaMaracasVisu:wxVtkBaseView_Info Box96
93 new creaVtk:PolyDataToImageData Box97
95 new vtk:CreateImage Box98
96 set Box98.OutputFormat "VTK_UNSIGNED_SHORT"
98 new vtk:ImageGaussianSmooth Box99
100 set Box99.StdDevY "1"
101 set Box99.StdDevZ "1"
103 new vtk:MarchingCubes Box100
104 set Box100.Value "128"
106 new creaVtk:MeshReduction_DecimatePro Box41
107 set Box41.TargetReduction "0.8"
109 new creaVtk:MeshManager_tool Box47
112 new creaVtk:MeshManager_tool Box48
115 new creaVtk:PolyDataNormals Box39
117 new wx:LayoutTab Box49
119 new wx:LayoutLine Box50
121 new vtk:MetaImageReader Box53
123 new vtk:BinaryOperations Box56
125 new vtk:ImageCastToUShort Box60
127 new creaVtk:ImageThreshold Box61
128 set Box61.InValue "255"
129 set Box61.Lower "128"
130 set Box61.OutValue "0"
131 set Box61.Upper "100000"
133 new vtk:InversCrop Box83
134 set Box83.BoxProcessMode "manual"
135 set Box83.Origin "0 0 0"
138 new vtk:CreateImage Box85
140 new vtk:ImageVtkProperties Box87
142 new wx:LayoutLine Box88
143 set Box88.Orientation "H"
144 set Box88.WinTitle "External Mask (Yellow)"
146 new wx:OutputText Box89
148 new wx:OutputText Box90
150 new wx:OutputText Box91
152 new wx:LayoutLine Box77
153 set Box77.Orientation "V"
154 set Box77.WinTitle "1.3 Apply Changes"
156 new std:ConcatStrings Box78
158 new wx:CommandButton Box86
159 set Box86.Label "1.1 Run Contour Application"
161 new std:ExecSystemCommand Box94
163 new std:ConcatStrings Box95
164 set Box95.In1 "bbi ia-01/ia-000302-contour.bbs "
165 set Box95.In2 "BaseImageFileName="
166 set Box95.In4 " OutDir="
168 new std:StringSelect Box101
170 new std:Configuration Box103
172 new std:ConcatStrings Box104
174 new std:ConcatStrings Box105
176 new std:ConcatStrings Box106
177 set Box106.In2 "contour-tmp-Imge.mhd"
179 new creaVtk:PolyDataToImageData Box107
181 new vtk:MetaImageWriter Box108
182 set Box108.Compression "true"
184 new vtk:CreateImage Box109
186 new vtk:ImageVtkProperties Box110
188 new creaVtk:MeshManager Box113
190 new creaVtk:MeshManager_tool Box114
193 new std:ConcatStrings Box115
195 new std:ConcatStrings_tool Box116
198 new std:MultipleInputs Box117
200 new std:ConcatStrings Box120
202 new std:ConcatStrings_tool Box121
205 new std:ConcatStrings Box122
206 set Box122.In2 "/contour-tmp2-Imge.mhd"
208 new creaMaracasVisu:ColorLayerImageView2 Box123
209 set Box123.ColorBarPosition "-100 -100"
210 set Box123.lstBaseColor "0 0 0 1 1 0"
211 set Box123.lstGreyLevelBoundaries "0 128 256"
212 set Box123.lstTransparenceBoundaries "0"
218 set Box124.ReactiveOnTrack "true"
223 new vtk:PolyDataToActor Box126
225 new std:MultipleInputs Box127
227 new vtk:UpdateRender Box128
228 set Box128.Active "true"
230 new vtk:ImageGaussianSmooth Box129
231 set Box129.StdDevX "1"
232 set Box129.StdDevY "1"
233 set Box129.StdDevZ "1"
235 new vtk:MarchingCubes Box130
236 set Box130.Value "128"
238 new creaVtk:MeshReduction_DecimatePro Box131
239 set Box131.TargetReduction "0.8"
241 new creaVtk:PolyDataNormals Box132
243 new creaVtk:ImageThreshold Box133
244 set Box133.InValue "255"
245 set Box133.Lower "128"
246 set Box133.OutValue "0"
247 set Box133.Upper "100000"
249 new PackRecalage:AddImageToVector Box134
251 new vtk:GetVectorVtkImageDataElement Box135
254 new wx:LayoutTab Box136
256 new wx:LayoutLine Box137
257 set Box137.Orientation "V"
258 set Box137.WinTitle "Visu"
260 new wx:OutputText Box138
262 new wx:LayoutLine Box139
263 set Box139.Orientation "V"
264 set Box139.WinTitle "conf"
266 new wx:OutputText Box140
268 new wx:LayoutTab Box141
270 new std:ConcatStrings Box142
272 new wx:ComboBox Box143
273 set Box143.In "Union Difference Replace"
275 new std:StringSelect Box144
280 new wx:LayoutLine Box145
281 set Box145.Orientation "H"
283 new vtk:RescaleSlopeIntercept Box146
286 set Box146.OutputFormat "VTK_SHORT"
289 new vtk:RescaleSlopeIntercept Box147
292 set Box147.OutputFormat "VTK_SHORT"
296 connect Box66.Out Box11.Renderer
297 connect Box35.Out Box68.In
298 connect Box66.Out Box37.render
299 connect Box79.Widget Box40.Widget2
300 connect Box46.Out Box45.MeshManagerModel
301 connect Box42.BoxChange Box51.BoxExecute
302 connect Box45.BoxChange Box51.In2
303 connect Box71.Out Box72._wxvtkbaseview3D1
304 connect Box64.Out Box72._wxvtkbaseview2D1
305 connect Box65.Out Box72._wxvtkbaseview2D2
306 connect Box69.Out Box72._wxvtkbaseview2D3
307 connect Box44.Widget Box82.Widget2
308 connect Box82.Widget Box79.Widget2
309 connect Box84.Widget Box44.Widget9
310 connect Box92.MeshManagerModel Box93.MeshManagerModel
311 connect Box92.MeshBase Box72._polydata
312 connect Box92.MeshBase Box37.polydata
313 connect Box81.Widget Box08.Widget2
314 connect Box71.Out Box96.wxVtkBaseView
315 connect Box96.vtkRenderer Box66.In
316 connect Box98.Out Box97.InImage
317 connect Box68.Spacing Box98.Spacing
318 connect Box68.Size Box98.Dimensions
319 connect Box67.Out Box97.InPolyData
320 connect Box99.Out Box100.In
321 connect Box100.Out Box41.In
322 connect Box92.MeshManagerModel Box47.MeshManagerModel
323 connect Box43.BoxChange Box48.BoxExecute
324 connect Box92.MeshManagerModel Box48.MeshManagerModel
325 connect Box63.BoxChange Box72._execute
326 connect Box92.MeshBase Box45.Mesh
327 connect Box47.BoxChange Box51.In5
328 connect Box37.boxchange Box11.BoxExecute
329 connect Box41.Out Box39.In
330 connect Box39.Out Box93.Mesh
331 connect Box43.Widget Box44.Widget2
332 connect Box49.Widget Box81.Widget1
333 connect Box40.Widget Box81.Widget4
334 connect Box97.Out Box60.In
335 connect Box56.Out Box61.In
336 connect Box85.Out Box83.ImageMove
337 connect Box42.BoxChange Box83.BoxExecute
338 connect Box87.TypeName Box85.OutputFormat
339 connect Box87.Spacing Box85.Spacing
340 connect Box87.Size Box85.Dimensions
341 connect Box50.Widget Box88.Widget1
342 connect Box89.Widget Box88.Widget2
343 connect Box90.Widget Box88.Widget3
344 connect Box88.Widget Box49.Widget2
345 connect Box91.Widget Box50.Widget2
346 connect Box42.Widget Box77.Widget2
347 connect Box78.Out Box08.WinTitle
348 connect Box86.Widget Box50.Widget4
349 connect Box95.Out Box101.In0
350 connect Box95.Out Box101.In2
351 connect Box103.SystemType Box101.In
352 connect Box104.Out Box95.In3
353 connect Box105.Out Box95.In5
354 connect Box105.Out Box106.In1
355 connect Box107.Out Box108.In
356 connect Box109.Out Box107.InImage
357 connect Box110.TypeName Box109.OutputFormat
358 connect Box110.Spacing Box109.Spacing
359 connect Box110.Size Box109.Dimensions
360 connect Box113.MeshManagerModel Box114.MeshManagerModel
361 connect Box67.Out Box114.Mesh
362 connect Box35.Out Box110.In
363 connect Box113.MeshBase Box107.InPolyData
364 connect Box115.Out Box94.In
365 connect Box101.Out Box116.In1
366 connect Box115.Box_ConcatStrings Box116.Box_ConcatString
367 connect Box86.BoxChange Box117.BoxExecute
368 connect Box114.BoxChange Box117.In1
369 connect Box106.Out Box121.In1
370 connect Box120.Box_ConcatStrings Box121.Box_ConcatString
371 connect Box120.Out Box108.Filename
372 connect Box116.BoxChange Box117.In5
373 connect Box121.BoxChange Box117.In2
374 connect Box105.Out Box122.In1
375 connect Box122.Out Box53.In
376 connect Box64.Out Box123.WxVtkBaseView
377 connect Box65.Out Box123.WxVtkBaseView1
378 connect Box69.Out Box123.WxVtkBaseView2
379 connect Box124.Widget Box50.Widget8
380 connect Box125.Out Box126.Opacity
381 connect Box66.Out Box126.Renderer
382 connect Box124.BoxChange Box126.BoxExecute
383 connect Box124.Out Box123.Opacity
384 connect Box124.Out Box125.In1
385 connect Box53.BoxChange Box127.In1
386 connect Box124.BoxChange Box127.In2
387 connect Box127.BoxChange Box123.BoxExecute
388 connect Box126.BoxChange Box128.BoxExecute
389 connect Box66.Out Box128.Renderer
390 connect Box80.BoxChange Box93.BoxExecute
391 connect Box129.Out Box130.In
392 connect Box130.Out Box131.In
393 connect Box131.Out Box132.In
394 connect Box133.Out Box129.In
395 connect Box132.Out Box126.In
396 connect Box53.Out Box134.In0
397 connect Box134.Out Box135.In
398 connect Box98.Out Box135.ErrorValue
399 connect Box135.Out Box87.In
400 connect Box135.Out Box83.ImageFix
401 connect Box135.Out Box123.In
402 connect Box135.Out Box133.In
403 connect Box77.Widget Box136.Widget2
404 connect Box136.Widget Box79.Widget4
405 connect Box138.Widget Box137.Widget9
406 connect Box140.Widget Box139.Widget9
407 connect Box72._widgetA Box137.Widget2
408 connect Box37.widgetA Box137.Widget4
409 connect Box72._widgetB Box139.Widget2
410 connect Box37.widgetB Box139.Widget4
411 connect Box137.Widget Box141.Widget2
412 connect Box141.Widget Box79.Widget7
413 connect Box139.Widget Box141.Widget4
414 connect Box108.BoxChange Box117.In7
415 connect Box94.BoxChange Box117.In8
416 connect Box142.BoxChange Box53.BoxExecute
417 connect Box142.BoxChange Box56.BoxExecute
418 connect Box94.BoxChange Box142.BoxExecute
419 connect Box86.BoxChange Box115.BoxExecute
420 connect Box61.Out Box99.In
421 connect Box143.Out Box144.In
422 connect Box144.Out Box56.Operation
423 connect Box143.Widget Box145.Widget2
424 connect Box80.Widget Box145.Widget4
425 connect Box145.Widget Box44.Widget6
426 connect Box97.Out Box146.In
427 connect Box146.Out Box56.In1
428 connect Box135.Out Box147.In
429 connect Box147.Out Box56.In2
430 connect Box95.Out Box101.In1
432 # Complex input ports
433 input mesh Box67.In " "
434 input image Box35.In " "
435 input meshmanagermodel Box46.In " "
436 input boxChange Box63.In " "
437 input wxvtkbaseview2 Box64.In " "
438 input wxvtkbaseview3 Box65.In " "
439 input wxvtkbaseview4 Box69.In " "
440 input wxvtkbaseview1 Box71.In " "
441 input title Box78.In1 " "
442 input BaseImageFileName Box104.In1 " "
443 input OutDir Box105.In1 " "
445 # Complex output ports
446 output widget Box08.Widget " "