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