]> Creatis software - creaMaracasVisu.git/blob - bbtk/bbs/boxes/Mesh_tool_ApplyExternalMask.bbs
8628f6917901d274e43fbb3e91e059f5d1e218bd
[creaMaracasVisu.git] / bbtk / bbs / boxes / Mesh_tool_ApplyExternalMask.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_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 "Refresh"
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
165 connect Box66.Out Box11.Renderer
166 connect Box35.Out Box68.In
167 connect Box66.Out Box37.render
168 connect Box79.Widget Box40.Widget2
169 connect Box80.Widget Box44.Widget5
170 connect Box46.Out Box45.MeshManagerModel
171 connect Box42.BoxChange Box51.BoxExecute
172 connect Box45.BoxChange Box51.In2
173 connect Box71.Out Box72._wxvtkbaseview3D1
174 connect Box64.Out Box72._wxvtkbaseview2D1
175 connect Box65.Out Box72._wxvtkbaseview2D2
176 connect Box69.Out Box72._wxvtkbaseview2D3
177 connect Box72._widget Box79.Widget6
178 connect Box44.Widget Box82.Widget2
179 connect Box82.Widget Box79.Widget2
180 connect Box84.Widget Box44.Widget9
181 connect Box92.MeshManagerModel Box93.MeshManagerModel
182 connect Box92.MeshBase Box72._polydata
183 connect Box92.MeshBase Box37.polydata
184 connect Box81.Widget Box08.Widget2
185 connect Box71.Out Box96.wxVtkBaseView
186 connect Box96.vtkRenderer Box66.In
187 connect Box37.widget Box79.Widget7
188 connect Box98.Out Box97.InImage
189 connect Box68.Spacing Box98.Spacing
190 connect Box68.Size Box98.Dimensions
191 connect Box67.Out Box97.InPolyData
192 connect Box99.Out Box100.In
193 connect Box100.BoxChange Box93.BoxExecute
194 connect Box100.Out Box41.In
195 connect Box92.MeshManagerModel Box47.MeshManagerModel
196 connect Box43.BoxChange Box48.BoxExecute
197 connect Box92.MeshManagerModel Box48.MeshManagerModel
198 connect Box63.BoxChange Box72._execute
199 connect Box92.MeshBase Box45.Mesh
200 connect Box47.BoxChange Box51.In5
201 connect Box80.BoxChange Box100.BoxExecute
202 connect Box37.boxchange Box11.BoxExecute
203 connect Box41.Out Box39.In
204 connect Box39.Out Box93.Mesh
205 connect Box43.Widget Box44.Widget2
206 connect Box49.Widget Box81.Widget1
207 connect Box40.Widget Box81.Widget4
208 connect Box52.Out Box53.In
209 connect Box64.Out Box54.WxVtkBaseView
210 connect Box65.Out Box54.WxVtkBaseView1
211 connect Box69.Out Box54.WxVtkBaseView2
212 connect Box54.Widget Box50.Widget4
213 connect Box52.BoxChange Box56.BoxExecute
214 connect Box97.Out Box60.In
215 connect Box60.Out Box56.In2
216 connect Box56.Out Box61.In
217 connect Box61.Out Box99.In
218 connect Box53.Out Box56.In1
219 connect Box53.Out Box54.In
220 connect Box53.Out Box83.ImageFix
221 connect Box85.Out Box83.ImageMove
222 connect Box42.BoxChange Box83.BoxExecute
223 connect Box53.Out Box87.In
224 connect Box87.TypeName Box85.OutputFormat
225 connect Box87.Spacing Box85.Spacing
226 connect Box87.Size Box85.Dimensions
227 connect Box50.Widget Box88.Widget1
228 connect Box89.Widget Box88.Widget2
229 connect Box90.Widget Box88.Widget3
230 connect Box88.Widget Box49.Widget2
231 connect Box52.Widget Box50.Widget3
232 connect Box91.Widget Box50.Widget2
233 connect Box77.Widget Box82.Widget4
234 connect Box42.Widget Box77.Widget2
235
236 # Complex input ports
237 input mesh Box67.In " "
238 input image Box35.In " "
239 input title Box08.WinTitle " "
240 input meshmanagermodel Box46.In " "
241 input boxChange Box63.In " "
242 input wxvtkbaseview2 Box64.In " "
243 input wxvtkbaseview3 Box65.In " "
244 input wxvtkbaseview4 Box69.In " "
245 input wxvtkbaseview1 Box71.In " "
246
247 # Complex output ports
248 output widget Box08.Widget " "
249
250
251 endefine