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.active_widget "true"
77 set Box72.colorMesh "0 1 1"
79 new wx:LayoutLine Box81
80 set Box81.WinTitle "Step 1. Surface"
82 new wx:LayoutTab Box82
84 new wx:OutputText Box84
86 new creaVtk:MeshManager Box92
88 new creaVtk:MeshManager_tool Box93
89 set Box93.BoxProcessMode "Manual"
92 new creaMaracasVisu:wxVtkBaseView_Info Box96
94 new creaVtk:PolyDataToImageData Box97
96 new vtk:CreateImage Box98
97 set Box98.OutputFormat "VTK_UNSIGNED_SHORT"
99 new vtk:ImageGaussianSmooth Box99
100 set Box99.StdDevX "1"
101 set Box99.StdDevY "1"
102 set Box99.StdDevZ "1"
104 new vtk:MarchingCubes Box100
105 set Box100.Value "128"
107 new creaVtk:MeshReduction_DecimatePro Box41
108 set Box41.TargetReduction "0.8"
110 new creaVtk:MeshManager_tool Box47
113 new creaVtk:MeshManager_tool Box48
116 new creaVtk:PolyDataNormals Box39
118 new wx:LayoutTab Box49
120 new wx:LayoutLine Box50
122 new vtk:MetaImageReader Box53
124 new vtk:BinaryOperations Box56
126 new vtk:ImageCastToUShort Box60
128 new creaVtk:ImageThreshold Box61
129 set Box61.InValue "255"
130 set Box61.Lower "128"
131 set Box61.OutValue "0"
132 set Box61.Upper "100000"
134 new vtk:InversCrop Box83
135 set Box83.BoxProcessMode "manual"
136 set Box83.Origin "0 0 0"
139 new vtk:CreateImage Box85
141 new vtk:ImageVtkProperties Box87
143 new wx:LayoutLine Box88
144 set Box88.Orientation "H"
145 set Box88.WinTitle "External Mask (Yellow)"
147 new wx:OutputText Box89
149 new wx:OutputText Box90
151 new wx:OutputText Box91
153 new wx:LayoutLine Box77
154 set Box77.Orientation "V"
155 set Box77.WinTitle "1.3 Apply Changes"
157 new std:ConcatStrings Box78
159 new wx:CommandButton Box86
160 set Box86.Label "1.1 Run Contour Application"
162 new std:ExecSystemCommand Box94
164 new std:ConcatStrings Box95
165 set Box95.In1 "bbi ia-01/ia-000302-contour.bbs "
166 set Box95.In2 "BaseImageFileName="
167 set Box95.In4 " OutDir="
169 new std:StringSelect Box101
171 new std:Configuration Box103
173 new std:ConcatStrings Box104
175 new std:ConcatStrings Box105
177 new std:ConcatStrings Box106
178 set Box106.In2 "contour-tmp-Imge.mhd"
180 new creaVtk:PolyDataToImageData Box107
182 new vtk:MetaImageWriter Box108
183 set Box108.Compression "true"
185 new vtk:CreateImage Box109
187 new vtk:ImageVtkProperties Box110
189 new creaVtk:MeshManager Box113
191 new creaVtk:MeshManager_tool Box114
194 new std:ConcatStrings Box115
196 new std:ConcatStrings_tool Box116
199 new std:MultipleInputs Box117
201 new std:ConcatStrings Box120
203 new std:ConcatStrings_tool Box121
206 new std:ConcatStrings Box122
207 set Box122.In2 "/contour-tmp2-Imge.mhd"
209 new creaMaracasVisu:ColorLayerImageView2 Box123
210 set Box123.ColorBarPosition "-100 -100"
211 set Box123.lstBaseColor "0 0 0 1 1 0"
212 set Box123.lstGreyLevelBoundaries "0 128 256"
213 set Box123.lstTransparenceBoundaries "0"
219 set Box124.ReactiveOnTrack "true"
224 new vtk:PolyDataToActor Box126
226 new std:MultipleInputs Box127
228 new vtk:UpdateRender Box128
229 set Box128.Active "true"
231 new vtk:ImageGaussianSmooth Box129
232 set Box129.StdDevX "1"
233 set Box129.StdDevY "1"
234 set Box129.StdDevZ "1"
236 new vtk:MarchingCubes Box130
237 set Box130.Value "128"
239 new creaVtk:MeshReduction_DecimatePro Box131
240 set Box131.TargetReduction "0.8"
242 new creaVtk:PolyDataNormals Box132
244 new creaVtk:ImageThreshold Box133
245 set Box133.InValue "255"
246 set Box133.Lower "128"
247 set Box133.OutValue "0"
248 set Box133.Upper "100000"
250 new PackRecalage:AddImageToVector Box134
252 new vtk:GetVectorVtkImageDataElement Box135
255 new wx:LayoutTab Box136
257 new wx:LayoutLine Box137
258 set Box137.Orientation "V"
259 set Box137.WinTitle "Visu"
261 new wx:OutputText Box138
263 new wx:LayoutLine Box139
264 set Box139.Orientation "V"
265 set Box139.WinTitle "conf"
267 new wx:OutputText Box140
269 new wx:LayoutTab Box141
271 new std:ConcatStrings Box142
273 new wx:ComboBox Box143
274 set Box143.In "Union Difference Replace"
276 new std:StringSelect Box144
281 new wx:LayoutLine Box145
282 set Box145.Orientation "H"
284 new vtk:RescaleSlopeIntercept Box146
287 set Box146.OutputFormat "VTK_SHORT"
290 new vtk:RescaleSlopeIntercept Box147
293 set Box147.OutputFormat "VTK_SHORT"
296 new std:MultipleInputs Box148
299 connect Box66.Out Box11.Renderer
300 connect Box35.Out Box68.In
301 connect Box66.Out Box37.render
302 connect Box79.Widget Box40.Widget2
303 connect Box46.Out Box45.MeshManagerModel
304 connect Box42.BoxChange Box51.BoxExecute
305 connect Box45.BoxChange Box51.In2
306 connect Box71.Out Box72._wxvtkbaseview3D1
307 connect Box64.Out Box72._wxvtkbaseview2D1
308 connect Box65.Out Box72._wxvtkbaseview2D2
309 connect Box69.Out Box72._wxvtkbaseview2D3
310 connect Box44.Widget Box82.Widget2
311 connect Box82.Widget Box79.Widget2
312 connect Box84.Widget Box44.Widget9
313 connect Box92.MeshManagerModel Box93.MeshManagerModel
314 connect Box92.MeshBase Box72._polydata
315 connect Box92.MeshBase Box37.polydata
316 connect Box81.Widget Box08.Widget2
317 connect Box71.Out Box96.wxVtkBaseView
318 connect Box96.vtkRenderer Box66.In
319 connect Box98.Out Box97.InImage
320 connect Box68.Spacing Box98.Spacing
321 connect Box68.Size Box98.Dimensions
322 connect Box67.Out Box97.InPolyData
323 connect Box99.Out Box100.In
324 connect Box100.Out Box41.In
325 connect Box92.MeshManagerModel Box47.MeshManagerModel
326 connect Box43.BoxChange Box48.BoxExecute
327 connect Box92.MeshManagerModel Box48.MeshManagerModel
328 connect Box92.MeshBase Box45.Mesh
329 connect Box47.BoxChange Box51.In5
330 connect Box37.boxchange Box11.BoxExecute
331 connect Box41.Out Box39.In
332 connect Box39.Out Box93.Mesh
333 connect Box43.Widget Box44.Widget2
334 connect Box49.Widget Box81.Widget1
335 connect Box40.Widget Box81.Widget4
336 connect Box97.Out Box60.In
337 connect Box56.Out Box61.In
338 connect Box85.Out Box83.ImageMove
339 connect Box42.BoxChange Box83.BoxExecute
340 connect Box87.TypeName Box85.OutputFormat
341 connect Box87.Spacing Box85.Spacing
342 connect Box87.Size Box85.Dimensions
343 connect Box50.Widget Box88.Widget1
344 connect Box89.Widget Box88.Widget2
345 connect Box90.Widget Box88.Widget3
346 connect Box88.Widget Box49.Widget2
347 connect Box91.Widget Box50.Widget2
348 connect Box42.Widget Box77.Widget2
349 connect Box78.Out Box08.WinTitle
350 connect Box86.Widget Box50.Widget4
351 connect Box95.Out Box101.In0
352 connect Box95.Out Box101.In2
353 connect Box103.SystemType Box101.In
354 connect Box104.Out Box95.In3
355 connect Box105.Out Box95.In5
356 connect Box105.Out Box106.In1
357 connect Box107.Out Box108.In
358 connect Box109.Out Box107.InImage
359 connect Box110.TypeName Box109.OutputFormat
360 connect Box110.Spacing Box109.Spacing
361 connect Box110.Size Box109.Dimensions
362 connect Box113.MeshManagerModel Box114.MeshManagerModel
363 connect Box67.Out Box114.Mesh
364 connect Box35.Out Box110.In
365 connect Box113.MeshBase Box107.InPolyData
366 connect Box115.Out Box94.In
367 connect Box101.Out Box116.In1
368 connect Box115.Box_ConcatStrings Box116.Box_ConcatString
369 connect Box86.BoxChange Box117.BoxExecute
370 connect Box114.BoxChange Box117.In1
371 connect Box106.Out Box121.In1
372 connect Box120.Box_ConcatStrings Box121.Box_ConcatString
373 connect Box120.Out Box108.Filename
374 connect Box116.BoxChange Box117.In5
375 connect Box121.BoxChange Box117.In2
376 connect Box105.Out Box122.In1
377 connect Box122.Out Box53.In
378 connect Box64.Out Box123.WxVtkBaseView
379 connect Box65.Out Box123.WxVtkBaseView1
380 connect Box69.Out Box123.WxVtkBaseView2
381 connect Box124.Widget Box50.Widget8
382 connect Box125.Out Box126.Opacity
383 connect Box66.Out Box126.Renderer
384 connect Box124.BoxChange Box126.BoxExecute
385 connect Box124.Out Box123.Opacity
386 connect Box124.Out Box125.In1
387 connect Box53.BoxChange Box127.In1
388 connect Box124.BoxChange Box127.In2
389 connect Box127.BoxChange Box123.BoxExecute
390 connect Box126.BoxChange Box128.BoxExecute
391 connect Box66.Out Box128.Renderer
392 connect Box80.BoxChange Box93.BoxExecute
393 connect Box129.Out Box130.In
394 connect Box130.Out Box131.In
395 connect Box131.Out Box132.In
396 connect Box133.Out Box129.In
397 connect Box132.Out Box126.In
398 connect Box53.Out Box134.In0
399 connect Box134.Out Box135.In
400 connect Box98.Out Box135.ErrorValue
401 connect Box135.Out Box87.In
402 connect Box135.Out Box83.ImageFix
403 connect Box135.Out Box123.In
404 connect Box135.Out Box133.In
405 connect Box77.Widget Box136.Widget2
406 connect Box136.Widget Box79.Widget4
407 connect Box138.Widget Box137.Widget9
408 connect Box140.Widget Box139.Widget9
409 connect Box72._widgetA Box137.Widget2
410 connect Box37.widgetA Box137.Widget4
411 connect Box72._widgetB Box139.Widget2
412 connect Box37.widgetB Box139.Widget4
413 connect Box137.Widget Box141.Widget2
414 connect Box141.Widget Box79.Widget7
415 connect Box139.Widget Box141.Widget4
416 connect Box108.BoxChange Box117.In7
417 connect Box94.BoxChange Box117.In8
418 connect Box142.BoxChange Box53.BoxExecute
419 connect Box142.BoxChange Box56.BoxExecute
420 connect Box94.BoxChange Box142.BoxExecute
421 connect Box86.BoxChange Box115.BoxExecute
422 connect Box61.Out Box99.In
423 connect Box143.Out Box144.In
424 connect Box144.Out Box56.Operation
425 connect Box143.Widget Box145.Widget2
426 connect Box80.Widget Box145.Widget4
427 connect Box145.Widget Box44.Widget6
428 connect Box97.Out Box146.In
429 connect Box146.Out Box56.In1
430 connect Box135.Out Box147.In
431 connect Box147.Out Box56.In2
432 connect Box95.Out Box101.In1
433 connect Box63.BoxChange Box148.In2
434 connect Box80.BoxChange Box148.In1
435 connect Box148.BoxChange Box72._execute
437 # Complex input ports
438 input mesh Box67.In " "
439 input image Box35.In " "
440 input meshmanagermodel Box46.In " "
441 input boxChange Box63.In " "
442 input wxvtkbaseview2 Box64.In " "
443 input wxvtkbaseview3 Box65.In " "
444 input wxvtkbaseview4 Box69.In " "
445 input wxvtkbaseview1 Box71.In " "
446 input title Box78.In1 " "
447 input BaseImageFileName Box104.In1 " "
448 input OutDir Box105.In1 " "
450 # Complex output ports
451 output widget Box08.Widget " "