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 # ----------------------------------
11 include creaMaracasVisu
14 define Mesh_tool_ApplySmooth creaMaracasVisu
16 author "info-dev@creatis.insa-lyon.fr"
17 description "Show N Points"
21 new wx:LayoutLine Box08
23 new vtk:UpdateRender Box11
24 set Box11.Active "true"
26 new vtk:ImageVtkProperties Box68
28 new wx:LayoutLine Box79
29 set Box79.Orientation "H"
30 set Box79.WinTitle "New Surface ( Magenta )"
32 new wx:CommandButton Box80
35 new std:MagicBox Box66
37 new std:MagicBox Box67
39 new vtk:vtkImageDataPointerRelay Box35
41 new creaMaracasVisu:PolyDataToActor_Widget Box37
42 set Box37.color "0 1 1"
43 set Box37.meshOpacity "100"
45 new wx:LayoutTab Box40
47 new wx:CommandButton Box42
48 set Box42.Label "Apply (Magenta->To Red)"
50 new wx:CommandButton Box43
51 set Box43.Label "Reset Tool"
53 new wx:LayoutLine Box44
54 set Box44.Orientation "V"
55 set Box44.WinTitle "1.1 Mesh Action"
57 new creaVtk:MeshManager_tool Box45
60 new std:MagicBox Box46
62 new std:MultipleInputs Box51
64 new std:MagicBox Box63
66 new std:MagicBox Box64
68 new std:MagicBox Box65
70 new std:MagicBox Box69
72 new std:MagicBox Box71
74 new creaMaracasVisu:MeshContours_Widget Box72
75 set Box72.colorMesh "0 1 1"
77 new wx:LayoutLine Box81
78 set Box81.WinTitle "Step 1. Surface"
80 new wx:LayoutTab Box82
82 new wx:OutputText Box84
84 new creaVtk:MeshManager Box92
86 new creaVtk:MeshManager_tool Box93
87 set Box93.BoxProcessMode "Manual"
90 new creaMaracasVisu:wxVtkBaseView_Info Box96
92 new creaVtk:PolyDataToImageData Box97
94 new vtk:CreateImage Box98
95 set Box98.OutputFormat "VTK_UNSIGNED_CHAR"
97 new vtk:ImageGaussianSmooth Box99
100 set Box99.StdDevZ "1"
102 new vtk:MarchingCubes Box100
103 set Box100.Value "128"
105 new creaVtk:MeshReduction_DecimatePro Box41
106 set Box41.TargetReduction "0.8"
108 new creaVtk:MeshManager_tool Box47
111 new creaVtk:MeshManager_tool Box48
114 new creaVtk:PolyDataNormals Box39
116 new wx:LayoutLine Box49
117 set Box49.Orientation "V"
118 set Box49.WinTitle "1.2 Apply Changes"
120 new wx:LayoutTab Box50
122 new wx:LayoutLine Box52
123 set Box52.Orientation "H"
124 set Box52.WinTitle "New Surface ( Magenta )"
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
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 " "
185 # Complex output ports
186 output widget Box08.Widget " "