]> Creatis software - creaMaracasVisu.git/blob - bbtk/bbs/boxes/Mesh_tool_ApplyExternalMask.bbs
fdb68b80d81d2f6d8f0d9d6ad463fa7a84cc40a0
[creaMaracasVisu.git] / bbtk / bbs / boxes / Mesh_tool_ApplyExternalMask.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_ApplyExternalMask.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
14 define Mesh_tool_ApplyExternalMask creaMaracasVisu
15
16 author "info-dev@creatis.insa-lyon.fr"
17 description "Show N Points"
18
19 category "demo"
20
21 new wx:LayoutLine Box08
22
23 new vtk:UpdateRender Box11
24   set Box11.Active "true"
25
26 new vtk:ImageVtkProperties Box68
27
28 new wx:LayoutLine Box79
29   set Box79.Orientation "H"
30   set Box79.WinTitle "New Surface ( Magenta )"
31
32 new wx:CommandButton Box80
33   set Box80.Label "Run"
34
35 new std:MagicBox Box66
36
37 new std:MagicBox Box67
38
39 new vtk:vtkImageDataPointerRelay Box35
40
41 new creaMaracasVisu:PolyDataToActor_Widget Box37
42   set Box37.color "0 1 1"
43   set Box37.meshOpacity "100"
44
45 new wx:LayoutTab Box40
46
47 new wx:CommandButton Box42
48   set Box42.Label "Apply  (Magenta->To Red)"
49
50 new wx:CommandButton Box43
51   set Box43.Label "Reset Tool"
52
53 new wx:LayoutLine Box44
54   set Box44.Orientation "V"
55   set Box44.WinTitle "Mesh Action"
56
57 new creaVtk:MeshManager_tool Box45
58   set Box45.Tool "30"
59
60 new std:MagicBox Box46
61
62 new std:MultipleInputs Box51
63
64 new std:MagicBox Box63
65
66 new std:MagicBox Box64
67
68 new std:MagicBox Box65
69
70 new std:MagicBox Box69
71
72 new std:MagicBox Box71
73
74 new creaMaracasVisu:MeshContours_Widget Box72
75   set Box72.colorMesh "0 1 1"
76
77 new wx:LayoutLine Box81
78   set Box81.WinTitle "Step 1.   Surface"
79
80 new wx:LayoutTab Box82
81
82 new wx:OutputText Box84
83
84 new creaVtk:MeshManager Box92
85
86 new creaVtk:MeshManager_tool Box93
87   set Box93.Tool "35"
88
89 new creaMaracasVisu:wxVtkBaseView_Info Box96
90
91 new creaVtk:PolyDataToImageData Box97
92
93 new vtk:CreateImage Box98
94   set Box98.OutputFormat "VTK_UNSIGNED_CHAR"
95
96 new vtk:ImageGaussianSmooth Box99
97   set Box99.StdDevX "1"
98   set Box99.StdDevY "1"
99   set Box99.StdDevZ "1"
100
101 new vtk:MarchingCubes Box100
102   set Box100.BoxProcessMode "Manual"
103   set Box100.Value "128"
104
105 new creaVtk:MeshReduction_DecimatePro Box41
106   set Box41.TargetReduction "0.8"
107
108 new creaVtk:MeshManager_tool Box47
109   set Box47.Tool "35"
110
111 new creaVtk:MeshManager_tool Box48
112   set Box48.Tool "35"
113
114 new creaVtk:PolyDataNormals Box39
115
116 new wx:LayoutTab Box49
117
118 new wx:LayoutLine Box50
119
120 new wx:ButtonSelectFilesDirectory Box52
121   set Box52.Label "Read .mhd"
122
123 new vtk:MetaImageReader Box53
124
125 new creaMaracasVisu:ColorLayerImageView Box54
126   set Box54.ColorBarPosition "-100 -100"
127   set Box54.TypeControlsInterface "2"
128   set Box54.lstTransparenceBoundaries "0"
129
130 new vtk:BinaryOperations Box56
131   set Box56.BoxProcessMode "Manual"
132
133 new vtk:ImageCastToUShort Box60
134
135 new creaVtk:ImageThreshold Box61
136   set Box61.InValue "255"
137   set Box61.Lower "128"
138   set Box61.OutValue "0"
139   set Box61.Upper "100000"
140
141 new vtk:InversCrop Box83
142   set Box83.BoxProcessMode "manual"
143   set Box83.Origin "0 0 0"
144   set Box83.Type "1"
145
146 new vtk:CreateImage Box85
147
148 new vtk:ImageVtkProperties Box87
149
150 new wx:LayoutLine Box88
151   set Box88.Orientation "H"
152   set Box88.WinTitle "External Mask"
153
154 new wx:OutputText Box89
155
156 new wx:OutputText Box90
157
158 new wx:OutputText Box91
159
160 new wx:LayoutLine Box77
161   set Box77.Orientation "V"
162   set Box77.WinTitle "Apply Changes"
163
164 new std:ConcatStrings Box78
165
166 new wx:CommandButton Box86
167   set Box86.Label "Run Contour Application"
168
169 new std:ExecSystemCommand Box94
170
171 new std:ConcatStrings Box95
172   set Box95.In1 "bbi    ia-01/ia-000302-contour.bbs "
173   set Box95.In2 "BaseImageFileName="
174   set Box95.In4 "   OutDir="
175
176 new std:StringSelect Box101
177
178 new std:ConcatStrings Box102
179   set Box102.In1 "start /b  "
180
181 new std:Configuration Box103
182
183 new std:ConcatStrings Box104
184
185 new std:ConcatStrings Box105
186
187 new std:ConcatStrings Box106
188   set Box106.In2 "contour-tmp-Imge.mhd"
189
190 new creaVtk:PolyDataToImageData Box107
191
192 new vtk:MetaImageWriter Box108
193   set Box108.Compression "true"
194
195 new vtk:CreateImage Box109
196
197 new vtk:ImageVtkProperties Box110
198
199 new creaVtk:MeshManager Box113
200
201 new creaVtk:MeshManager_tool Box114
202   set Box114.Tool "35"
203
204 new std:ConcatStrings Box115
205
206 new std:ConcatStrings_tool Box116
207   set Box116.Type "1"
208
209 new std:MultipleInputs Box117
210
211 new std:ConcatStrings Box120
212
213 new std:ConcatStrings_tool Box121
214   set Box121.Type "1"
215
216
217 connect Box66.Out Box11.Renderer
218 connect Box35.Out Box68.In
219 connect Box66.Out Box37.render
220 connect Box79.Widget Box40.Widget2
221 connect Box80.Widget Box44.Widget5
222 connect Box46.Out Box45.MeshManagerModel
223 connect Box42.BoxChange Box51.BoxExecute
224 connect Box45.BoxChange Box51.In2
225 connect Box71.Out Box72._wxvtkbaseview3D1
226 connect Box64.Out Box72._wxvtkbaseview2D1
227 connect Box65.Out Box72._wxvtkbaseview2D2
228 connect Box69.Out Box72._wxvtkbaseview2D3
229 connect Box72._widget Box79.Widget6
230 connect Box44.Widget Box82.Widget2
231 connect Box82.Widget Box79.Widget2
232 connect Box84.Widget Box44.Widget9
233 connect Box92.MeshManagerModel Box93.MeshManagerModel
234 connect Box92.MeshBase Box72._polydata
235 connect Box92.MeshBase Box37.polydata
236 connect Box81.Widget Box08.Widget2
237 connect Box71.Out Box96.wxVtkBaseView
238 connect Box96.vtkRenderer Box66.In
239 connect Box37.widget Box79.Widget7
240 connect Box98.Out Box97.InImage
241 connect Box68.Spacing Box98.Spacing
242 connect Box68.Size Box98.Dimensions
243 connect Box67.Out Box97.InPolyData
244 connect Box99.Out Box100.In
245 connect Box100.BoxChange Box93.BoxExecute
246 connect Box100.Out Box41.In
247 connect Box92.MeshManagerModel Box47.MeshManagerModel
248 connect Box43.BoxChange Box48.BoxExecute
249 connect Box92.MeshManagerModel Box48.MeshManagerModel
250 connect Box63.BoxChange Box72._execute
251 connect Box92.MeshBase Box45.Mesh
252 connect Box47.BoxChange Box51.In5
253 connect Box80.BoxChange Box100.BoxExecute
254 connect Box37.boxchange Box11.BoxExecute
255 connect Box41.Out Box39.In
256 connect Box39.Out Box93.Mesh
257 connect Box43.Widget Box44.Widget2
258 connect Box49.Widget Box81.Widget1
259 connect Box40.Widget Box81.Widget4
260 connect Box52.Out Box53.In
261 connect Box64.Out Box54.WxVtkBaseView
262 connect Box65.Out Box54.WxVtkBaseView1
263 connect Box69.Out Box54.WxVtkBaseView2
264 connect Box52.BoxChange Box56.BoxExecute
265 connect Box97.Out Box60.In
266 connect Box60.Out Box56.In2
267 connect Box56.Out Box61.In
268 connect Box61.Out Box99.In
269 connect Box53.Out Box56.In1
270 connect Box53.Out Box54.In
271 connect Box53.Out Box83.ImageFix
272 connect Box85.Out Box83.ImageMove
273 connect Box42.BoxChange Box83.BoxExecute
274 connect Box53.Out Box87.In
275 connect Box87.TypeName Box85.OutputFormat
276 connect Box87.Spacing Box85.Spacing
277 connect Box87.Size Box85.Dimensions
278 connect Box50.Widget Box88.Widget1
279 connect Box89.Widget Box88.Widget2
280 connect Box90.Widget Box88.Widget3
281 connect Box88.Widget Box49.Widget2
282 connect Box52.Widget Box50.Widget3
283 connect Box91.Widget Box50.Widget2
284 connect Box77.Widget Box82.Widget4
285 connect Box42.Widget Box77.Widget2
286 connect Box78.Out Box08.WinTitle
287 connect Box54.Widget Box50.Widget7
288 connect Box86.Widget Box50.Widget4
289 connect Box95.Out Box101.In0
290 connect Box95.Out Box102.In2
291 connect Box102.Out Box101.In1
292 connect Box95.Out Box101.In2
293 connect Box103.SystemType Box101.In
294 connect Box104.Out Box95.In3
295 connect Box105.Out Box95.In5
296 connect Box105.Out Box106.In1
297 connect Box107.Out Box108.In
298 connect Box109.Out Box107.InImage
299 connect Box110.TypeName Box109.OutputFormat
300 connect Box110.Spacing Box109.Spacing
301 connect Box110.Size Box109.Dimensions
302 connect Box113.MeshManagerModel Box114.MeshManagerModel
303 connect Box67.Out Box114.Mesh
304 connect Box35.Out Box110.In
305 connect Box113.MeshBase Box107.InPolyData
306 connect Box115.Out Box94.In
307 connect Box101.Out Box116.In1
308 connect Box115.Box_ConcatStrings Box116.Box_ConcatString
309 connect Box86.BoxChange Box117.BoxExecute
310 connect Box114.BoxChange Box117.In1
311 connect Box106.Out Box121.In1
312 connect Box120.Box_ConcatStrings Box121.Box_ConcatString
313 connect Box120.Out Box108.Filename
314 connect Box116.BoxChange Box117.In5
315 connect Box121.BoxChange Box117.In2
316 connect Box108.BoxChange Box117.In6
317 connect Box108.BoxChange Box94.BoxExecute
318
319 # Complex input ports
320 input mesh Box67.In " "
321 input image Box35.In " "
322 input meshmanagermodel Box46.In " "
323 input boxChange Box63.In " "
324 input wxvtkbaseview2 Box64.In " "
325 input wxvtkbaseview3 Box65.In " "
326 input wxvtkbaseview4 Box69.In " "
327 input wxvtkbaseview1 Box71.In " "
328 input title Box78.In1 " "
329 input BaseImageFileName Box104.In1 " "
330 input OutDir Box105.In1 " "
331
332 # Complex output ports
333 output widget Box08.Widget " "
334
335 exec Box45
336
337 endefine