]> Creatis software - creaMaracasVisu.git/blob - bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.bbs
#3528 Contour ordering around axis
[creaMaracasVisu.git] / bbtk / bbs / boxes / Mesh_tool_ApplyDeformation.bbs
1 # ----------------------------------
2 # - BBTKGEditor v 1.5 BBS BlackBox Script (Complex Box)
3 # - /home/garzon/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.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 itkvtk
14
15 define Mesh_tool_ApplyDeformation 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 wx:LayoutLine Box79
28   set Box79.Orientation "H"
29   set Box79.WinTitle "New Surface ( Magenta )"
30
31 new std:MagicBox Box66
32
33 new std:MagicBox Box67
34
35 new vtk:vtkImageDataPointerRelay Box35
36
37 new creaMaracasVisu:PolyDataToActor_Widget Box37
38   set Box37.color "0 1 1"
39
40 new wx:LayoutTab Box40
41
42 new wx:CommandButton Box42
43   set Box42.Label "Apply  (Magenta->To Red)"
44
45 new wx:CommandButton Box43
46   set Box43.Label "Reset Tool"
47
48 new wx:LayoutLine Box44
49   set Box44.Orientation "V"
50   set Box44.WinTitle "1.1 Mesh Action"
51
52 new creaVtk:MeshManager_tool Box45
53   set Box45.Tool "32"
54
55 new std:MagicBox Box46
56
57 new std:MultipleInputs Box51
58
59 new std:MagicBox Box63
60
61 new std:MagicBox Box64
62
63 new std:MagicBox Box65
64
65 new std:MagicBox Box69
66
67 new std:MagicBox Box71
68
69 new creaMaracasVisu:MeshContours_Widget Box72
70   set Box72.colorMesh "0 1 1"
71
72 new wx:LayoutLine Box81
73   set Box81.WinTitle "Step 1.   Surface"
74
75 new wx:LayoutTab Box82
76
77 new creaMaracasVisu:wxVtkBaseView_Info Box96
78
79 new creaVtk:MeshManager_tool Box48
80   set Box48.Tool "35"
81
82 new creaVtk:MeshDeformation Box39
83   set Box39.TypeIn "1"
84
85 new wx:Slider Box49
86   set Box49.In "20"
87   set Box49.Label "true"
88   set Box49.Max "40"
89   set Box49.Min "1"
90   set Box49.ReactiveOnTrack "true"
91   set Box49.Title "Size Deformation"
92
93 new wx:CheckBox Box50
94   set Box50.Title "Active"
95
96 new creaVtk:PlaneWidget Box58
97   set Box58.ReactiveType "1"
98   set Box58.Representation "1"
99   set Box58.Resolution "5"
100
101 new std:MultipleInputs Box59
102
103 new wx:CommandButton Box53
104   set Box53.Label "-"
105
106 new wx:CommandButton Box54
107   set Box54.Label "+"
108
109 new wx:LayoutLine Box56
110   set Box56.Orientation "H"
111
112 new creaVtk:PlaneWidget_Base Box57
113   set Box57.Param "-1"
114   set Box57.Type "1"
115
116 new creaVtk:PlaneWidget_Base Box60
117   set Box60.Param "1"
118   set Box60.Type "1"
119
120 new std:MultipleInputs Box61
121
122 new creaVtk:MeshManager Box62
123   set Box62.MemoryMode "true"
124
125 new std:MultipleInputs Box73
126
127 new creaVtk:PointPickerNearest Box75
128   set Box75.Active "true"
129
130 new creaMaracasVisu:wxVtkBaseView_Info Box76
131   set Box76.InteractionType "6"
132
133 new std:MathOperationVector Box78
134   set Box78.Type "2"
135
136 new vtk:ImageVtkProperties Box83
137
138 new std:SharedMemory Box85
139
140 new std:SharedMemory Box86
141
142 new std:SharedMemory Box87
143
144 new std:MathOperationVector Box88
145   set Box88.Type "3"
146
147 new creaMaracasVisu:SetPosition Box89
148   set Box89.Active "false"
149
150 new creaMaracasVisu:wxVtkBaseView_info_tool Box90
151   set Box90.Type "1"
152
153 new creaMaracasVisu:wxVtkBaseView_info_tool Box91
154   set Box91.Type "0"
155
156 new creaVtk:PointPicker Box92
157   set Box92.TypeEvent "2"
158
159 new std:ConcatStrings_tool Box94
160   set Box94.Type "1"
161
162 new std:ConcatStrings Box95
163
164 new std:ConcatStrings_tool Box97
165   set Box97.Type "1"
166
167 new std:ConcatStrings Box98
168
169 new std:ConcatStrings_tool Box99
170   set Box99.Type "1"
171
172 new std:ConcatStrings_tool Box100
173   set Box100.Type "1"
174
175 new std:ConcatStrings_tool Box101
176   set Box101.Type "1"
177
178 new std:ConcatStrings Box102
179
180 new std:ConcatStrings_tool Box103
181   set Box103.Type "1"
182
183 new wx:RadioButton Box104
184   set Box104.In0 "Magenta"
185   set Box104.In1 "Colour"
186   set Box104.In2 "B&W"
187
188 new std:StringSelect Box105
189   set Box105.In0 "false"
190   set Box105.In1 "true"
191   set Box105.In2 "true"
192
193 new vtk:SurfaceTexture Box106
194
195 new std:Add Box107
196   set Box107.In2 "-1"
197
198 new wx:LayoutLine Box108
199   set Box108.Orientation "H"
200
201 new std:MultipleInputs Box109
202
203 new creaMaracasVisu:wxVtkBaseView_Info Box110
204
205 new std:GetVectorDoubleElement Box111
206   set Box111.I "0"
207
208 new std:GetVectorDoubleElement Box112
209   set Box112.I "1"
210
211 new creaMaracasVisu:wxVtkBaseView_Info Box113
212   set Box113.InteractionType "8"
213
214 new creaMaracasVisu:wxVtkBaseView_info_tool Box114
215   set Box114.Type "1"
216
217 new std:MathOperationVector Box115
218   set Box115.Type "2"
219
220 new std:ConcatStrings_tool Box116
221   set Box116.Type "1"
222
223 new std:ConcatStrings Box117
224   set Box117.In1 "true"
225
226 new std:Mul Box118
227
228 new std:ReplaceCleanString Box119
229   set Box119.Replace "1"
230   set Box119.Search "true"
231
232 new creaVtk:MeshManager_tool Box121
233   set Box121.Tool "35"
234
235 new itkvtk:GeodesicMeshDeformation Box122
236   set Box122.TypeIn "1"
237
238 new wx:CheckBox_tool Box123
239   set Box123.In "false"
240
241 new wx:LayoutLine Box124
242   set Box124.Orientation "V"
243   set Box124.WinTitle "1.2 Apply Changes"
244
245 new wx:LayoutLine Box125
246   set Box125.Orientation "V"
247   set Box125.WinTitle "Visu"
248
249 new wx:LayoutTab Box126
250
251 new wx:LayoutLine Box127
252   set Box127.Orientation "V"
253   set Box127.WinTitle "conf"
254
255 new wx:LayoutTab Box128
256
257 new wx:OutputText Box129
258
259 new wx:OutputText Box130
260
261 new wx:CommandButton Box131
262   set Box131.Label "Undo"
263
264 new wx:CommandButton Box132
265   set Box132.Label "Redo"
266
267 new wx:LayoutLine Box133
268   set Box133.Orientation "H"
269
270 new creaVtk:MeshManager_tool Box134
271   set Box134.BoxProcessMode "Manual"
272   set Box134.Tool "37"
273
274 new creaVtk:MeshManager_tool Box137
275   set Box137.BoxProcessMode "Manual"
276   set Box137.Tool "10"
277
278 new creaVtk:MeshManager_tool Box138
279   set Box138.BoxProcessMode "Manual"
280   set Box138.Tool "20"
281
282 new creaMaracasVisu:SetPosition Box142
283
284 new creaMaracasVisu:SetPosition Box143
285
286 new std:MathOperationVector Box144
287   set Box144.Type "3"
288
289 new std:MathOperationVector Box145
290   set Box145.Type "3"
291
292 new creaVtk:PointPickerNearest Box148
293
294 new creaVtk:PlaneWidget_Base Box154
295   set Box154.Type "2"
296
297 new std:MultipleInputs Box150
298
299 new creaVtk:PlaneWidget_Base Box151
300   set Box151.Type "3"
301
302
303 connect Box66.Out Box11.Renderer
304 connect Box66.Out Box37.render
305 connect Box79.Widget Box40.Widget2
306 connect Box46.Out Box45.MeshManagerModel
307 connect Box45.BoxChange Box51.In2
308 connect Box71.Out Box72._wxvtkbaseview3D1
309 connect Box64.Out Box72._wxvtkbaseview2D1
310 connect Box65.Out Box72._wxvtkbaseview2D2
311 connect Box69.Out Box72._wxvtkbaseview2D3
312 connect Box81.Widget Box08.Widget2
313 connect Box96.vtkRenderer Box66.In
314 connect Box40.Widget Box81.Widget2
315 connect Box37.boxchange Box11.BoxExecute
316 connect Box50.Out Box58.Active
317 connect Box50.BoxChange Box59.In2
318 connect Box59.BoxChange Box58.BoxExecute
319 connect Box96.vtkRenderer Box58.Renderer
320 connect Box35.Out Box58.In
321 connect Box53.Widget Box56.Widget2
322 connect Box54.Widget Box56.Widget4
323 connect Box58.Base Box57.In
324 connect Box58.Base Box60.In
325 connect Box53.BoxChange Box57.BoxExecute
326 connect Box54.BoxChange Box60.BoxExecute
327 connect Box49.BoxChange Box61.In1
328 connect Box67.Out Box62.Mesh
329 connect Box62.MeshManagerModel Box48.MeshManagerModel
330 connect Box50.Out Box37.active
331 connect Box42.BoxChange Box51.BoxExecute
332 connect Box43.BoxChange Box48.BoxExecute
333 connect Box67.Out Box48.Mesh
334 connect Box63.BoxChange Box73.In3
335 connect Box73.BoxChange Box72._execute
336 connect Box76.Point Box78.In0
337 connect Box35.Out Box83.In
338 connect Box83.Spacing Box78.In1
339 connect Box78.Out Box75.Point
340 connect Box58.Center Box88.In0
341 connect Box83.Spacing Box88.In1
342 connect Box88.Out Box89.Point
343 connect Box76.InteractorwxVtkBaseView_model Box90.InteractorwxVtkBaseView_model
344 connect Box76.InteractorwxVtkBaseView_model2 Box90.InteractorwxVtkBaseView_model2
345 connect Box64.Out Box90.wxVtkBaseView
346 connect Box65.Out Box90.wxVtkBaseView2
347 connect Box69.Out Box90.wxVtkBaseView3
348 connect Box76.InteractorwxVtkBaseView_model3 Box90.InteractorwxVtkBaseView_model3
349 connect Box96.Box_wxVtkBaseView_Info Box91.Box_wxVtkBaseView_Info
350 connect Box71.Out Box91.wxVtkBaseView
351 connect Box50.BoxChange Box91.BoxExecute
352 connect Box50.BoxChange Box90.BoxExecute
353 connect Box75.PointId Box87.In
354 connect Box75.Normal Box86.In
355 connect Box75.PointOut Box85.In
356 connect Box96.wxVtkBaseView Box89.wxVtkBaseView
357 connect Box96.vtkRenderer Box92.Renderer
358 connect Box92.Point Box85.In1
359 connect Box92.PointId Box87.In1
360 connect Box92.Normal Box86.In1
361 connect Box75.PointOut Box94.In1
362 connect Box95.Box_ConcatStrings Box94.Box_ConcatString
363 connect Box98.Box_ConcatStrings Box97.Box_ConcatString
364 connect Box92.Normal Box97.In1
365 connect Box95.Box_ConcatStrings Box99.Box_ConcatString
366 connect Box92.Point Box99.In1
367 connect Box98.Box_ConcatStrings Box100.Box_ConcatString
368 connect Box75.Normal Box100.In1
369 connect Box102.Box_ConcatStrings Box101.Box_ConcatString
370 connect Box102.Box_ConcatStrings Box103.Box_ConcatString
371 connect Box75.PointId Box101.In1
372 connect Box92.PointId Box103.In1
373 connect Box98.Out Box58.NormalIn
374 connect Box76.BoxChange Box101.BoxExecute
375 connect Box92.BoxChange Box103.BoxExecute
376 connect Box103.BoxChange Box99.BoxExecute
377 connect Box99.BoxChange Box97.BoxExecute
378 connect Box101.BoxChange Box94.BoxExecute
379 connect Box94.BoxChange Box100.BoxExecute
380 connect Box104.Out Box105.In
381 connect Box105.Out Box37.scalarvisibility
382 connect Box104.Out Box107.In1
383 connect Box107.Out Box106.ColorType
384 connect Box50.Widget Box108.Widget2
385 connect Box104.Widget Box108.Widget4
386 connect Box35.Out Box106.Image
387 connect Box104.BoxChange Box109.In1
388 connect Box110.BoxChange Box106.BoxExecute
389 connect Box109.BoxChange Box110.BoxExecute
390 connect Box71.Out Box110.wxVtkBaseView
391 connect Box110.WindowColorLevel Box111.In
392 connect Box110.WindowColorLevel Box112.In
393 connect Box112.Out Box106.ColorLevel
394 connect Box111.Out Box106.ColorWindow
395 connect Box63.BoxChange Box109.In2
396 connect Box113.InteractorwxVtkBaseView_model Box114.InteractorwxVtkBaseView_model
397 connect Box113.InteractorwxVtkBaseView_model2 Box114.InteractorwxVtkBaseView_model2
398 connect Box113.InteractorwxVtkBaseView_model3 Box114.InteractorwxVtkBaseView_model3
399 connect Box83.Spacing Box115.In1
400 connect Box113.Point Box115.In0
401 connect Box95.Box_ConcatStrings Box116.Box_ConcatString
402 connect Box115.Out Box116.In1
403 connect Box113.BoxChange Box116.BoxExecute
404 connect Box50.BoxChange Box114.BoxExecute
405 connect Box64.Out Box114.wxVtkBaseView
406 connect Box65.Out Box114.wxVtkBaseView2
407 connect Box69.Out Box114.wxVtkBaseView3
408 connect Box117.Out Box119.In
409 connect Box119.Out Box118.In1
410 connect Box50.Out Box118.In2
411 connect Box37.vtkprop3D Box92.Prop3D
412 connect Box97.BoxChange Box59.In3
413 connect Box56.Widget Box44.Widget4
414 connect Box49.Widget Box44.Widget3
415 connect Box108.Widget Box44.Widget2
416 connect Box43.Widget Box44.Widget1
417 connect Box67.Out Box121.Mesh
418 connect Box62.MeshManagerModel Box121.MeshManagerModel
419 connect Box61.BoxChange Box122.BoxExecute
420 connect Box122.BoxChange Box73.In2
421 connect Box49.Out Box122.S
422 connect Box58.Center Box122.Center
423 connect Box102.Out Box122.EdgeId
424 connect Box118.Out Box122.Active
425 connect Box50.BoxChange Box61.In3
426 connect Box50.Widget Box123.CheckBoxWidget
427 connect Box42.BoxChange Box123.BoxExecute
428 connect Box124.Widget Box82.Widget4
429 connect Box42.Widget Box124.Widget2
430 connect Box67.BoxChange Box121.BoxExecute
431 connect Box62.MeshBase Box45.Mesh
432 connect Box62.MeshBase Box72._polydata
433 connect Box62.MeshBase Box37.polydata
434 connect Box62.MeshBase Box75.Mesh
435 connect Box62.MeshBase Box106.Mesh
436 connect Box62.MeshBase Box122.In
437 connect Box44.Widget Box126.Widget2
438 connect Box126.Widget Box79.Widget2
439 connect Box82.Widget Box79.Widget4
440 connect Box37.widgetB Box127.Widget2
441 connect Box72._widgetB Box127.Widget4
442 connect Box72._widgetA Box125.Widget2
443 connect Box37.widgetA Box125.Widget4
444 connect Box128.Widget Box79.Widget6
445 connect Box125.Widget Box128.Widget2
446 connect Box127.Widget Box128.Widget4
447 connect Box129.Widget Box125.Widget9
448 connect Box130.Widget Box127.Widget9
449 connect Box131.Widget Box133.Widget2
450 connect Box132.Widget Box133.Widget4
451 connect Box133.Widget Box44.Widget5
452 connect Box62.MeshManagerModel Box134.MeshManagerModel
453 connect Box122.BoxChange Box134.BoxExecute
454 connect Box131.BoxChange Box137.BoxExecute
455 connect Box132.BoxChange Box138.BoxExecute
456 connect Box62.MeshManagerModel Box138.MeshManagerModel
457 connect Box62.MeshManagerModel Box137.MeshManagerModel
458 connect Box50.Out Box89.Active
459 connect Box95.Out Box58.Origin
460 connect Box58.BoxChange Box61.In2
461 connect Box58.BoxChange Box89.BoxExecute
462 connect Box122.Out Box134.DoubleParams
463 connect Box138.BoxChange Box143.BoxExecute
464 connect Box96.wxVtkBaseView Box143.wxVtkBaseView
465 connect Box96.wxVtkBaseView Box142.wxVtkBaseView
466 connect Box138.Out Box144.In0
467 connect Box83.Spacing Box144.In1
468 connect Box144.Out Box143.Point
469 connect Box137.Out Box145.In0
470 connect Box83.Spacing Box145.In1
471 connect Box145.Out Box142.Point
472 connect Box154.BoxChange Box150.In1
473 connect Box148.Normal Box154.ParamVector
474 connect Box151.BoxChange Box150.In3
475 connect Box148.PointOut Box151.ParamVector
476 connect Box137.BoxChange Box142.BoxExecute
477
478 # Complex input ports
479 input mesh Box67.In " "
480 input image Box35.In " "
481 input title Box08.WinTitle " "
482 input meshmanagermodel Box46.In " "
483 input boxChange Box63.In " "
484 input wxvtkbaseview2 Box64.In " "
485 input wxvtkbaseview3 Box65.In " "
486 input wxvtkbaseview4 Box69.In " "
487 input wxvtkbaseview1 Box71.In " "
488
489 # Complex output ports
490 output widget Box08.Widget " "
491 output ExportIsActive_concatstring_tool Box117.Box_ConcatStrings " "
492
493
494 endefine