]> Creatis software - creaMaracasVisu.git/blob - bbtk/bbs/boxes/Mesh_tool_ApplyCut.bbs
40d33841cf89cf89238769e08c18c155f5b09489
[creaMaracasVisu.git] / bbtk / bbs / boxes / Mesh_tool_ApplyCut.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_ApplyCut.bbs
4 # ----------------------------------
5
6 include std
7 include itkvtk
8 include creaMaracasVisu
9 include creaVtk
10 include wx
11 include vtk
12 include std
13
14 define Mesh_tool_ApplyCut creaMaracasVisu
15
16 author "info-dev@creatis.insa-lyon.fr"
17 description "Show N Points"
18
19 category "demo"
20
21 new creaMaracasVisu:ShowNPoints showNpoints
22   set showNpoints.Radio "2"
23   set showNpoints.Type "4"
24   set showNpoints.WinTitle "1.1   Splines"
25
26 new creaVtk:CreateMeshFromPoints Box04
27   set Box04.CloseSurface "true"
28
29 new creaMaracasVisu:ManualContourModel_Box Box06
30   set Box06.DoubleContour "1"
31   set Box06.NbPoints "100"
32   set Box06.OpenClose "true"
33   set Box06.OpenClose2 "false"
34
35 new wx:LayoutLine Box08
36
37 new vtk:UpdateRender Box11
38   set Box11.Active "true"
39
40 new creaMaracasVisu:DrawAxisTree3D Box30
41   set Box30.Colour "0 0 1"
42   set Box30.LineWidth "2"
43
44 new std:MultipleInputs Box31
45
46 new creaMaracasVisu:ManualContourModel_Box Box29
47   set Box29.NbPoints "40"
48   set Box29.OpenClose "true"
49   set Box29.OpenClose2 "false"
50
51 new creaMaracasVisu:wxPopupMenu Box57
52   set Box57.WithCtrlKey "true"
53
54 new std:AddStringToVector Box58
55   set Box58.In0 "+  Add point"
56   set Box58.In1 "(+)  Insert point"
57   set Box58.In2 "Track point"
58   set Box58.In3 "Set Nearest point"
59   set Box58.In4 "-  Erase point"
60   set Box58.In5 "--  Delete all points"
61   set Box58.In6 "----------------------"
62   set Box58.In7 "+>  Insert group after"
63   set Box58.In8 "- Delete group"
64   set Box58.In9 "Tool - Inverse Normals"
65
66 new creaMaracasVisu:ShowNPoints_Tools Box60
67
68 new vtk:ImageVtkProperties Box68
69
70 new std:VectorFilterDouble Box70
71   set Box70.Type "11"
72
73 new creaVtk:BooleanOperationPolyDataFilter Box77
74   set Box77.BoxProcessMode "Manual"
75   set Box77.ReorientDifferenceCells "false"
76
77 new wx:ComboBox Box78
78   set Box78.In "Union Intersection Difference"
79
80 new wx:LayoutLine Box79
81   set Box79.Orientation "H"
82   set Box79.WinTitle "New Surface ( Magenta  =  Red+Yellow )"
83
84 new wx:CommandButton Box80
85   set Box80.Label "Refresh"
86
87 new std:MagicBox Box66
88
89 new std:MagicBox Box67
90
91 new creaMaracasVisu:PolyDataToActor_Widget Box48
92
93 new vtk:vtkImageDataPointerRelay Box35
94
95 new wx:Slider Box34
96   set Box34.In "50"
97   set Box34.Label "true"
98   set Box34.Max "100"
99   set Box34.Min "0"
100   set Box34.ReactiveOnTrack "true"
101   set Box34.Title "Splines Opacity"
102
103 new std:Div Box36
104   set Box36.In2 "100"
105
106 new creaMaracasVisu:PolyDataToActor_Widget Box37
107   set Box37.color "0 1 1"
108   set Box37.meshOpacity "100"
109
110 new wx:LayoutLine Box38
111   set Box38.Orientation "H"
112   set Box38.WinTitle "Interpolated Surface (Yellow)"
113
114 new wx:LayoutTab Box39
115
116 new wx:LayoutTab Box40
117
118 new wx:CommandButton Box42
119   set Box42.Label "Apply  (Magenta->To Red)"
120
121 new wx:CommandButton Box43
122   set Box43.Label "Reset Tool"
123
124 new wx:LayoutLine Box44
125   set Box44.Orientation "V"
126   set Box44.WinTitle "1.2   Mesh Action"
127
128 new creaVtk:MeshManager_tool Box45
129   set Box45.Tool "30"
130
131 new std:MagicBox Box46
132
133 new wx:ComboBox Box49
134   set Box49.In "25 50 100 150"
135   set Box49.Selection "1"
136   set Box49.Title "Number of Points"
137
138 new wx:LayoutLine Box50
139   set Box50.Orientation "V"
140   set Box50.WinTitle "Config"
141
142 new std:MultipleInputs Box51
143
144 new creaMaracasVisu:ShowNPoints_Tools Box52
145   set Box52.Type "120"
146
147 new std:MultipleInputs Box53
148
149 new std:MultipleInputs Box55
150
151 new creaMaracasVisu:MeshContours_Widget Box62
152   set Box62.colorMesh "1 1 0"
153
154 new std:MagicBox Box63
155
156 new std:MagicBox Box64
157
158 new std:MagicBox Box65
159
160 new std:MagicBox Box69
161
162 new std:MagicBox Box71
163
164 new creaMaracasVisu:MeshContours_Widget Box72
165   set Box72.colorMesh "0 1 1"
166
167 new wx:LayoutLine Box81
168   set Box81.WinTitle "Step 1.   Surface"
169
170 new wx:LayoutTab Box82
171
172 new wx:OutputText Box84
173
174 new wx:LayoutTab Box86
175
176 new creaVtk:MeshManager Box92
177
178 new creaVtk:MeshManager_tool Box93
179   set Box93.Tool "35"
180
181 new std:MagicBox Box94
182
183 new creaMaracasVisu:wxVtkBaseView_Info Box96
184
185 new creaVtk:PolyDataNormals Box97
186
187 new wx:LayoutLine Box98
188   set Box98.Orientation "H"
189
190 new std:AddStringToVector Box99
191   set Box99.In0 "Auto Add Points (Start/Stop)"
192
193 new std:VectorFilterString Box100
194   set Box100.In0 "0  1  2   3   4   5   6   7   8      9       10    11    12"
195   set Box100.In1 "1  5 10 20 30 40 50 0  100   110   210    300   310"
196   set Box100.Type "2"
197
198 new std:ConcatStrings Box101
199
200 new wx:CheckBox Box103
201   set Box103.In "false"
202   set Box103.ReactiveOnKeystroke "true"
203   set Box103.Title "Show Normals"
204
205 new creaVtk:GlyphPolyDataNormals Box104
206   set Box104.MaskRatio "2"
207   set Box104.Opacity "1"
208   set Box104.Size "5"
209
210 new creaVtk:PolyDataNormals Box105
211
212 new std:AddStringToVector Box113
213   set Box113.In0 "Create expanded surface"
214   set Box113.In1 "Create adjustable thickness surface"
215
216 new std:ConcatStrings Box114
217   set Box114.In2 " -1"
218
219 new std:ConcatStrings Box115
220   set Box115.In2 " 1"
221
222 new wx:CommandButton Box116
223   set Box116.Label "-"
224
225 new wx:CommandButton Box117
226   set Box117.Label "+"
227
228 new creaMaracasVisu:ShowNPoints_Tools Box118
229   set Box118.BoxProcessMode "Manual"
230   set Box118.Type "320"
231
232 new creaMaracasVisu:ShowNPoints_Tools Box119
233   set Box119.BoxProcessMode "Manual"
234   set Box119.Type "320"
235
236 new wx:LayoutLine Box120
237   set Box120.Orientation "H"
238
239 new std:GetVectorDoubleSubVector Box121
240   set Box121.ErrorValue "0"
241   set Box121.I "0"
242   set Box121.Size "3"
243
244 new std:ConcatStrings Box123
245   set Box123.In2 " -1"
246
247 new std:ConcatStrings Box124
248   set Box124.In2 " 1"
249
250 new wx:CommandButton Box125
251   set Box125.Label "-"
252
253 new wx:CommandButton Box126
254   set Box126.Label "+"
255
256 new creaMaracasVisu:ShowNPoints_Tools Box127
257   set Box127.BoxProcessMode "Manual"
258   set Box127.Type "330"
259
260 new creaMaracasVisu:ShowNPoints_Tools Box128
261   set Box128.BoxProcessMode "Manual"
262   set Box128.Type "330"
263
264 new std:GetVectorDoubleSubVector Box130
265   set Box130.ErrorValue "0"
266   set Box130.I "3"
267   set Box130.Size "3"
268
269 new wx:LayoutLine Box131
270   set Box131.Orientation "H"
271
272 new wx:OutputText Box132
273   set Box132.In "Expand area"
274
275 new wx:OutputText Box133
276   set Box133.In "Widen"
277
278
279 connect Box06.LstContourPointsX Box04.LstX
280 connect showNpoints.lstIndexs Box06.LstIndexsIn
281 connect Box06.LstContourPointsY Box04.LstY
282 connect Box06.LstContourPointsZ Box04.LstZ
283 connect Box06.LstIndexsOut Box04.LstIndexs
284 connect Box30.BoxChange Box31.In4
285 connect showNpoints.lstIndexs Box29.LstIndexsIn
286 connect Box29.LstContourPointsX Box30.lstPointX
287 connect Box29.LstContourPointsY Box30.lstPointY
288 connect Box29.LstContourPointsZ Box30.lstPointZ
289 connect Box29.LstIndexsOut Box30.lstIndexs
290 connect Box31.BoxChange Box11.BoxExecute
291 connect showNpoints.WidgetShowNPoints Box60.WidgetShowNPoints
292 connect Box57.BoxChange Box60.BoxExecute
293 connect Box68.Spacing Box60.Spacing
294 connect showNpoints.lstPointsX Box70.In0
295 connect showNpoints.lstPointsY Box70.In1
296 connect showNpoints.lstPointsZ Box70.In2
297 connect Box70.Out0 Box06.LstControlPointsX
298 connect Box70.Out1 Box06.LstControlPointsY
299 connect Box70.Out2 Box06.LstControlPointsZ
300 connect Box70.Out0 Box29.LstControlPointsX
301 connect Box70.Out1 Box29.LstControlPointsY
302 connect Box70.Out2 Box29.LstControlPointsZ
303 connect Box78.Out Box77.Operation
304 connect Box66.Out Box11.Renderer
305 connect Box66.Out Box30.Renderer
306 connect Box66.Out showNpoints.Renderer
307 connect Box67.Out Box77.In1
308 connect Box04.Out Box48.polydata
309 connect Box66.Out Box48.render
310 connect showNpoints.BoxChange Box31.BoxExecute
311 connect Box48.boxchange Box31.In1
312 connect Box35.Out Box68.In
313 connect Box68.Spacing Box70.k1
314 connect Box35.Out showNpoints.Image
315 connect Box34.Out Box36.In1
316 connect Box36.Out Box30.Opacity
317 connect Box34.BoxChange Box31.In2
318 connect Box66.Out Box37.render
319 connect Box38.Widget Box39.Widget2
320 connect Box79.Widget Box40.Widget2
321 connect Box46.Out Box45.MeshManagerModel
322 connect Box49.OutString Box06.NbPoints
323 connect Box42.BoxChange Box51.BoxExecute
324 connect Box45.BoxChange Box51.In2
325 connect Box52.BoxChange Box51.In4
326 connect showNpoints.WidgetShowNPoints Box52.WidgetShowNPoints
327 connect Box80.BoxChange Box53.In2
328 connect Box53.BoxChange Box77.BoxExecute
329 connect Box42.BoxChange Box53.In3
330 connect Box43.BoxChange Box55.BoxExecute
331 connect Box52.BoxChange Box55.In2
332 connect Box43.BoxChange Box53.In6
333 connect Box63.BoxChange showNpoints.BoxExecute
334 connect Box63.BoxChange Box62._execute
335 connect Box64.Out Box57.wxVtkBaseView2
336 connect Box64.Out Box62._wxvtkbaseview2D1
337 connect Box65.Out Box57.wxVtkBaseView3
338 connect Box65.Out Box62._wxvtkbaseview2D2
339 connect Box69.Out Box57.wxVtkBaseView4
340 connect Box69.Out Box62._wxvtkbaseview2D3
341 connect Box71.Out Box57.wxVtkBaseView
342 connect Box71.Out Box62._wxvtkbaseview3D1
343 connect Box04.Out Box62._polydata
344 connect Box71.Out Box72._wxvtkbaseview3D1
345 connect Box64.Out Box72._wxvtkbaseview2D1
346 connect Box65.Out Box72._wxvtkbaseview2D2
347 connect Box69.Out Box72._wxvtkbaseview2D3
348 connect Box72._widget Box79.Widget6
349 connect Box62._widget Box38.Widget7
350 connect Box39.Widget Box81.Widget2
351 connect Box40.Widget Box81.Widget4
352 connect Box44.Widget Box82.Widget2
353 connect Box82.Widget Box79.Widget2
354 connect Box84.Widget Box44.Widget9
355 connect Box86.Widget Box38.Widget2
356 connect Box50.Widget Box86.Widget4
357 connect showNpoints.Widget Box86.Widget2
358 connect Box49.Widget Box50.Widget2
359 connect Box34.Widget Box50.Widget4
360 connect Box57.BoxChange Box08.BoxExecute
361 connect Box92.MeshManagerModel Box93.MeshManagerModel
362 connect Box77.BoxChange Box93.BoxExecute
363 connect Box92.MeshBase Box72._polydata
364 connect Box92.MeshBase Box37.polydata
365 connect Box37.boxchange Box72._execute
366 connect Box81.Widget Box08.Widget2
367 connect Box42.Widget Box44.Widget6
368 connect Box94.BoxChange Box37.boxexecute
369 connect Box77.BoxChange Box94.BoxExecute
370 connect Box71.Out Box96.wxVtkBaseView
371 connect Box96.vtkRenderer Box66.In
372 connect Box37.widget Box79.Widget7
373 connect Box48.widget Box38.Widget8
374 connect Box77.Out Box97.In
375 connect Box97.Out Box45.Mesh
376 connect Box97.Out Box93.Mesh
377 connect Box43.Widget Box44.Widget1
378 connect Box78.Widget Box98.Widget2
379 connect Box80.Widget Box98.Widget4
380 connect Box98.Widget Box44.Widget3
381 connect Box99.Out Box58.StringVector
382 connect Box100.Out1 Box101.In1
383 connect Box101.Out Box60.Type
384 connect Box57.Out Box100.sk1
385 connect Box103.Out Box104.Active
386 connect Box66.Out Box104.Renderer
387 connect Box103.BoxChange Box104.BoxExecute
388 connect Box104.BoxChange Box31.In6
389 connect Box04.Out Box105.In
390 connect Box105.Out Box104.In
391 connect Box58.Out Box113.StringVector
392 connect Box113.Out Box57.In
393 connect Box67.Out Box60.Mesh
394 connect Box117.BoxChange Box119.BoxExecute
395 connect Box116.BoxChange Box118.BoxExecute
396 connect Box114.Out Box118.Params
397 connect Box115.Out Box119.Params
398 connect showNpoints.WidgetShowNPoints Box119.WidgetShowNPoints
399 connect showNpoints.WidgetShowNPoints Box118.WidgetShowNPoints
400 connect Box116.Widget Box120.Widget1
401 connect Box117.Widget Box120.Widget3
402 connect Box120.Widget Box50.Widget9
403 connect Box121.Out Box114.In1
404 connect Box121.Out Box115.In1
405 connect Box126.BoxChange Box128.BoxExecute
406 connect Box125.BoxChange Box127.BoxExecute
407 connect Box123.Out Box127.Params
408 connect Box124.Out Box128.Params
409 connect Box130.Out Box123.In1
410 connect Box130.Out Box124.In1
411 connect showNpoints.WidgetShowNPoints Box128.WidgetShowNPoints
412 connect showNpoints.WidgetShowNPoints Box127.WidgetShowNPoints
413 connect Box125.Widget Box131.Widget1
414 connect Box126.Widget Box131.Widget3
415 connect Box103.Widget Box50.Widget5
416 connect Box131.Widget Box50.Widget7
417 connect Box132.Widget Box50.Widget8
418 connect Box133.Widget Box50.Widget6
419 connect Box105.Out Box77.In2
420 connect Box60.Out Box130.In
421 connect Box60.Out Box121.In
422
423 # Complex input ports
424 input point showNpoints.In " "
425 input mesh Box67.In " "
426 input image Box35.In " "
427 input title Box08.WinTitle " "
428 input meshmanagermodel Box46.In " "
429 input boxChange Box63.In " "
430 input wxvtkbaseview2 Box64.In " "
431 input wxvtkbaseview3 Box65.In " "
432 input wxvtkbaseview4 Box69.In " "
433 input wxvtkbaseview1 Box71.In " "
434
435 # Complex output ports
436 output widget Box08.Widget " "
437 output interactorStyleMaracas Box57.InteractorStyleMaracas " "
438 output interactorStyleMaracas3 Box57.InteractorStyleMaracas3 " "
439 output interactorStyleMaracas4 Box57.InteractorStyleMaracas4 " "
440 output interactorStyleMaracas2 Box57.InteractorStyleMaracas2 " "
441
442
443 endefine