]> Creatis software - creaMaracasVisu.git/blob - bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.bbs
Clean code
[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 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 "1.1 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 "1.2 Apply Changes"
245
246 new wx:LayoutLine Box125
247   set Box125.Orientation "H"
248   set Box125.WinTitle "New Surface ( Magenta )"
249
250 new wx:LayoutTab Box126
251
252
253 connect Box66.Out Box11.Renderer
254 connect Box66.Out Box37.render
255 connect Box79.Widget Box40.Widget2
256 connect Box80.Widget Box44.Widget5
257 connect Box46.Out Box45.MeshManagerModel
258 connect Box45.BoxChange Box51.In2
259 connect Box71.Out Box72._wxvtkbaseview3D1
260 connect Box64.Out Box72._wxvtkbaseview2D1
261 connect Box65.Out Box72._wxvtkbaseview2D2
262 connect Box69.Out Box72._wxvtkbaseview2D3
263 connect Box81.Widget Box08.Widget2
264 connect Box96.vtkRenderer Box66.In
265 connect Box40.Widget Box81.Widget2
266 connect Box37.boxchange Box11.BoxExecute
267 connect Box50.Out Box58.Active
268 connect Box50.BoxChange Box59.In2
269 connect Box59.BoxChange Box58.BoxExecute
270 connect Box96.vtkRenderer Box58.Renderer
271 connect Box35.Out Box58.In
272 connect Box53.Widget Box56.Widget2
273 connect Box54.Widget Box56.Widget4
274 connect Box58.Base Box57.In
275 connect Box58.Base Box60.In
276 connect Box53.BoxChange Box57.BoxExecute
277 connect Box54.BoxChange Box60.BoxExecute
278 connect Box49.BoxChange Box61.In1
279 connect Box58.BoxChange Box61.In2
280 connect Box67.Out Box62.Mesh
281 connect Box62.MeshManagerModel Box48.MeshManagerModel
282 connect Box50.Out Box37.active
283 connect Box42.BoxChange Box51.BoxExecute
284 connect Box43.BoxChange Box48.BoxExecute
285 connect Box67.Out Box48.Mesh
286 connect Box63.BoxChange Box73.In3
287 connect Box73.BoxChange Box72._execute
288 connect Box76.Point Box78.In0
289 connect Box35.Out Box83.In
290 connect Box83.Spacing Box78.In1
291 connect Box78.Out Box75.Point
292 connect Box58.Center Box88.In0
293 connect Box83.Spacing Box88.In1
294 connect Box88.Out Box89.Point
295 connect Box58.BoxChange Box89.BoxExecute
296 connect Box76.InteractorwxVtkBaseView_model Box90.InteractorwxVtkBaseView_model
297 connect Box76.InteractorwxVtkBaseView_model2 Box90.InteractorwxVtkBaseView_model2
298 connect Box64.Out Box90.wxVtkBaseView
299 connect Box65.Out Box90.wxVtkBaseView2
300 connect Box69.Out Box90.wxVtkBaseView3
301 connect Box76.InteractorwxVtkBaseView_model3 Box90.InteractorwxVtkBaseView_model3
302 connect Box96.Box_wxVtkBaseView_Info Box91.Box_wxVtkBaseView_Info
303 connect Box71.Out Box91.wxVtkBaseView
304 connect Box50.BoxChange Box91.BoxExecute
305 connect Box50.BoxChange Box90.BoxExecute
306 connect Box75.PointId Box87.In
307 connect Box75.Normal Box86.In
308 connect Box75.PointOut Box85.In
309 connect Box96.wxVtkBaseView Box89.wxVtkBaseView
310 connect Box50.Out Box89.Active
311 connect Box96.vtkRenderer Box92.Renderer
312 connect Box92.Point Box85.In1
313 connect Box92.PointId Box87.In1
314 connect Box92.Normal Box86.In1
315 connect Box75.PointOut Box94.In1
316 connect Box95.Box_ConcatStrings Box94.Box_ConcatString
317 connect Box95.Out Box58.Origin
318 connect Box98.Box_ConcatStrings Box97.Box_ConcatString
319 connect Box92.Normal Box97.In1
320 connect Box95.Box_ConcatStrings Box99.Box_ConcatString
321 connect Box92.Point Box99.In1
322 connect Box98.Box_ConcatStrings Box100.Box_ConcatString
323 connect Box75.Normal Box100.In1
324 connect Box102.Box_ConcatStrings Box101.Box_ConcatString
325 connect Box102.Box_ConcatStrings Box103.Box_ConcatString
326 connect Box75.PointId Box101.In1
327 connect Box92.PointId Box103.In1
328 connect Box98.Out Box58.NormalIn
329 connect Box76.BoxChange Box101.BoxExecute
330 connect Box92.BoxChange Box103.BoxExecute
331 connect Box103.BoxChange Box99.BoxExecute
332 connect Box99.BoxChange Box97.BoxExecute
333 connect Box101.BoxChange Box94.BoxExecute
334 connect Box94.BoxChange Box100.BoxExecute
335 connect Box104.Out Box105.In
336 connect Box105.Out Box37.scalarvisibility
337 connect Box104.Out Box107.In1
338 connect Box107.Out Box106.ColorType
339 connect Box50.Widget Box108.Widget2
340 connect Box104.Widget Box108.Widget4
341 connect Box35.Out Box106.Image
342 connect Box104.BoxChange Box109.In1
343 connect Box110.BoxChange Box106.BoxExecute
344 connect Box109.BoxChange Box110.BoxExecute
345 connect Box71.Out Box110.wxVtkBaseView
346 connect Box110.WindowColorLevel Box111.In
347 connect Box110.WindowColorLevel Box112.In
348 connect Box112.Out Box106.ColorLevel
349 connect Box111.Out Box106.ColorWindow
350 connect Box63.BoxChange Box109.In2
351 connect Box113.InteractorwxVtkBaseView_model Box114.InteractorwxVtkBaseView_model
352 connect Box113.InteractorwxVtkBaseView_model2 Box114.InteractorwxVtkBaseView_model2
353 connect Box113.InteractorwxVtkBaseView_model3 Box114.InteractorwxVtkBaseView_model3
354 connect Box83.Spacing Box115.In1
355 connect Box113.Point Box115.In0
356 connect Box95.Box_ConcatStrings Box116.Box_ConcatString
357 connect Box115.Out Box116.In1
358 connect Box113.BoxChange Box116.BoxExecute
359 connect Box50.BoxChange Box114.BoxExecute
360 connect Box64.Out Box114.wxVtkBaseView
361 connect Box65.Out Box114.wxVtkBaseView2
362 connect Box69.Out Box114.wxVtkBaseView3
363 connect Box117.Out Box119.In
364 connect Box119.Out Box118.In1
365 connect Box50.Out Box118.In2
366 connect Box37.vtkprop3D Box92.Prop3D
367 connect Box97.BoxChange Box59.In3
368 connect Box56.Widget Box44.Widget4
369 connect Box49.Widget Box44.Widget3
370 connect Box108.Widget Box44.Widget2
371 connect Box43.Widget Box44.Widget1
372 connect Box67.Out Box121.Mesh
373 connect Box62.MeshManagerModel Box121.MeshManagerModel
374 connect Box61.BoxChange Box122.BoxExecute
375 connect Box122.BoxChange Box73.In2
376 connect Box49.Out Box122.S
377 connect Box58.Center Box122.Center
378 connect Box102.Out Box122.EdgeId
379 connect Box118.Out Box122.Active
380 connect Box50.BoxChange Box61.In3
381 connect Box50.Widget Box123.CheckBoxWidget
382 connect Box42.BoxChange Box123.BoxExecute
383 connect Box124.Widget Box82.Widget4
384 connect Box42.Widget Box124.Widget2
385 connect Box67.BoxChange Box121.BoxExecute
386 connect Box62.MeshBase Box45.Mesh
387 connect Box62.MeshBase Box72._polydata
388 connect Box62.MeshBase Box37.polydata
389 connect Box62.MeshBase Box75.Mesh
390 connect Box62.MeshBase Box106.Mesh
391 connect Box62.MeshBase Box122.In
392 connect Box37.widget Box125.Widget5
393 connect Box72._widget Box125.Widget2
394 connect Box125.Widget Box79.Widget7
395 connect Box44.Widget Box126.Widget2
396 connect Box126.Widget Box79.Widget2
397 connect Box82.Widget Box79.Widget4
398
399 # Complex input ports
400 input mesh Box67.In " "
401 input image Box35.In " "
402 input title Box08.WinTitle " "
403 input meshmanagermodel Box46.In " "
404 input boxChange Box63.In " "
405 input wxvtkbaseview2 Box64.In " "
406 input wxvtkbaseview3 Box65.In " "
407 input wxvtkbaseview4 Box69.In " "
408 input wxvtkbaseview1 Box71.In " "
409
410 # Complex output ports
411 output widget Box08.Widget " "
412 output ExportIsActive_concatstring_tool Box117.Box_ConcatStrings " "
413
414
415 endefine