]> Creatis software - creaMaracasVisu.git/blob - bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.bbs
#3540 Mesh contour with free plane module
[creaMaracasVisu.git] / bbtk / bbs / boxes / Mesh_tool_ApplyDeformation.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_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 creaVtk:MeshManager_tool Box121
229   set Box121.Tool "35"
230
231 new itkvtk:GeodesicMeshDeformation Box122
232   set Box122.TypeIn "1"
233
234 new wx:CheckBox_tool Box123
235   set Box123.In "false"
236
237 new wx:LayoutLine Box124
238   set Box124.Orientation "V"
239   set Box124.WinTitle "1.2 Apply Changes"
240
241 new wx:LayoutLine Box125
242   set Box125.Orientation "V"
243   set Box125.WinTitle "Visu"
244
245 new wx:LayoutTab Box126
246
247 new wx:LayoutLine Box127
248   set Box127.Orientation "V"
249   set Box127.WinTitle "conf"
250
251 new wx:LayoutTab Box128
252
253 new wx:OutputText Box129
254
255 new wx:OutputText Box130
256
257 new wx:CommandButton Box131
258   set Box131.Label "Undo"
259
260 new wx:CommandButton Box132
261   set Box132.Label "Redo"
262
263 new wx:LayoutLine Box133
264   set Box133.Orientation "H"
265
266 new creaVtk:MeshManager_tool Box134
267   set Box134.BoxProcessMode "Manual"
268   set Box134.Tool "37"
269
270 new creaVtk:MeshManager_tool Box137
271   set Box137.BoxProcessMode "Manual"
272   set Box137.Tool "10"
273
274 new creaVtk:MeshManager_tool Box138
275   set Box138.BoxProcessMode "Manual"
276   set Box138.Tool "20"
277
278 new creaMaracasVisu:SetPosition Box142
279
280 new creaMaracasVisu:SetPosition Box143
281
282 new std:MathOperationVector Box144
283   set Box144.Type "3"
284
285 new std:MathOperationVector Box145
286   set Box145.Type "3"
287
288 new creaVtk:PlaneWidget_Base Box154
289   set Box154.Type "3"
290
291 new creaVtk:PlaneWidget_Base Box151
292   set Box151.Type "3"
293
294 new std:GetVectorDoubleSubVector Box150
295   set Box150.ErrorValue "0"
296   set Box150.I "0"
297   set Box150.Size "3"
298
299 new std:GetVectorDoubleSubVector Box152
300   set Box152.ErrorValue "0"
301   set Box152.I "3"
302   set Box152.Size "3"
303
304 new creaVtk:PlaneWidget_Base Box153
305   set Box153.Type "2"
306
307 new std:GetVectorDoubleSubVector Box155
308   set Box155.ErrorValue "0"
309   set Box155.I "0"
310   set Box155.Size "3"
311
312 new std:GetVectorDoubleSubVector Box156
313   set Box156.ErrorValue "0"
314   set Box156.I "3"
315   set Box156.Size "3"
316
317 new creaVtk:PlaneWidget_Base Box158
318   set Box158.Type "2"
319
320 new std:ConcatStrings_tool Box159
321   set Box159.BoxProcessMode "Manual"
322   set Box159.In1 "-1"
323   set Box159.Type "1"
324
325 new std:MultipleInputs Box160
326
327 new std:MultipleInputs Box162
328
329 new std:MagicBox Box163
330
331 new std:MagicBox Box164
332
333 new std:MagicBox Box165
334
335
336 connect Box66.Out Box11.Renderer
337 connect Box66.Out Box37.render
338 connect Box79.Widget Box40.Widget2
339 connect Box46.Out Box45.MeshManagerModel
340 connect Box45.BoxChange Box51.In2
341 connect Box71.Out Box72._wxvtkbaseview3D1
342 connect Box64.Out Box72._wxvtkbaseview2D1
343 connect Box65.Out Box72._wxvtkbaseview2D2
344 connect Box69.Out Box72._wxvtkbaseview2D3
345 connect Box81.Widget Box08.Widget2
346 connect Box96.vtkRenderer Box66.In
347 connect Box40.Widget Box81.Widget2
348 connect Box37.boxchange Box11.BoxExecute
349 connect Box50.Out Box58.Active
350 connect Box50.BoxChange Box59.In2
351 connect Box59.BoxChange Box58.BoxExecute
352 connect Box96.vtkRenderer Box58.Renderer
353 connect Box35.Out Box58.In
354 connect Box53.Widget Box56.Widget2
355 connect Box54.Widget Box56.Widget4
356 connect Box58.Base Box57.In
357 connect Box58.Base Box60.In
358 connect Box53.BoxChange Box57.BoxExecute
359 connect Box54.BoxChange Box60.BoxExecute
360 connect Box49.BoxChange Box61.In1
361 connect Box67.Out Box62.Mesh
362 connect Box62.MeshManagerModel Box48.MeshManagerModel
363 connect Box50.Out Box37.active
364 connect Box42.BoxChange Box51.BoxExecute
365 connect Box43.BoxChange Box48.BoxExecute
366 connect Box67.Out Box48.Mesh
367 connect Box63.BoxChange Box73.In3
368 connect Box76.Point Box78.In0
369 connect Box35.Out Box83.In
370 connect Box83.Spacing Box78.In1
371 connect Box78.Out Box75.Point
372 connect Box58.Center Box88.In0
373 connect Box83.Spacing Box88.In1
374 connect Box88.Out Box89.Point
375 connect Box76.InteractorwxVtkBaseView_model Box90.InteractorwxVtkBaseView_model
376 connect Box76.InteractorwxVtkBaseView_model2 Box90.InteractorwxVtkBaseView_model2
377 connect Box64.Out Box90.wxVtkBaseView
378 connect Box65.Out Box90.wxVtkBaseView2
379 connect Box69.Out Box90.wxVtkBaseView3
380 connect Box76.InteractorwxVtkBaseView_model3 Box90.InteractorwxVtkBaseView_model3
381 connect Box96.Box_wxVtkBaseView_Info Box91.Box_wxVtkBaseView_Info
382 connect Box71.Out Box91.wxVtkBaseView
383 connect Box50.BoxChange Box91.BoxExecute
384 connect Box50.BoxChange Box90.BoxExecute
385 connect Box75.PointId Box87.In
386 connect Box75.Normal Box86.In
387 connect Box75.PointOut Box85.In
388 connect Box96.wxVtkBaseView Box89.wxVtkBaseView
389 connect Box96.vtkRenderer Box92.Renderer
390 connect Box92.Point Box85.In1
391 connect Box92.PointId Box87.In1
392 connect Box92.Normal Box86.In1
393 connect Box75.PointOut Box94.In1
394 connect Box95.Box_ConcatStrings Box94.Box_ConcatString
395 connect Box98.Box_ConcatStrings Box97.Box_ConcatString
396 connect Box92.Normal Box97.In1
397 connect Box95.Box_ConcatStrings Box99.Box_ConcatString
398 connect Box92.Point Box99.In1
399 connect Box98.Box_ConcatStrings Box100.Box_ConcatString
400 connect Box75.Normal Box100.In1
401 connect Box102.Box_ConcatStrings Box101.Box_ConcatString
402 connect Box102.Box_ConcatStrings Box103.Box_ConcatString
403 connect Box75.PointId Box101.In1
404 connect Box92.PointId Box103.In1
405 connect Box98.Out Box58.NormalIn
406 connect Box76.BoxChange Box101.BoxExecute
407 connect Box92.BoxChange Box103.BoxExecute
408 connect Box103.BoxChange Box99.BoxExecute
409 connect Box99.BoxChange Box97.BoxExecute
410 connect Box101.BoxChange Box94.BoxExecute
411 connect Box94.BoxChange Box100.BoxExecute
412 connect Box104.Out Box105.In
413 connect Box105.Out Box37.scalarvisibility
414 connect Box104.Out Box107.In1
415 connect Box107.Out Box106.ColorType
416 connect Box50.Widget Box108.Widget2
417 connect Box104.Widget Box108.Widget4
418 connect Box35.Out Box106.Image
419 connect Box104.BoxChange Box109.In1
420 connect Box110.BoxChange Box106.BoxExecute
421 connect Box109.BoxChange Box110.BoxExecute
422 connect Box71.Out Box110.wxVtkBaseView
423 connect Box110.WindowColorLevel Box111.In
424 connect Box110.WindowColorLevel Box112.In
425 connect Box112.Out Box106.ColorLevel
426 connect Box111.Out Box106.ColorWindow
427 connect Box63.BoxChange Box109.In2
428 connect Box113.InteractorwxVtkBaseView_model Box114.InteractorwxVtkBaseView_model
429 connect Box113.InteractorwxVtkBaseView_model2 Box114.InteractorwxVtkBaseView_model2
430 connect Box113.InteractorwxVtkBaseView_model3 Box114.InteractorwxVtkBaseView_model3
431 connect Box83.Spacing Box115.In1
432 connect Box113.Point Box115.In0
433 connect Box95.Box_ConcatStrings Box116.Box_ConcatString
434 connect Box115.Out Box116.In1
435 connect Box113.BoxChange Box116.BoxExecute
436 connect Box50.BoxChange Box114.BoxExecute
437 connect Box64.Out Box114.wxVtkBaseView
438 connect Box65.Out Box114.wxVtkBaseView2
439 connect Box69.Out Box114.wxVtkBaseView3
440 connect Box50.Out Box118.In2
441 connect Box37.vtkprop3D Box92.Prop3D
442 connect Box97.BoxChange Box59.In3
443 connect Box56.Widget Box44.Widget4
444 connect Box49.Widget Box44.Widget3
445 connect Box108.Widget Box44.Widget2
446 connect Box43.Widget Box44.Widget1
447 connect Box67.Out Box121.Mesh
448 connect Box62.MeshManagerModel Box121.MeshManagerModel
449 connect Box61.BoxChange Box122.BoxExecute
450 connect Box122.BoxChange Box73.In2
451 connect Box49.Out Box122.S
452 connect Box58.Center Box122.Center
453 connect Box102.Out Box122.EdgeId
454 connect Box118.Out Box122.Active
455 connect Box50.BoxChange Box61.In3
456 connect Box50.Widget Box123.CheckBoxWidget
457 connect Box42.BoxChange Box123.BoxExecute
458 connect Box124.Widget Box82.Widget4
459 connect Box42.Widget Box124.Widget2
460 connect Box67.BoxChange Box121.BoxExecute
461 connect Box62.MeshBase Box45.Mesh
462 connect Box62.MeshBase Box72._polydata
463 connect Box62.MeshBase Box37.polydata
464 connect Box62.MeshBase Box75.Mesh
465 connect Box62.MeshBase Box106.Mesh
466 connect Box62.MeshBase Box122.In
467 connect Box44.Widget Box126.Widget2
468 connect Box126.Widget Box79.Widget2
469 connect Box82.Widget Box79.Widget4
470 connect Box37.widgetB Box127.Widget2
471 connect Box72._widgetB Box127.Widget4
472 connect Box72._widgetA Box125.Widget2
473 connect Box37.widgetA Box125.Widget4
474 connect Box128.Widget Box79.Widget6
475 connect Box125.Widget Box128.Widget2
476 connect Box127.Widget Box128.Widget4
477 connect Box129.Widget Box125.Widget9
478 connect Box130.Widget Box127.Widget9
479 connect Box131.Widget Box133.Widget2
480 connect Box132.Widget Box133.Widget4
481 connect Box133.Widget Box44.Widget5
482 connect Box62.MeshManagerModel Box134.MeshManagerModel
483 connect Box122.BoxChange Box134.BoxExecute
484 connect Box131.BoxChange Box137.BoxExecute
485 connect Box132.BoxChange Box138.BoxExecute
486 connect Box62.MeshManagerModel Box138.MeshManagerModel
487 connect Box62.MeshManagerModel Box137.MeshManagerModel
488 connect Box50.Out Box89.Active
489 connect Box95.Out Box58.Origin
490 connect Box58.BoxChange Box61.In2
491 connect Box58.BoxChange Box89.BoxExecute
492 connect Box122.Out Box134.DoubleParams
493 connect Box96.wxVtkBaseView Box142.wxVtkBaseView
494 connect Box83.Spacing Box144.In1
495 connect Box83.Spacing Box145.In1
496 connect Box145.Out Box142.Point
497 connect Box96.wxVtkBaseView Box143.wxVtkBaseView
498 connect Box137.BoxChange Box142.BoxExecute
499 connect Box138.BoxChange Box143.BoxExecute
500 connect Box58.Base Box151.In
501 connect Box58.Base Box154.In
502 connect Box142.BoxChange Box154.BoxExecute
503 connect Box143.BoxChange Box151.BoxExecute
504 connect Box144.Out Box143.Point
505 connect Box137.Out Box150.In
506 connect Box150.Out Box145.In0
507 connect Box150.Out Box154.ParamVector
508 connect Box137.Out Box152.In
509 connect Box142.BoxChange Box153.BoxExecute
510 connect Box58.Base Box153.In
511 connect Box138.Out Box155.In
512 connect Box155.Out Box144.In0
513 connect Box138.Out Box156.In
514 connect Box155.Out Box151.ParamVector
515 connect Box156.Out Box158.ParamVector
516 connect Box143.BoxChange Box158.BoxExecute
517 connect Box58.Base Box158.In
518 connect Box152.Out Box153.ParamVector
519 connect Box58.Normal Box122.Direction
520 connect Box102.Box_ConcatStrings Box159.Box_ConcatString
521 connect Box160.BoxChange Box159.BoxExecute
522 connect Box131.BoxChange Box160.In1
523 connect Box132.BoxChange Box160.In2
524 connect Box73.BoxChange Box72._execute
525 connect Box53.BoxChange Box162.In1
526 connect Box54.BoxChange Box162.In3
527 connect Box58.BoxChange Box162.In5
528 connect Box117.Out Box72.active_widget
529 connect Box113.BoxChange Box73.In5
530 connect Box163.BoxChange Box72.Freeplane_boxexecute
531 connect Box164.Out Box72.Freeplane_point
532 connect Box165.Out Box72.Freeplane_transform
533 connect Box117.Out Box118.In1
534
535 # Complex input ports
536 input mesh Box67.In " "
537 input image Box35.In " "
538 input title Box08.WinTitle " "
539 input meshmanagermodel Box46.In " "
540 input boxChange Box63.In " "
541 input wxvtkbaseview2 Box64.In " "
542 input wxvtkbaseview3 Box65.In " "
543 input wxvtkbaseview4 Box69.In " "
544 input wxvtkbaseview1 Box71.In " "
545 input freeplane_boxexecute Box163.In " "
546 input freeplane_point Box164.In " "
547 input freeplane_transform Box165.In " "
548
549 # Complex output ports
550 output widget Box08.Widget " "
551 output ExportIsActive_concatstring_tool Box117.Box_ConcatStrings " "
552 output ChangePosition Box162.BoxChange " "
553
554
555 endefine