]> Creatis software - creaMaracasVisu.git/blob - bbtk/bbs/boxes/Mesh_tool_ApplyThresholdConnectivity.bbs
#3497 Mesh_tool_ApplyThresholdConnectivity
[creaMaracasVisu.git] / bbtk / bbs / boxes / Mesh_tool_ApplyThresholdConnectivity.bbs
1 # ----------------------------------
2 # - BBTKGEditor v 1.5 BBS BlackBox Script (Complex Box)
3 # - /home/davila/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplyThresholdConnectivity.bbs
4 # ----------------------------------
5
6 include std
7 include itkvtk
8 include creaMaracasVisu
9 include wx
10 include vtk
11 include std
12 include creaVtk
13
14 define Mesh_tool_ApplyThresholdConnectivity 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 "3"
24   set showNpoints.WinTitle "1.1 Points"
25
26 new wx:LayoutLine Box08
27
28 new vtk:UpdateRender Box11
29   set Box11.Active "true"
30
31 new std:MultipleInputs Box31
32
33 new creaMaracasVisu:wxPopupMenu Box57
34   set Box57.WithCtrlKey "true"
35
36 new std:AddStringToVector Box58
37   set Box58.In0 "+  Add point"
38   set Box58.In1 "(+)  Insert point"
39   set Box58.In2 "Track point"
40   set Box58.In3 "Set Nearest point"
41   set Box58.In4 "-  Erase point"
42   set Box58.In5 "--  Delete all points"
43   set Box58.In6 "----------------------"
44   set Box58.In7 "+>  Insert group after"
45   set Box58.In8 "- Delete group"
46   set Box58.In9 "Tool - Inverse Normals"
47
48 new creaMaracasVisu:ShowNPoints_Tools Box60
49
50 new vtk:ImageVtkProperties Box68
51
52 new creaVtk:BooleanOperationPolyDataFilter Box77
53   set Box77.BoxProcessMode "Manual"
54   set Box77.ReorientDifferenceCells "false"
55
56 new wx:ComboBox Box78
57   set Box78.In "Union Intersection Difference"
58
59 new wx:LayoutLine Box79
60   set Box79.Orientation "H"
61   set Box79.WinTitle "New Surface ( Magenta  =  Red+Yellow )"
62
63 new wx:CommandButton Box80
64   set Box80.Label "Refresh"
65
66 new std:MagicBox Box66
67
68 new std:MagicBox Box67
69
70 new creaMaracasVisu:PolyDataToActor_Widget Box48
71   set Box48.meshOpacity "50"
72
73 new vtk:vtkImageDataPointerRelay Box35
74
75 new creaMaracasVisu:PolyDataToActor_Widget Box37
76   set Box37.color "0 1 1"
77   set Box37.meshOpacity "100"
78
79 new wx:LayoutLine Box38
80   set Box38.Orientation "H"
81   set Box38.WinTitle "Threshold Surface (Yellow)"
82
83 new wx:LayoutTab Box39
84
85 new wx:LayoutTab Box40
86
87 new wx:CommandButton Box42
88   set Box42.Label "Apply  (Magenta->To Red)"
89
90 new wx:CommandButton Box43
91   set Box43.Label "Reset Tool"
92
93 new wx:LayoutLine Box44
94   set Box44.Orientation "V"
95   set Box44.WinTitle "1.2   Mesh Action"
96
97 new creaVtk:MeshManager_tool Box45
98   set Box45.Tool "30"
99
100 new std:MagicBox Box46
101
102 new std:MultipleInputs Box51
103
104 new creaMaracasVisu:ShowNPoints_Tools Box52
105   set Box52.Type "120"
106
107 new std:MultipleInputs Box53
108
109 new std:MultipleInputs Box55
110
111 new creaMaracasVisu:MeshContours_Widget Box62
112   set Box62.colorMesh "1 1 0"
113
114 new std:MagicBox Box63
115
116 new std:MagicBox Box64
117
118 new std:MagicBox Box65
119
120 new std:MagicBox Box69
121
122 new std:MagicBox Box71
123
124 new creaMaracasVisu:MeshContours_Widget Box72
125   set Box72.colorMesh "0 1 1"
126
127 new wx:LayoutLine Box81
128   set Box81.WinTitle "Step 1.   Surface"
129
130 new wx:LayoutTab Box82
131
132 new wx:OutputText Box84
133
134 new wx:LayoutTab Box86
135
136 new creaVtk:MeshManager Box92
137
138 new creaVtk:MeshManager_tool Box93
139   set Box93.Tool "35"
140
141 new std:MagicBox Box94
142
143 new creaMaracasVisu:wxVtkBaseView_Info Box96
144
145 new creaVtk:PolyDataNormals Box97
146
147 new wx:LayoutLine Box98
148   set Box98.Orientation "H"
149
150 new std:AddStringToVector Box99
151   set Box99.In0 "Auto Add Points (Start/Stop)"
152
153 new std:VectorFilterString Box100
154   set Box100.In0 "0  1  2   3   4   5   6   7   8      9       10 "
155   set Box100.In1 "1  5 10 20 30 40 50 0  100   110   210"
156   set Box100.Type "2"
157
158 new std:ConcatStrings Box101
159
160 new creaVtk:ImageThresholdConnectivity Box102
161   set Box102.Border "50"
162
163 new wx:LayoutLine Box105
164   set Box105.WinTitle "1.2 Surface"
165
166 new creaMaracasVisu:SliderMinMax Box106
167   set Box106.InMax "2000"
168   set Box106.InMaxShow "-500"
169   set Box106.InMin "-1100"
170   set Box106.InMinShow "-1100"
171   set Box106.ShowActual "false"
172
173 new wx:Slider Box107
174   set Box107.In "15"
175   set Box107.Label "true"
176   set Box107.Max "40"
177   set Box107.Min "0"
178   set Box107.ReactiveOnTrack "true"
179   set Box107.Title "Border size"
180
181 new wx:CommandButton Box108
182   set Box108.Label "Refresh"
183
184 new std:ConcatStrings Box110
185   set Box110.In2 "   "
186
187 new std:MultipleInputs Box111
188
189 new std:MultipleInputs Box112
190
191 new creaVtk:MarchingCubes2 Box113
192   set Box113.BoxProcessMode "Manual"
193   set Box113.Value "128"
194
195 new creaVtk:ImageGaussianSmooth2 Box114
196   set Box114.StdDevX "1"
197   set Box114.StdDevY "1"
198   set Box114.StdDevZ "1"
199
200 new std:MultipleInputs Box118
201
202 new std:MagicBox Box119
203
204 new std:MagicBox Box120
205
206 new creaMaracasVisu:ColorLayerImageView Box122
207   set Box122.ColorBarPosition "-1000 -1000"
208   set Box122.TypeControlsInterface "2"
209   set Box122.lstTransparenceBoundaries "0"
210
211
212 connect Box31.BoxChange Box11.BoxExecute
213 connect Box58.Out Box57.In
214 connect showNpoints.WidgetShowNPoints Box60.WidgetShowNPoints
215 connect Box57.BoxChange Box60.BoxExecute
216 connect Box68.Spacing Box60.Spacing
217 connect Box78.Out Box77.Operation
218 connect Box66.Out Box11.Renderer
219 connect Box66.Out showNpoints.Renderer
220 connect Box67.Out Box77.In1
221 connect Box66.Out Box48.render
222 connect Box48.boxchange Box31.In1
223 connect Box35.Out Box68.In
224 connect Box35.Out showNpoints.Image
225 connect Box66.Out Box37.render
226 connect Box38.Widget Box39.Widget2
227 connect Box79.Widget Box40.Widget2
228 connect Box46.Out Box45.MeshManagerModel
229 connect Box42.BoxChange Box51.BoxExecute
230 connect Box45.BoxChange Box51.In2
231 connect Box52.BoxChange Box51.In4
232 connect showNpoints.WidgetShowNPoints Box52.WidgetShowNPoints
233 connect Box53.BoxChange Box77.BoxExecute
234 connect Box42.BoxChange Box53.In3
235 connect Box52.BoxChange Box55.In2
236 connect Box63.BoxChange showNpoints.BoxExecute
237 connect Box64.Out Box57.wxVtkBaseView2
238 connect Box64.Out Box62._wxvtkbaseview2D1
239 connect Box65.Out Box57.wxVtkBaseView3
240 connect Box65.Out Box62._wxvtkbaseview2D2
241 connect Box69.Out Box57.wxVtkBaseView4
242 connect Box69.Out Box62._wxvtkbaseview2D3
243 connect Box71.Out Box57.wxVtkBaseView
244 connect Box71.Out Box62._wxvtkbaseview3D1
245 connect Box71.Out Box72._wxvtkbaseview3D1
246 connect Box64.Out Box72._wxvtkbaseview2D1
247 connect Box65.Out Box72._wxvtkbaseview2D2
248 connect Box69.Out Box72._wxvtkbaseview2D3
249 connect Box72._widget Box79.Widget6
250 connect Box62._widget Box38.Widget7
251 connect Box39.Widget Box81.Widget2
252 connect Box40.Widget Box81.Widget4
253 connect Box44.Widget Box82.Widget2
254 connect Box82.Widget Box79.Widget2
255 connect Box84.Widget Box44.Widget9
256 connect Box86.Widget Box38.Widget2
257 connect showNpoints.Widget Box86.Widget2
258 connect Box57.BoxChange Box08.BoxExecute
259 connect Box92.MeshManagerModel Box93.MeshManagerModel
260 connect Box77.BoxChange Box93.BoxExecute
261 connect Box92.MeshBase Box72._polydata
262 connect Box92.MeshBase Box37.polydata
263 connect Box81.Widget Box08.Widget2
264 connect Box42.Widget Box44.Widget6
265 connect Box94.BoxChange Box37.boxexecute
266 connect Box77.BoxChange Box94.BoxExecute
267 connect Box71.Out Box96.wxVtkBaseView
268 connect Box96.vtkRenderer Box66.In
269 connect Box37.widget Box79.Widget7
270 connect Box48.widget Box38.Widget8
271 connect Box77.Out Box97.In
272 connect Box97.Out Box45.Mesh
273 connect Box97.Out Box93.Mesh
274 connect Box43.Widget Box44.Widget1
275 connect Box78.Widget Box98.Widget2
276 connect Box80.Widget Box98.Widget4
277 connect Box98.Widget Box44.Widget3
278 connect Box99.Out Box58.StringVector
279 connect Box100.Out1 Box101.In1
280 connect Box101.Out Box60.Type
281 connect Box57.Out Box100.sk1
282 connect showNpoints.lstPointsX Box102.LstX
283 connect showNpoints.lstPointsY Box102.LstY
284 connect showNpoints.lstPointsZ Box102.LstZ
285 connect Box35.Out Box102.In
286 connect Box106.Widget Box105.Widget2
287 connect Box107.Out Box102.Border
288 connect Box106.OutStart Box110.In1
289 connect Box106.OutEnd Box110.In3
290 connect Box110.Out Box102.Threshold
291 connect Box105.Widget Box86.Widget5
292 connect Box63.BoxChange Box111.In1
293 connect Box31.BoxChange Box111.In3
294 connect Box111.BoxChange Box62._execute
295 connect Box63.BoxChange Box112.In1
296 connect Box37.boxchange Box112.In3
297 connect Box112.BoxChange Box72._execute
298 connect Box113.BoxChange Box31.BoxExecute
299 connect Box113.Out Box48.polydata
300 connect Box113.Out Box77.In2
301 connect Box113.Out Box62._polydata
302 connect Box113.BoxChange Box48.boxexecute
303 connect Box102.Out Box114.In
304 connect Box114.Out Box113.In
305 connect Box118.BoxChange Box113.BoxExecute
306 connect Box108.BoxChange Box118.In3
307 connect Box80.BoxChange Box53.In2
308 connect Box43.BoxChange Box118.In2
309 connect Box43.BoxChange Box120.BoxExecute
310 connect Box120.BoxChange Box53.In4
311 connect Box43.BoxChange Box55.BoxExecute
312 connect Box42.BoxChange Box118.In4
313 connect Box64.Out Box122.WxVtkBaseView
314 connect Box65.Out Box122.WxVtkBaseView1
315 connect Box69.Out Box122.WxVtkBaseView2
316 connect Box108.Widget Box105.Widget8
317 connect Box107.Widget Box105.Widget6
318 connect Box106.BoxChange Box122.BoxExecute
319 connect Box122.Widget Box105.Widget7
320 connect Box102.Out Box122.In
321
322 # Complex input ports
323 input point showNpoints.In " "
324 input mesh Box67.In " "
325 input image Box35.In " "
326 input title Box08.WinTitle " "
327 input meshmanagermodel Box46.In " "
328 input boxChange Box63.In " "
329 input wxvtkbaseview2 Box64.In " "
330 input wxvtkbaseview3 Box65.In " "
331 input wxvtkbaseview4 Box69.In " "
332 input wxvtkbaseview1 Box71.In " "
333
334 # Complex output ports
335 output widget Box08.Widget " "
336 output interactorStyleMaracas Box57.InteractorStyleMaracas " "
337 output interactorStyleMaracas2 Box57.InteractorStyleMaracas2 " "
338 output interactorStyleMaracas3 Box57.InteractorStyleMaracas3 " "
339 output interactorStyleMaracas4 Box57.InteractorStyleMaracas4 " "
340
341
342 endefine