| 1 |
<scxml initial="Initialize" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camitk="http://camitk.imag.fr/3/asm" xsi:schemaLocation="http://camitk.imag.fr/3/smallScxml/../resources/smallScxml.xsd" xmlns="http://camitk.imag.fr/3/smallScxml"> |
| 2 |
<state id="Initialize"> |
| 3 |
<onentry> |
| 4 |
<camitk:onState> |
| 5 |
<camitk:description><![CDATA[This pipeline will process several actions on the input component(s): <br /> <ul><li>Open</li><li>Otsu Threshold Filter</li><li>Morphological Operators</li><li>Save As</li><li>Save As</li><li>Connected Components Classification</li><li>Save As</li><li>Manual Threshold Filter</li><li>Save As</li><li>Morphological Operators</li><li>Save As</li><li>Morphological Operators</li><li>Save As</li><li>Close</li><li>Close</li><li>Close</li><li>Close</li><li>Close</li><li>Close</li><li>Reconstruction</li><li>Save As</li><li>Save As</li><li>Close</li><li>Reconstruction</li><li>Save As</li><li>Close</li><li>Reconstruction</li><li>Save As</li><li>Save As</li><li>Clean Mesh</li><li>Save As</li></ul>]]></camitk:description> |
| 6 |
</camitk:onState> |
| 7 |
</onentry> |
| 8 |
<transition target="Open Input Image" event="Next"/> |
| 9 |
</state> |
| 10 |
<state id="Open Input Image"> |
| 11 |
<onentry> |
| 12 |
<camitk:onState> |
| 13 |
<camitk:description>Open data (component) from a file</camitk:description> |
| 14 |
<camitk:action> |
| 15 |
<camitk:name>Open File</camitk:name> |
| 16 |
<camitk:parameters> |
| 17 |
<camitk:parameter name="File Name" value="input-1.mha" type="QString"/> |
| 18 |
</camitk:parameters> |
| 19 |
<camitk:outputs> |
| 20 |
<camitk:component name="input-1.mha" type="ImageComponent"/> |
| 21 |
</camitk:outputs> |
| 22 |
</camitk:action> |
| 23 |
</camitk:onState> |
| 24 |
</onentry> |
| 25 |
<transition target="Initialize" event="Back"/> |
| 26 |
<transition target="Apply Otsu" event="Next"/> |
| 27 |
</state> |
| 28 |
<state id="Apply Otsu"> |
| 29 |
<onentry> |
| 30 |
<camitk:onState> |
| 31 |
<camitk:description><p> This filter creates a binary thresholded image that separates an image into foreground and background components. <br/>The filter calculates the optimum threshold separating those two classes so that their combined spread (intra-class variance) is minimal (see http://en.wikipedia.org/wiki/Otsu%27s_method). Then the filter applies that threshold to the input image using an Itk binary fileter. The numberOfHistogram bins can be set for the Otsu Calculator. The insideValue and outsideValue can be set for the Itk binary filter. The filter produces a labeled volume. <br/><br/>The original reference is: <br/>. <i>Otsu, ''A threshold selection method from gray level histograms,'' IEEE Trans.Syst.ManCybern.SMC-9,62-66 1979.</i></p></camitk:description> |
| 32 |
<camitk:action> |
| 33 |
<camitk:name>Otsu Threshold Filter</camitk:name> |
| 34 |
<camitk:parameters> |
| 35 |
<camitk:parameter name="Inside Value" value="0" type="int"/> |
| 36 |
<camitk:parameter name="Outside Value" value="255" type="int"/> |
| 37 |
</camitk:parameters> |
| 38 |
<camitk:inputs> |
| 39 |
<camitk:component name="input-1.mha" type="ImageComponent"/> |
| 40 |
</camitk:inputs> |
| 41 |
<camitk:outputs> |
| 42 |
<camitk:component name="output-1.mha" type="ImageComponent"/> |
| 43 |
</camitk:outputs> |
| 44 |
</camitk:action> |
| 45 |
</camitk:onState> |
| 46 |
</onentry> |
| 47 |
<transition target="Open Input Image" event="Back"> |
| 48 |
<onTransition> |
| 49 |
<camitk:close> |
| 50 |
<camitk:component name="input-1.mha" type="ImageComponent"/> |
| 51 |
</camitk:close> |
| 52 |
</onTransition> |
| 53 |
</transition> |
| 54 |
<transition target="Save Otsu Result as output-1.mha" event="Next"/> |
| 55 |
</state> |
| 56 |
<state id="Save Otsu Result as output-1.mha"> |
| 57 |
<onentry> |
| 58 |
<camitk:onState> |
| 59 |
<camitk:description>Save the currently selected data under a different filename or format</camitk:description> |
| 60 |
<camitk:action> |
| 61 |
<camitk:name>Save</camitk:name> |
| 62 |
<camitk:parameters/> |
| 63 |
<camitk:inputs> |
| 64 |
<camitk:component name="output-1.mha" type="ImageComponent"/> |
| 65 |
</camitk:inputs> |
| 66 |
</camitk:action> |
| 67 |
</camitk:onState> |
| 68 |
</onentry> |
| 69 |
<transition target="Apply Otsu" event="Back"> |
| 70 |
<onTransition> |
| 71 |
<camitk:close> |
| 72 |
<camitk:component name="output-1.mha" type="ImageComponent"/> |
| 73 |
</camitk:close> |
| 74 |
</onTransition> |
| 75 |
</transition> |
| 76 |
<transition target="Apply Erosion" event="Next"/> |
| 77 |
</state> |
| 78 |
<state id="Apply Erosion"> |
| 79 |
<onentry> |
| 80 |
<camitk:onState> |
| 81 |
<camitk:description><br/><b>Mathematical morphology</b> has proved to be a powerful resource for image processing and analysis.<br/><br/>This filter implements classical mathematical morphology operators:<ul><li>erosion</li><li>dilation</li><li>opening</li><li>closure</li></ul></camitk:description> |
| 82 |
<camitk:action> |
| 83 |
<camitk:name>Morphological Operators</camitk:name> |
| 84 |
<camitk:parameters> |
| 85 |
<camitk:parameter name="Structuring element size" value="3" type="int"/> |
| 86 |
<camitk:parameter name="Image scalar type" value="0" type="int"/> |
| 87 |
<camitk:parameter name="Type of operation" value="0" type="int"/> |
| 88 |
</camitk:parameters> |
| 89 |
<camitk:inputs> |
| 90 |
<camitk:component name="output-1.mha" type="ImageComponent"/> |
| 91 |
</camitk:inputs> |
| 92 |
<camitk:outputs> |
| 93 |
<camitk:component name="output-2.mha" type="ImageComponent"/> |
| 94 |
</camitk:outputs> |
| 95 |
</camitk:action> |
| 96 |
</camitk:onState> |
| 97 |
</onentry> |
| 98 |
<transition target="Save Otsu Result as output-1.mha" event="Back"/> |
| 99 |
<transition target="Save Erosion Result as output-2.mha" event="Next"/> |
| 100 |
</state> |
| 101 |
<state id="Save Erosion Result as output-2.mha"> |
| 102 |
<onentry> |
| 103 |
<camitk:onState> |
| 104 |
<camitk:description>Save the currently selected data under a different filename or format</camitk:description> |
| 105 |
<camitk:action> |
| 106 |
<camitk:name>Save</camitk:name> |
| 107 |
<camitk:parameters/> |
| 108 |
<camitk:inputs> |
| 109 |
<camitk:component name="output-2.mha" type="ImageComponent"/> |
| 110 |
</camitk:inputs> |
| 111 |
</camitk:action> |
| 112 |
</camitk:onState> |
| 113 |
</onentry> |
| 114 |
<transition target="Apply Erosion" event="Back"> |
| 115 |
<onTransition> |
| 116 |
<camitk:close> |
| 117 |
<camitk:component name="output-2.mha" type="ImageComponent"/> |
| 118 |
</camitk:close> |
| 119 |
</onTransition> |
| 120 |
</transition> |
| 121 |
<transition target="Apply Classification" event="Next"/> |
| 122 |
</state> |
| 123 |
|
| 124 |
<state id="Apply Classification"> |
| 125 |
<onentry> |
| 126 |
<camitk:onState> |
| 127 |
<camitk:description> Labels connected components of a binary image and order the labes with respect to the size of the connected components (i.e. the larges connected component has the label 1, the one a little smaller has the label 2, and so on... </camitk:description> |
| 128 |
<camitk:action> |
| 129 |
<camitk:name>Connected Components Classification</camitk:name> |
| 130 |
<camitk:parameters/> |
| 131 |
<camitk:inputs> |
| 132 |
<camitk:component name="output-2.mha" type="ImageComponent"/> |
| 133 |
</camitk:inputs> |
| 134 |
<camitk:outputs> |
| 135 |
<camitk:component name="output-3.mha" type="ImageComponent"/> |
| 136 |
</camitk:outputs> |
| 137 |
</camitk:action> |
| 138 |
</camitk:onState> |
| 139 |
</onentry> |
| 140 |
<transition target="Save Erosion Result as output-2.mha" event="Back"/> |
| 141 |
<transition target="Save Classification Result as output-3.mha" event="Next"/> |
| 142 |
</state> |
| 143 |
<state id="Save Classification Result as output-3.mha"> |
| 144 |
<onentry> |
| 145 |
<camitk:onState> |
| 146 |
<camitk:description>Save the currently selected data under a different filename or format</camitk:description> |
| 147 |
<camitk:action> |
| 148 |
<camitk:name>Save</camitk:name> |
| 149 |
<camitk:parameters/> |
| 150 |
<camitk:inputs> |
| 151 |
<camitk:component name="output-3.mha" type="ImageComponent"/> |
| 152 |
</camitk:inputs> |
| 153 |
</camitk:action> |
| 154 |
</camitk:onState> |
| 155 |
</onentry> |
| 156 |
<transition target="Apply Classification" event="Back"> |
| 157 |
<onTransition> |
| 158 |
<camitk:close> |
| 159 |
<camitk:component name="output-3.mha" type="ImageComponent"/> |
| 160 |
</camitk:close> |
| 161 |
</onTransition> |
| 162 |
</transition> |
| 163 |
<transition target="Apply Threshold" event="Next"/> |
| 164 |
</state> |
| 165 |
<state id="Apply Threshold"> |
| 166 |
<onentry> |
| 167 |
<camitk:onState> |
| 168 |
<camitk:description><br/>Sets all the pixels / voxels scalar value according to the following rules: <ul> <li>low threshold &lt; scalar value &lt; high threshold &gt; white (255) </li> <li>scalar value &lt; low threshold OR scalar value &gt; high threshold &gt; black (0)</li> </ul></camitk:description> |
| 169 |
<camitk:action> |
| 170 |
<camitk:name>Manual Threshold Filter</camitk:name> |
| 171 |
<camitk:parameters> |
| 172 |
<camitk:parameter name="Low Threshold" value="1.0" type="double"/> |
| 173 |
<camitk:parameter name="High Threshold" value="1.0" type="double"/> |
| 174 |
</camitk:parameters> |
| 175 |
<camitk:inputs> |
| 176 |
<camitk:component name="output-3.mha" type="ImageComponent"/> |
| 177 |
</camitk:inputs> |
| 178 |
<camitk:outputs> |
| 179 |
<camitk:component name="output-4.mha" type="ImageComponent"/> |
| 180 |
</camitk:outputs> |
| 181 |
</camitk:action> |
| 182 |
</camitk:onState> |
| 183 |
</onentry> |
| 184 |
<transition target="Save Classification Result as output-3.mha" event="Back"/> |
| 185 |
<transition target="Save Threshold Result as output-4.mha" event="Next"/> |
| 186 |
</state> |
| 187 |
<state id="Save Threshold Result as output-4.mha"> |
| 188 |
<onentry> |
| 189 |
<camitk:onState> |
| 190 |
<camitk:description>Save the currently selected data under a different filename or format</camitk:description> |
| 191 |
<camitk:action> |
| 192 |
<camitk:name>Save</camitk:name> |
| 193 |
<camitk:parameters/> |
| 194 |
<camitk:inputs> |
| 195 |
<camitk:component name="output-4.mha" type="ImageComponent"/> |
| 196 |
</camitk:inputs> |
| 197 |
</camitk:action> |
| 198 |
</camitk:onState> |
| 199 |
</onentry> |
| 200 |
<transition target="Apply Threshold" event="Back"> |
| 201 |
<onTransition> |
| 202 |
<camitk:close> |
| 203 |
<camitk:component name="output-4.mha" type="ImageComponent"/> |
| 204 |
</camitk:close> |
| 205 |
</onTransition> |
| 206 |
</transition> |
| 207 |
<transition target="Apply Dilation" event="Next"/> |
| 208 |
</state> |
| 209 |
<state id="Apply Dilation"> |
| 210 |
<onentry> |
| 211 |
<camitk:onState> |
| 212 |
<camitk:description><br/><b>Mathematical morphology</b> has proved to be a powerful resource for image processing and analysis.<br/><br/>This filter implements classical mathematical morphology operators:<ul><li>erosion</li><li>dilation</li><li>opening</li><li>closure</li></ul></camitk:description> |
| 213 |
<camitk:action> |
| 214 |
<camitk:name>Morphological Operators</camitk:name> |
| 215 |
<camitk:parameters> |
| 216 |
<camitk:parameter name="Structuring element size" value="3" type="int"/> |
| 217 |
<camitk:parameter name="Image scalar type" value="0" type="int"/> |
| 218 |
<camitk:parameter name="Type of operation" value="1" type="int"/> |
| 219 |
</camitk:parameters> |
| 220 |
<camitk:inputs> |
| 221 |
<camitk:component name="output-4.mha" type="ImageComponent"/> |
| 222 |
</camitk:inputs> |
| 223 |
<camitk:outputs> |
| 224 |
<camitk:component name="output-5.mha" type="ImageComponent"/> |
| 225 |
</camitk:outputs> |
| 226 |
</camitk:action> |
| 227 |
</camitk:onState> |
| 228 |
</onentry> |
| 229 |
<transition target="Save Threshold Result as output-4.mha" event="Back"/> |
| 230 |
<transition target="Save Dilation Result as output-5.mha" event="Next"/> |
| 231 |
</state> |
| 232 |
<state id="Save Dilation Result as output-5.mha"> |
| 233 |
<onentry> |
| 234 |
<camitk:onState> |
| 235 |
<camitk:description>Save the currently selected data under a different filename or format</camitk:description> |
| 236 |
<camitk:action> |
| 237 |
<camitk:name>Save</camitk:name> |
| 238 |
<camitk:parameters/> |
| 239 |
<camitk:inputs> |
| 240 |
<camitk:component name="output-5.mha" type="ImageComponent"/> |
| 241 |
</camitk:inputs> |
| 242 |
</camitk:action> |
| 243 |
</camitk:onState> |
| 244 |
</onentry> |
| 245 |
<transition target="Apply Dilation" event="Back"> |
| 246 |
<onTransition> |
| 247 |
<camitk:close> |
| 248 |
<camitk:component name="output-5.mha" type="ImageComponent"/> |
| 249 |
</camitk:close> |
| 250 |
</onTransition> |
| 251 |
</transition> |
| 252 |
<transition target="Apply Closure" event="Next"/> |
| 253 |
</state> |
| 254 |
<state id="Apply Closure"> |
| 255 |
<onentry> |
| 256 |
<camitk:onState> |
| 257 |
<camitk:description><br/><b>Mathematical morphology</b> has proved to be a powerful resource for image processing and analysis.<br/><br/>This filter implements classical mathematical morphology operators:<ul><li>erosion</li><li>dilation</li><li>opening</li><li>closure</li></ul></camitk:description> |
| 258 |
<camitk:action> |
| 259 |
<camitk:name>Morphological Operators</camitk:name> |
| 260 |
<camitk:parameters> |
| 261 |
<camitk:parameter name="Structuring element size" value="5" type="int"/> |
| 262 |
<camitk:parameter name="Image scalar type" value="0" type="int"/> |
| 263 |
<camitk:parameter name="Type of operation" value="3" type="int"/> |
| 264 |
</camitk:parameters> |
| 265 |
<camitk:inputs> |
| 266 |
<camitk:component name="output-5.mha" type="ImageComponent"/> |
| 267 |
</camitk:inputs> |
| 268 |
<camitk:outputs> |
| 269 |
<camitk:component name="output-6.mha" type="ImageComponent"/> |
| 270 |
</camitk:outputs> |
| 271 |
</camitk:action> |
| 272 |
</camitk:onState> |
| 273 |
</onentry> |
| 274 |
<transition target="Save Dilation Result as output-5.mha" event="Back"/> |
| 275 |
<transition target="Save Closure Result as output-6.mha" event="Next"/> |
| 276 |
</state> |
| 277 |
<state id="Save Closure Result as output-6.mha"> |
| 278 |
<onentry> |
| 279 |
<camitk:onState> |
| 280 |
<camitk:description>Save the currently selected data under a different filename or format</camitk:description> |
| 281 |
<camitk:action> |
| 282 |
<camitk:name>Save</camitk:name> |
| 283 |
<camitk:parameters/> |
| 284 |
<camitk:inputs> |
| 285 |
<camitk:component name="output-6.mha" type="ImageComponent"/> |
| 286 |
</camitk:inputs> |
| 287 |
</camitk:action> |
| 288 |
</camitk:onState> |
| 289 |
</onentry> |
| 290 |
<transition target="Apply Closure" event="Back"> |
| 291 |
<onTransition> |
| 292 |
<camitk:close> |
| 293 |
<camitk:component name="output-6.mha" type="ImageComponent"/> |
| 294 |
</camitk:close> |
| 295 |
</onTransition> |
| 296 |
</transition> |
| 297 |
<transition target="Close input-1.mha" event="Next"/> |
| 298 |
</state> |
| 299 |
<state id="Close input-1.mha"> |
| 300 |
<onentry> |
| 301 |
<camitk:onState> |
| 302 |
<camitk:description>Close the currently selected components</camitk:description> |
| 303 |
<camitk:action> |
| 304 |
<camitk:name>Close</camitk:name> |
| 305 |
<camitk:parameters/> |
| 306 |
<camitk:inputs> |
| 307 |
<camitk:component name="input-1.mha" type="ImageComponent"/> |
| 308 |
</camitk:inputs> |
| 309 |
</camitk:action> |
| 310 |
</camitk:onState> |
| 311 |
</onentry> |
| 312 |
<transition target="Save Closure Result as output-6.mha" event="Back"/> |
| 313 |
<transition target="Close output-1.mha" event="Next"/> |
| 314 |
</state> |
| 315 |
<state id="Close output-1.mha"> |
| 316 |
<onentry> |
| 317 |
<camitk:onState> |
| 318 |
<camitk:description>Close the currently selected components</camitk:description> |
| 319 |
<camitk:action> |
| 320 |
<camitk:name>Close</camitk:name> |
| 321 |
<camitk:parameters/> |
| 322 |
<camitk:inputs> |
| 323 |
<camitk:component name="output-1.mha" type="ImageComponent"/> |
| 324 |
</camitk:inputs> |
| 325 |
</camitk:action> |
| 326 |
</camitk:onState> |
| 327 |
</onentry> |
| 328 |
<transition target="Close input-1.mha" event="Back"/> |
| 329 |
<transition target="Close output-2.mha" event="Next"/> |
| 330 |
</state> |
| 331 |
<state id="Close output-2.mha"> |
| 332 |
<onentry> |
| 333 |
<camitk:onState> |
| 334 |
<camitk:description>Close the currently selected components</camitk:description> |
| 335 |
<camitk:action> |
| 336 |
<camitk:name>Close</camitk:name> |
| 337 |
<camitk:parameters/> |
| 338 |
<camitk:inputs> |
| 339 |
<camitk:component name="output-2.mha" type="ImageComponent"/> |
| 340 |
</camitk:inputs> |
| 341 |
</camitk:action> |
| 342 |
</camitk:onState> |
| 343 |
</onentry> |
| 344 |
<transition target="Close output-1.mha" event="Back"/> |
| 345 |
<transition target="Close output-3.mha" event="Next"/> |
| 346 |
</state> |
| 347 |
<state id="Close output-3.mha"> |
| 348 |
<onentry> |
| 349 |
<camitk:onState> |
| 350 |
<camitk:description>Close the currently selected components</camitk:description> |
| 351 |
<camitk:action> |
| 352 |
<camitk:name>Close</camitk:name> |
| 353 |
<camitk:parameters/> |
| 354 |
<camitk:inputs> |
| 355 |
<camitk:component name="output-3.mha" type="ImageComponent"/> |
| 356 |
</camitk:inputs> |
| 357 |
</camitk:action> |
| 358 |
</camitk:onState> |
| 359 |
</onentry> |
| 360 |
<transition target="Close output-2.mha" event="Back"/> |
| 361 |
<transition target="Close output-4.mha" event="Next"/> |
| 362 |
</state> |
| 363 |
<state id="Close output-4.mha"> |
| 364 |
<onentry> |
| 365 |
<camitk:onState> |
| 366 |
<camitk:description>Close the currently selected components</camitk:description> |
| 367 |
<camitk:action> |
| 368 |
<camitk:name>Close</camitk:name> |
| 369 |
<camitk:parameters/> |
| 370 |
<camitk:inputs> |
| 371 |
<camitk:component name="output-4.mha" type="ImageComponent"/> |
| 372 |
</camitk:inputs> |
| 373 |
</camitk:action> |
| 374 |
</camitk:onState> |
| 375 |
</onentry> |
| 376 |
<transition target="Close output-3.mha" event="Back"/> |
| 377 |
<transition target="Close output-5.mha" event="Next"/> |
| 378 |
</state> |
| 379 |
<state id="Close output-5.mha"> |
| 380 |
<onentry> |
| 381 |
<camitk:onState> |
| 382 |
<camitk:description>Close the currently selected components</camitk:description> |
| 383 |
<camitk:action> |
| 384 |
<camitk:name>Close</camitk:name> |
| 385 |
<camitk:parameters/> |
| 386 |
<camitk:inputs> |
| 387 |
<camitk:component name="output-5.mha" type="ImageComponent"/> |
| 388 |
</camitk:inputs> |
| 389 |
</camitk:action> |
| 390 |
</camitk:onState> |
| 391 |
</onentry> |
| 392 |
<transition target="Close output-4.mha" event="Back"/> |
| 393 |
<transition target="Apply Marching Cube" event="Next"/> |
| 394 |
</state> |
| 395 |
<state id="Apply Marching Cube"> |
| 396 |
<onentry> |
| 397 |
<camitk:onState> |
| 398 |
<camitk:description><br /> Marching cubes is a simple algorithm for creating a triangle mesh from an implicit function (one of the form f(x, y, z) = 0).<br /> It works by iterating ("marching") over a uniform grid of cubes superimposed over a region of the function. If all 8 vertices of the cube are positive, or all 8 vertices are negative, the cube is entirely above or entirely below the surface and no triangles are emitted. Otherwise, the cube straddles the function and some triangles and vertices are generated. Since each vertex can either be positive or negative, there are technically 28 possible configurations, but many of these are equivalent to one another. <br/> <br/>This action uses this algorithm to build a 3D surfacic mesh of the input image.</camitk:description> |
| 399 |
<camitk:action> |
| 400 |
<camitk:name>Reconstruction</camitk:name> |
| 401 |
<camitk:parameters> |
| 402 |
<camitk:parameter name="Threshold" value="127.5" type="double"/> |
| 403 |
<camitk:parameter name="Keep only largest component?" value="true" type="bool"/> |
| 404 |
<camitk:parameter name="Subsample original image?" value="true" type="bool"/> |
| 405 |
<camitk:parameter name="Subsampled image width (X)" value="16" type="int"/> |
| 406 |
<camitk:parameter name="Subsampled image height (Y)" value="16" type="int"/> |
| 407 |
<camitk:parameter name="Subsampled image depth (Z)" value="16" type="int"/> |
| 408 |
</camitk:parameters> |
| 409 |
<camitk:inputs> |
| 410 |
<camitk:component name="output-6.mha" type="ImageComponent"/> |
| 411 |
</camitk:inputs> |
| 412 |
<camitk:outputs> |
| 413 |
<camitk:component name="output-7.vtk" type="MeshComponent"/> |
| 414 |
</camitk:outputs> |
| 415 |
</camitk:action> |
| 416 |
</camitk:onState> |
| 417 |
</onentry> |
| 418 |
<transition target="Close output-5.mha" event="Back"/> |
| 419 |
<transition target="Save Marching Cube Result as output-7.vtk" event="Next"/> |
| 420 |
</state> |
| 421 |
<state id="Save Marching Cube Result as output-7.vtk"> |
| 422 |
<onentry> |
| 423 |
<camitk:onState> |
| 424 |
<camitk:description>Save the currently selected data under a different filename or format</camitk:description> |
| 425 |
<camitk:action> |
| 426 |
<camitk:name>Save</camitk:name> |
| 427 |
<camitk:parameters/> |
| 428 |
<camitk:inputs> |
| 429 |
<camitk:component name="output-7.vtk" type="MeshComponent"/> |
| 430 |
</camitk:inputs> |
| 431 |
</camitk:action> |
| 432 |
</camitk:onState> |
| 433 |
</onentry> |
| 434 |
<transition target="Apply Marching Cube" event="Back"> |
| 435 |
<onTransition> |
| 436 |
<camitk:close> |
| 437 |
<camitk:component name="output-7.vtk" type="MeshComponent"/> |
| 438 |
</camitk:close> |
| 439 |
</onTransition> |
| 440 |
</transition> |
| 441 |
<transition target="Apply Clean" event="Next"/> |
| 442 |
</state> |
| 443 |
|
| 444 |
<state id="Apply Clean"> |
| 445 |
<onentry> |
| 446 |
<camitk:onState> |
| 447 |
<camitk:description>Merge duplicate points, and/or remove unused points and/or remove degenerate cells.</camitk:description> |
| 448 |
<camitk:action> |
| 449 |
<camitk:name>Clean Mesh</camitk:name> |
| 450 |
<camitk:parameters> |
| 451 |
<camitk:parameter name="Tolerance" value="1" type="double"/> |
| 452 |
</camitk:parameters> |
| 453 |
<camitk:inputs> |
| 454 |
<camitk:component name="output-7.vtk" type="MeshComponent"/> |
| 455 |
</camitk:inputs> |
| 456 |
<camitk:outputs> |
| 457 |
<camitk:component name="output-8.vtk" type="MeshComponent"/> |
| 458 |
</camitk:outputs> |
| 459 |
</camitk:action> |
| 460 |
</camitk:onState> |
| 461 |
</onentry> |
| 462 |
<transition target="Save Marching Cube Result as output-7.vtk" event="Back"/> |
| 463 |
<transition target="Save Clean Result as output-8.vtk" event="Next"/> |
| 464 |
</state> |
| 465 |
<state id="Save Clean Result as output-8.vtk"> |
| 466 |
<onentry> |
| 467 |
<camitk:onState> |
| 468 |
<camitk:description>Save the currently selected data under a different filename or format</camitk:description> |
| 469 |
<camitk:action> |
| 470 |
<camitk:name>Save</camitk:name> |
| 471 |
<camitk:parameters/> |
| 472 |
<camitk:inputs> |
| 473 |
<camitk:component name="output-8.vtk" type="MeshComponent"/> |
| 474 |
</camitk:inputs> |
| 475 |
</camitk:action> |
| 476 |
</camitk:onState> |
| 477 |
</onentry> |
| 478 |
<transition target="Apply Clean" event="Back"> |
| 479 |
<onTransition> |
| 480 |
<camitk:close> |
| 481 |
<camitk:component name="output-8.vtk" type="MeshComponent"/> |
| 482 |
</camitk:close> |
| 483 |
</onTransition> |
| 484 |
</transition> |
| 485 |
<transition target="Close output-7.vtk" event="Next"/> |
| 486 |
</state> |
| 487 |
<state id="Close output-7.vtk"> |
| 488 |
<onentry> |
| 489 |
<camitk:onState> |
| 490 |
<camitk:description>Close the currently selected components</camitk:description> |
| 491 |
<camitk:action> |
| 492 |
<camitk:name>Close</camitk:name> |
| 493 |
<camitk:parameters/> |
| 494 |
<camitk:inputs> |
| 495 |
<camitk:component name="output-7.vtk" type="MeshComponent"/> |
| 496 |
</camitk:inputs> |
| 497 |
</camitk:action> |
| 498 |
</camitk:onState> |
| 499 |
</onentry> |
| 500 |
<transition target="Save Clean Result as output-8.vtk" event="Back"/> |
| 501 |
<transition target="Bye" event="Next"/> |
| 502 |
</state> |
| 503 |
|
| 504 |
<!-- |
| 505 |
At this stage : |
| 506 |
output-6.mha and output-8.vtk are not closed. |
| 507 |
as they were save, they should not be marked as "Modified" and the application should just close |
| 508 |
without further ado or any kind of seg fault/exception... |
| 509 |
--> |
| 510 |
|
| 511 |
<state id="Bye" final="true"> |
| 512 |
<onentry> |
| 513 |
<camitk:onState> |
| 514 |
<camitk:description><![CDATA[Thanks you for using the CamiTK Action State Machine !]]></camitk:description> |
| 515 |
</camitk:onState> |
| 516 |
</onentry> |
| 517 |
<transition target="Initialize" event="Back to the beginning"> |
| 518 |
<onTransition> |
| 519 |
<camitk:close> |
| 520 |
<camitk:component name="output-5.mha" type="ImageComponent"/> <!-- already closed, but should be ok --> |
| 521 |
<camitk:component name="output-6.mha" type="ImageComponent"/> |
| 522 |
<camitk:component name="output-7.vtk" type="MeshComponent"/> <!-- already closed, but should be ok --> |
| 523 |
<camitk:component name="output-8.vtk" type="MeshComponent"/> |
| 524 |
</camitk:close> |
| 525 |
</onTransition> |
| 526 |
</transition> |
| 527 |
</state> |
| 528 |
</scxml> |