]> Creatis software - creaMaracasVisu.git/blob - bbtk/bbs/boxes/Mesh_tool_ApplySmooth.bbs
8ce709e78ce1236fc1fae774c4457f8591edf3e9
[creaMaracasVisu.git] / bbtk / bbs / boxes / Mesh_tool_ApplySmooth.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_ApplySmooth.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_ApplySmooth 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 "1.1 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.BoxProcessMode "Manual"
88   set Box93.Tool "35"
89
90 new creaMaracasVisu:wxVtkBaseView_Info Box96
91
92 new creaVtk:PolyDataToImageData Box97
93
94 new vtk:CreateImage Box98
95   set Box98.OutputFormat "VTK_UNSIGNED_CHAR"
96
97 new vtk:ImageGaussianSmooth Box99
98   set Box99.StdDevX "1"
99   set Box99.StdDevY "1"
100   set Box99.StdDevZ "1"
101
102 new vtk:MarchingCubes Box100
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:LayoutLine Box49
117   set Box49.Orientation "V"
118   set Box49.WinTitle "1.2 Apply Changes"
119
120 new wx:LayoutTab Box50
121
122 new wx:LayoutLine Box52
123   set Box52.Orientation "H"
124   set Box52.WinTitle "New Surface ( Magenta )"
125
126
127 connect Box66.Out Box11.Renderer
128 connect Box35.Out Box68.In
129 connect Box66.Out Box37.render
130 connect Box79.Widget Box40.Widget2
131 connect Box80.Widget Box44.Widget5
132 connect Box46.Out Box45.MeshManagerModel
133 connect Box71.Out Box72._wxvtkbaseview3D1
134 connect Box64.Out Box72._wxvtkbaseview2D1
135 connect Box65.Out Box72._wxvtkbaseview2D2
136 connect Box69.Out Box72._wxvtkbaseview2D3
137 connect Box44.Widget Box82.Widget2
138 connect Box82.Widget Box79.Widget2
139 connect Box84.Widget Box44.Widget9
140 connect Box92.MeshManagerModel Box93.MeshManagerModel
141 connect Box92.MeshBase Box72._polydata
142 connect Box92.MeshBase Box37.polydata
143 connect Box81.Widget Box08.Widget2
144 connect Box71.Out Box96.wxVtkBaseView
145 connect Box96.vtkRenderer Box66.In
146 connect Box98.Out Box97.InImage
147 connect Box68.Spacing Box98.Spacing
148 connect Box68.Size Box98.Dimensions
149 connect Box67.Out Box97.InPolyData
150 connect Box97.Out Box99.In
151 connect Box99.Out Box100.In
152 connect Box40.Widget Box81.Widget2
153 connect Box100.Out Box41.In
154 connect Box43.BoxChange Box48.BoxExecute
155 connect Box92.MeshManagerModel Box48.MeshManagerModel
156 connect Box63.BoxChange Box72._execute
157 connect Box92.MeshBase Box45.Mesh
158 connect Box37.boxchange Box11.BoxExecute
159 connect Box41.Out Box39.In
160 connect Box39.Out Box93.Mesh
161 connect Box43.Widget Box44.Widget2
162 connect Box42.Widget Box49.Widget2
163 connect Box42.BoxChange Box51.BoxExecute
164 connect Box45.BoxChange Box51.In2
165 connect Box80.BoxChange Box93.BoxExecute
166 connect Box47.BoxChange Box51.In5
167 connect Box92.MeshManagerModel Box47.MeshManagerModel
168 connect Box49.Widget Box50.Widget2
169 connect Box50.Widget Box79.Widget4
170 connect Box72._widget Box52.Widget2
171 connect Box37.widget Box52.Widget4
172 connect Box52.Widget Box79.Widget6
173
174 # Complex input ports
175 input mesh Box67.In " "
176 input image Box35.In " "
177 input title Box08.WinTitle " "
178 input meshmanagermodel Box46.In " "
179 input boxChange Box63.In " "
180 input wxvtkbaseview2 Box64.In " "
181 input wxvtkbaseview3 Box65.In " "
182 input wxvtkbaseview4 Box69.In " "
183 input wxvtkbaseview1 Box71.In " "
184
185 # Complex output ports
186 output widget Box08.Widget " "
187
188
189 endefine