]> Creatis software - creaMaracasVisu.git/blob - bbtk/bbs/boxes/Mesh_tool_ApplyExternalMask.bbs
#3547 Bug color layer Z position
[creaMaracasVisu.git] / bbtk / bbs / boxes / Mesh_tool_ApplyExternalMask.bbs
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 # ----------------------------------
5
6 include std
7 include itkvtk
8 include wx
9 include vtk
10 include std
11 include creaMaracasVisu
12 include creaVtk
13 include PackRecalage
14
15 define Mesh_tool_ApplyExternalMask creaMaracasVisu
16
17 author "info-dev@creatis.insa-lyon.fr"
18 description "Show N Points"
19
20 category "demo"
21
22 new wx:LayoutLine Box08
23
24 new vtk:UpdateRender Box11
25   set Box11.Active "true"
26
27 new vtk:ImageVtkProperties Box68
28
29 new wx:LayoutLine Box79
30   set Box79.Orientation "H"
31   set Box79.WinTitle "New Surface ( Magenta )"
32
33 new wx:CommandButton Box80
34   set Box80.Label "Run"
35
36 new std:MagicBox Box66
37
38 new std:MagicBox Box67
39
40 new vtk:vtkImageDataPointerRelay Box35
41
42 new creaMaracasVisu:PolyDataToActor_Widget Box37
43   set Box37.color "0 1 1"
44   set Box37.meshOpacity "100"
45
46 new wx:LayoutTab Box40
47
48 new wx:CommandButton Box42
49   set Box42.Label "Apply  (Magenta->To Red)"
50
51 new wx:CommandButton Box43
52   set Box43.Label "Reset Tool"
53
54 new wx:LayoutLine Box44
55   set Box44.Orientation "V"
56   set Box44.WinTitle "1.2 Mesh Action"
57
58 new creaVtk:MeshManager_tool Box45
59   set Box45.Tool "30"
60
61 new std:MagicBox Box46
62
63 new std:MultipleInputs Box51
64
65 new std:MagicBox Box63
66
67 new std:MagicBox Box64
68
69 new std:MagicBox Box65
70
71 new std:MagicBox Box69
72
73 new std:MagicBox Box71
74
75 new creaMaracasVisu:MeshContours_Widget Box72
76   set Box72.colorMesh "0 1 1"
77
78 new wx:LayoutLine Box81
79   set Box81.WinTitle "Step 1.   Surface"
80
81 new wx:LayoutTab Box82
82
83 new wx:OutputText Box84
84
85 new creaVtk:MeshManager Box92
86
87 new creaVtk:MeshManager_tool Box93
88   set Box93.BoxProcessMode "Manual"
89   set Box93.Tool "35"
90
91 new creaMaracasVisu:wxVtkBaseView_Info Box96
92
93 new creaVtk:PolyDataToImageData Box97
94
95 new vtk:CreateImage Box98
96   set Box98.OutputFormat "VTK_UNSIGNED_SHORT"
97
98 new vtk:ImageGaussianSmooth Box99
99   set Box99.StdDevX "1"
100   set Box99.StdDevY "1"
101   set Box99.StdDevZ "1"
102
103 new vtk:MarchingCubes Box100
104   set Box100.Value "128"
105
106 new creaVtk:MeshReduction_DecimatePro Box41
107   set Box41.TargetReduction "0.8"
108
109 new creaVtk:MeshManager_tool Box47
110   set Box47.Tool "35"
111
112 new creaVtk:MeshManager_tool Box48
113   set Box48.Tool "35"
114
115 new creaVtk:PolyDataNormals Box39
116
117 new wx:LayoutTab Box49
118
119 new wx:LayoutLine Box50
120
121 new vtk:MetaImageReader Box53
122
123 new vtk:BinaryOperations Box56
124   set Box56.BoxProcessMode "Manual"
125
126 new vtk:ImageCastToUShort Box60
127
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"
133
134 new vtk:InversCrop Box83
135   set Box83.BoxProcessMode "manual"
136   set Box83.Origin "0 0 0"
137   set Box83.Type "1"
138
139 new vtk:CreateImage Box85
140
141 new vtk:ImageVtkProperties Box87
142
143 new wx:LayoutLine Box88
144   set Box88.Orientation "H"
145   set Box88.WinTitle "External Mask (Yellow)"
146
147 new wx:OutputText Box89
148
149 new wx:OutputText Box90
150
151 new wx:OutputText Box91
152
153 new wx:LayoutLine Box77
154   set Box77.Orientation "V"
155   set Box77.WinTitle "1.3 Apply Changes"
156
157 new std:ConcatStrings Box78
158
159 new wx:CommandButton Box86
160   set Box86.Label "1.1 Run Contour Application"
161
162 new std:ExecSystemCommand Box94
163
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="
168
169 new std:StringSelect Box101
170
171 new std:ConcatStrings Box102
172   set Box102.In1 "start /b  "
173
174 new std:Configuration Box103
175
176 new std:ConcatStrings Box104
177
178 new std:ConcatStrings Box105
179
180 new std:ConcatStrings Box106
181   set Box106.In2 "contour-tmp-Imge.mhd"
182
183 new creaVtk:PolyDataToImageData Box107
184
185 new vtk:MetaImageWriter Box108
186   set Box108.Compression "true"
187
188 new vtk:CreateImage Box109
189
190 new vtk:ImageVtkProperties Box110
191
192 new creaVtk:MeshManager Box113
193
194 new creaVtk:MeshManager_tool Box114
195   set Box114.Tool "35"
196
197 new std:ConcatStrings Box115
198
199 new std:ConcatStrings_tool Box116
200   set Box116.Type "1"
201
202 new std:MultipleInputs Box117
203
204 new std:ConcatStrings Box120
205
206 new std:ConcatStrings_tool Box121
207   set Box121.Type "1"
208
209 new std:ConcatStrings Box122
210   set Box122.In2 "/contour-tmp2-Imge.mhd"
211
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"
217
218 new wx:Slider Box124
219   set Box124.In "50"
220   set Box124.Max "100"
221   set Box124.Min "0"
222   set Box124.ReactiveOnTrack "true"
223
224 new std:Div Box125
225   set Box125.In2 "100"
226
227 new vtk:PolyDataToActor Box126
228
229 new std:MultipleInputs Box127
230
231 new vtk:UpdateRender Box128
232   set Box128.Active "true"
233
234 new vtk:ImageGaussianSmooth Box129
235   set Box129.StdDevX "1"
236   set Box129.StdDevY "1"
237   set Box129.StdDevZ "1"
238
239 new vtk:MarchingCubes Box130
240   set Box130.Value "128"
241
242 new creaVtk:MeshReduction_DecimatePro Box131
243   set Box131.TargetReduction "0.8"
244
245 new creaVtk:PolyDataNormals Box132
246
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"
252
253 new PackRecalage:AddImageToVector Box134
254
255 new vtk:GetVectorVtkImageDataElement Box135
256   set Box135.I "0"
257
258 new wx:LayoutTab Box136
259
260 new wx:LayoutLine Box137
261   set Box137.Orientation "V"
262   set Box137.WinTitle "Visu"
263
264 new wx:OutputText Box138
265
266 new wx:LayoutLine Box139
267   set Box139.Orientation "V"
268   set Box139.WinTitle "conf"
269
270 new wx:OutputText Box140
271
272 new wx:LayoutTab Box141
273
274 new std:ConcatStrings Box142
275
276
277 connect Box66.Out Box11.Renderer
278 connect Box35.Out Box68.In
279 connect Box66.Out Box37.render
280 connect Box79.Widget Box40.Widget2
281 connect Box80.Widget Box44.Widget5
282 connect Box46.Out Box45.MeshManagerModel
283 connect Box42.BoxChange Box51.BoxExecute
284 connect Box45.BoxChange Box51.In2
285 connect Box71.Out Box72._wxvtkbaseview3D1
286 connect Box64.Out Box72._wxvtkbaseview2D1
287 connect Box65.Out Box72._wxvtkbaseview2D2
288 connect Box69.Out Box72._wxvtkbaseview2D3
289 connect Box44.Widget Box82.Widget2
290 connect Box82.Widget Box79.Widget2
291 connect Box84.Widget Box44.Widget9
292 connect Box92.MeshManagerModel Box93.MeshManagerModel
293 connect Box92.MeshBase Box72._polydata
294 connect Box92.MeshBase Box37.polydata
295 connect Box81.Widget Box08.Widget2
296 connect Box71.Out Box96.wxVtkBaseView
297 connect Box96.vtkRenderer Box66.In
298 connect Box98.Out Box97.InImage
299 connect Box68.Spacing Box98.Spacing
300 connect Box68.Size Box98.Dimensions
301 connect Box67.Out Box97.InPolyData
302 connect Box99.Out Box100.In
303 connect Box100.Out Box41.In
304 connect Box92.MeshManagerModel Box47.MeshManagerModel
305 connect Box43.BoxChange Box48.BoxExecute
306 connect Box92.MeshManagerModel Box48.MeshManagerModel
307 connect Box63.BoxChange Box72._execute
308 connect Box92.MeshBase Box45.Mesh
309 connect Box47.BoxChange Box51.In5
310 connect Box37.boxchange Box11.BoxExecute
311 connect Box41.Out Box39.In
312 connect Box39.Out Box93.Mesh
313 connect Box43.Widget Box44.Widget2
314 connect Box49.Widget Box81.Widget1
315 connect Box40.Widget Box81.Widget4
316 connect Box97.Out Box60.In
317 connect Box60.Out Box56.In2
318 connect Box56.Out Box61.In
319 connect Box61.Out Box99.In
320 connect Box85.Out Box83.ImageMove
321 connect Box42.BoxChange Box83.BoxExecute
322 connect Box87.TypeName Box85.OutputFormat
323 connect Box87.Spacing Box85.Spacing
324 connect Box87.Size Box85.Dimensions
325 connect Box50.Widget Box88.Widget1
326 connect Box89.Widget Box88.Widget2
327 connect Box90.Widget Box88.Widget3
328 connect Box88.Widget Box49.Widget2
329 connect Box91.Widget Box50.Widget2
330 connect Box42.Widget Box77.Widget2
331 connect Box78.Out Box08.WinTitle
332 connect Box86.Widget Box50.Widget4
333 connect Box95.Out Box101.In0
334 connect Box95.Out Box102.In2
335 connect Box95.Out Box101.In2
336 connect Box103.SystemType Box101.In
337 connect Box104.Out Box95.In3
338 connect Box105.Out Box95.In5
339 connect Box105.Out Box106.In1
340 connect Box107.Out Box108.In
341 connect Box109.Out Box107.InImage
342 connect Box110.TypeName Box109.OutputFormat
343 connect Box110.Spacing Box109.Spacing
344 connect Box110.Size Box109.Dimensions
345 connect Box113.MeshManagerModel Box114.MeshManagerModel
346 connect Box67.Out Box114.Mesh
347 connect Box35.Out Box110.In
348 connect Box113.MeshBase Box107.InPolyData
349 connect Box115.Out Box94.In
350 connect Box101.Out Box116.In1
351 connect Box115.Box_ConcatStrings Box116.Box_ConcatString
352 connect Box86.BoxChange Box117.BoxExecute
353 connect Box114.BoxChange Box117.In1
354 connect Box106.Out Box121.In1
355 connect Box120.Box_ConcatStrings Box121.Box_ConcatString
356 connect Box120.Out Box108.Filename
357 connect Box116.BoxChange Box117.In5
358 connect Box121.BoxChange Box117.In2
359 connect Box105.Out Box122.In1
360 connect Box122.Out Box53.In
361 connect Box64.Out Box123.WxVtkBaseView
362 connect Box65.Out Box123.WxVtkBaseView1
363 connect Box69.Out Box123.WxVtkBaseView2
364 connect Box124.Widget Box50.Widget8
365 connect Box125.Out Box126.Opacity
366 connect Box66.Out Box126.Renderer
367 connect Box124.BoxChange Box126.BoxExecute
368 connect Box124.Out Box123.Opacity
369 connect Box124.Out Box125.In1
370 connect Box53.BoxChange Box127.In1
371 connect Box124.BoxChange Box127.In2
372 connect Box127.BoxChange Box123.BoxExecute
373 connect Box126.BoxChange Box128.BoxExecute
374 connect Box66.Out Box128.Renderer
375 connect Box80.BoxChange Box93.BoxExecute
376 connect Box129.Out Box130.In
377 connect Box130.Out Box131.In
378 connect Box131.Out Box132.In
379 connect Box133.Out Box129.In
380 connect Box132.Out Box126.In
381 connect Box53.Out Box134.In0
382 connect Box134.Out Box135.In
383 connect Box98.Out Box135.ErrorValue
384 connect Box135.Out Box56.In1
385 connect Box135.Out Box87.In
386 connect Box135.Out Box83.ImageFix
387 connect Box135.Out Box123.In
388 connect Box135.Out Box133.In
389 connect Box77.Widget Box136.Widget2
390 connect Box136.Widget Box79.Widget4
391 connect Box138.Widget Box137.Widget9
392 connect Box140.Widget Box139.Widget9
393 connect Box72._widgetA Box137.Widget2
394 connect Box37.widgetA Box137.Widget4
395 connect Box72._widgetB Box139.Widget2
396 connect Box37.widgetB Box139.Widget4
397 connect Box137.Widget Box141.Widget2
398 connect Box141.Widget Box79.Widget7
399 connect Box139.Widget Box141.Widget4
400 connect Box95.Out Box101.In1
401 connect Box108.BoxChange Box117.In7
402 connect Box94.BoxChange Box117.In8
403 connect Box142.BoxChange Box53.BoxExecute
404 connect Box142.BoxChange Box56.BoxExecute
405 connect Box94.BoxChange Box142.BoxExecute
406 connect Box86.BoxChange Box115.BoxExecute
407
408 # Complex input ports
409 input mesh Box67.In " "
410 input image Box35.In " "
411 input meshmanagermodel Box46.In " "
412 input boxChange Box63.In " "
413 input wxvtkbaseview2 Box64.In " "
414 input wxvtkbaseview3 Box65.In " "
415 input wxvtkbaseview4 Box69.In " "
416 input wxvtkbaseview1 Box71.In " "
417 input title Box78.In1 " "
418 input BaseImageFileName Box104.In1 " "
419 input OutDir Box105.In1 " "
420
421 # Complex output ports
422 output widget Box08.Widget " "
423
424
425 endefine