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