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 "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_CHAR"
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
124 set Box56.BoxProcessMode "Manual"
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"
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 "Apply Changes"
157 new std:ConcatStrings Box78
159 new wx:CommandButton Box86
160 set Box86.Label "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:ConcatStrings Box102
172 set Box102.In1 "start /b "
174 new std:Configuration Box103
176 new std:ConcatStrings Box104
178 new std:ConcatStrings Box105
180 new std:ConcatStrings Box106
181 set Box106.In2 "contour-tmp-Imge.mhd"
183 new creaVtk:PolyDataToImageData Box107
185 new vtk:MetaImageWriter Box108
186 set Box108.Compression "true"
188 new vtk:CreateImage Box109
190 new vtk:ImageVtkProperties Box110
192 new creaVtk:MeshManager Box113
194 new creaVtk:MeshManager_tool Box114
197 new std:ConcatStrings Box115
199 new std:ConcatStrings_tool Box116
202 new std:MultipleInputs Box117
204 new std:ConcatStrings Box120
206 new std:ConcatStrings_tool Box121
209 new std:ConcatStrings Box122
210 set Box122.In2 "/contour-tmp2-Imge.mhd"
212 new creaMaracasVisu:ColorLayerImageView2 Box123
213 set Box123.ColorBarPosition "-100 -100"
214 set Box123.lstBaseColor "0 0 0 1 1 0"
215 set Box123.lstGreyLevelBoundaries "0 128 256"
216 set Box123.lstTransparenceBoundaries "0"
222 set Box124.ReactiveOnTrack "true"
227 new vtk:PolyDataToActor Box126
229 new std:MultipleInputs Box127
231 new vtk:UpdateRender Box128
232 set Box128.Active "true"
234 new vtk:ImageGaussianSmooth Box129
235 set Box129.StdDevX "1"
236 set Box129.StdDevY "1"
237 set Box129.StdDevZ "1"
239 new vtk:MarchingCubes Box130
240 set Box130.Value "128"
242 new creaVtk:MeshReduction_DecimatePro Box131
243 set Box131.TargetReduction "0.8"
245 new creaVtk:PolyDataNormals Box132
247 new creaVtk:ImageThreshold Box133
248 set Box133.InValue "255"
249 set Box133.Lower "128"
250 set Box133.OutValue "0"
251 set Box133.Upper "100000"
253 new PackRecalage:AddImageToVector Box134
255 new vtk:GetVectorVtkImageDataElement Box135
259 connect Box66.Out Box11.Renderer
260 connect Box35.Out Box68.In
261 connect Box66.Out Box37.render
262 connect Box79.Widget Box40.Widget2
263 connect Box80.Widget Box44.Widget5
264 connect Box46.Out Box45.MeshManagerModel
265 connect Box42.BoxChange Box51.BoxExecute
266 connect Box45.BoxChange Box51.In2
267 connect Box71.Out Box72._wxvtkbaseview3D1
268 connect Box64.Out Box72._wxvtkbaseview2D1
269 connect Box65.Out Box72._wxvtkbaseview2D2
270 connect Box69.Out Box72._wxvtkbaseview2D3
271 connect Box72._widget Box79.Widget6
272 connect Box44.Widget Box82.Widget2
273 connect Box82.Widget Box79.Widget2
274 connect Box84.Widget Box44.Widget9
275 connect Box92.MeshManagerModel Box93.MeshManagerModel
276 connect Box92.MeshBase Box72._polydata
277 connect Box92.MeshBase Box37.polydata
278 connect Box81.Widget Box08.Widget2
279 connect Box71.Out Box96.wxVtkBaseView
280 connect Box96.vtkRenderer Box66.In
281 connect Box37.widget Box79.Widget7
282 connect Box98.Out Box97.InImage
283 connect Box68.Spacing Box98.Spacing
284 connect Box68.Size Box98.Dimensions
285 connect Box67.Out Box97.InPolyData
286 connect Box99.Out Box100.In
287 connect Box100.Out Box41.In
288 connect Box92.MeshManagerModel Box47.MeshManagerModel
289 connect Box43.BoxChange Box48.BoxExecute
290 connect Box92.MeshManagerModel Box48.MeshManagerModel
291 connect Box63.BoxChange Box72._execute
292 connect Box92.MeshBase Box45.Mesh
293 connect Box47.BoxChange Box51.In5
294 connect Box37.boxchange Box11.BoxExecute
295 connect Box41.Out Box39.In
296 connect Box39.Out Box93.Mesh
297 connect Box43.Widget Box44.Widget2
298 connect Box49.Widget Box81.Widget1
299 connect Box40.Widget Box81.Widget4
300 connect Box97.Out Box60.In
301 connect Box60.Out Box56.In2
302 connect Box56.Out Box61.In
303 connect Box61.Out Box99.In
304 connect Box85.Out Box83.ImageMove
305 connect Box42.BoxChange Box83.BoxExecute
306 connect Box87.TypeName Box85.OutputFormat
307 connect Box87.Spacing Box85.Spacing
308 connect Box87.Size Box85.Dimensions
309 connect Box50.Widget Box88.Widget1
310 connect Box89.Widget Box88.Widget2
311 connect Box90.Widget Box88.Widget3
312 connect Box88.Widget Box49.Widget2
313 connect Box91.Widget Box50.Widget2
314 connect Box77.Widget Box82.Widget4
315 connect Box42.Widget Box77.Widget2
316 connect Box78.Out Box08.WinTitle
317 connect Box86.Widget Box50.Widget4
318 connect Box95.Out Box101.In0
319 connect Box95.Out Box102.In2
320 connect Box102.Out Box101.In1
321 connect Box95.Out Box101.In2
322 connect Box103.SystemType Box101.In
323 connect Box104.Out Box95.In3
324 connect Box105.Out Box95.In5
325 connect Box105.Out Box106.In1
326 connect Box107.Out Box108.In
327 connect Box109.Out Box107.InImage
328 connect Box110.TypeName Box109.OutputFormat
329 connect Box110.Spacing Box109.Spacing
330 connect Box110.Size Box109.Dimensions
331 connect Box113.MeshManagerModel Box114.MeshManagerModel
332 connect Box67.Out Box114.Mesh
333 connect Box35.Out Box110.In
334 connect Box113.MeshBase Box107.InPolyData
335 connect Box115.Out Box94.In
336 connect Box101.Out Box116.In1
337 connect Box115.Box_ConcatStrings Box116.Box_ConcatString
338 connect Box86.BoxChange Box117.BoxExecute
339 connect Box114.BoxChange Box117.In1
340 connect Box106.Out Box121.In1
341 connect Box120.Box_ConcatStrings Box121.Box_ConcatString
342 connect Box120.Out Box108.Filename
343 connect Box116.BoxChange Box117.In5
344 connect Box121.BoxChange Box117.In2
345 connect Box108.BoxChange Box117.In6
346 connect Box108.BoxChange Box94.BoxExecute
347 connect Box105.Out Box122.In1
348 connect Box122.Out Box53.In
349 connect Box94.BoxChange Box56.BoxExecute
350 connect Box64.Out Box123.WxVtkBaseView
351 connect Box65.Out Box123.WxVtkBaseView1
352 connect Box69.Out Box123.WxVtkBaseView2
353 connect Box124.Widget Box50.Widget8
354 connect Box125.Out Box126.Opacity
355 connect Box66.Out Box126.Renderer
356 connect Box124.BoxChange Box126.BoxExecute
357 connect Box124.Out Box123.Opacity
358 connect Box124.Out Box125.In1
359 connect Box53.BoxChange Box127.In1
360 connect Box124.BoxChange Box127.In2
361 connect Box127.BoxChange Box123.BoxExecute
362 connect Box126.BoxChange Box128.BoxExecute
363 connect Box66.Out Box128.Renderer
364 connect Box94.BoxChange Box53.BoxExecute
365 connect Box80.BoxChange Box93.BoxExecute
366 connect Box129.Out Box130.In
367 connect Box130.Out Box131.In
368 connect Box131.Out Box132.In
369 connect Box133.Out Box129.In
370 connect Box132.Out Box126.In
371 connect Box53.Out Box134.In0
372 connect Box134.Out Box135.In
373 connect Box98.Out Box135.ErrorValue
374 connect Box135.Out Box56.In1
375 connect Box135.Out Box87.In
376 connect Box135.Out Box83.ImageFix
377 connect Box135.Out Box123.In
378 connect Box135.Out Box133.In
380 # Complex input ports
381 input mesh Box67.In " "
382 input image Box35.In " "
383 input meshmanagermodel Box46.In " "
384 input boxChange Box63.In " "
385 input wxvtkbaseview2 Box64.In " "
386 input wxvtkbaseview3 Box65.In " "
387 input wxvtkbaseview4 Box69.In " "
388 input wxvtkbaseview1 Box71.In " "
389 input title Box78.In1 " "
390 input BaseImageFileName Box104.In1 " "
391 input OutDir Box105.In1 " "
393 # Complex output ports
394 output widget Box08.Widget " "