1 |
// |
2 |
// time: Wed Dec 15 13:01:01 2004 |
3 |
// |
4 |
// version: 3.2.0 (format), 4.3.2 (DX) |
5 |
// |
6 |
// |
7 |
// MODULE main |
8 |
// workspace: width = 232, height = 522 |
9 |
// layout: snap = 0, width = 50, height = 50, align = NN |
10 |
// |
11 |
// $Id$ |
12 |
macro main( |
13 |
) -> ( |
14 |
) { |
15 |
// |
16 |
// node Sequencer[1]: x = 10, y = 10, inputs = 7, label = Sequencer |
17 |
// input[1]: defaulting = 0, visible = 0, type = 32, value = "Sequencer_1" |
18 |
// input[4]: defaulting = 1, visible = 1, type = 1, value = 1 |
19 |
// input[5]: defaulting = 1, visible = 1, type = 1, value = 100 |
20 |
// input[6]: defaulting = 1, visible = 0, type = 1, value = 1 |
21 |
// input[7]: defaulting = 0, visible = 0, type = 16777217, value = { 1 100 1 1 51 1 } |
22 |
// vcr[1]: min = 1, max = 100, beg = 1, end = 51, cur = 1, inc = 1, loop = off, step = off, pal = off |
23 |
// window: position = (0.0000,0.0000), size = 0.2188x0.0781 |
24 |
// |
25 |
main_Sequencer_1_out_1 = @frame; |
26 |
// |
27 |
// node Format[1]: x = 14, y = 100, inputs = 3, label = Format |
28 |
// input[1]: defaulting = 0, visible = 1, type = 32, value = "T%d.dx" |
29 |
// |
30 |
main_Format_1_out_1 = |
31 |
Format( |
32 |
main_Format_1_in_1, |
33 |
main_Sequencer_1_out_1, |
34 |
main_Format_1_in_3 |
35 |
) [instance: 1, cache: 1]; |
36 |
// |
37 |
// node Import[1]: x = 38, y = 190, inputs = 6, label = Import |
38 |
// |
39 |
main_Import_1_out_1 = |
40 |
Import( |
41 |
main_Format_1_out_1, |
42 |
main_Import_1_in_2, |
43 |
main_Import_1_in_3, |
44 |
main_Import_1_in_4, |
45 |
main_Import_1_in_5, |
46 |
main_Import_1_in_6 |
47 |
) [instance: 1, cache: 1]; |
48 |
// |
49 |
// node AutoColor[1]: x = 154, y = 280, inputs = 10, label = AutoColor |
50 |
// input[7]: defaulting = 0, visible = 1, type = 5, value = 0.0 |
51 |
// input[8]: defaulting = 0, visible = 0, type = 5, value = 1.0 |
52 |
// |
53 |
main_AutoColor_1_out_1, |
54 |
main_AutoColor_1_out_2 = |
55 |
AutoColor( |
56 |
main_Import_1_out_1, |
57 |
main_AutoColor_1_in_2, |
58 |
main_AutoColor_1_in_3, |
59 |
main_AutoColor_1_in_4, |
60 |
main_AutoColor_1_in_5, |
61 |
main_AutoColor_1_in_6, |
62 |
main_AutoColor_1_in_7, |
63 |
main_AutoColor_1_in_8, |
64 |
main_AutoColor_1_in_9, |
65 |
main_AutoColor_1_in_10 |
66 |
) [instance: 1, cache: 1]; |
67 |
// |
68 |
// node Isosurface[1]: x = 61, y = 280, inputs = 6, label = Isosurface |
69 |
// input[2]: defaulting = 0, visible = 1, type = 16777221, value = { 0. 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 .9 1. } |
70 |
// input[3]: defaulting = 0, visible = 1, type = 1, value = 10 |
71 |
// input[4]: defaulting = 0, visible = 0, type = 34816, value = NULL |
72 |
// |
73 |
main_Isosurface_1_out_1 = |
74 |
Isosurface( |
75 |
main_Import_1_out_1, |
76 |
main_Isosurface_1_in_2, |
77 |
main_Isosurface_1_in_3, |
78 |
main_Isosurface_1_in_4, |
79 |
main_Isosurface_1_in_5, |
80 |
main_Isosurface_1_in_6 |
81 |
) [instance: 1, cache: 1]; |
82 |
// |
83 |
// node Collect[1]: x = 132, y = 370, inputs = 2, label = Collect |
84 |
// |
85 |
main_Collect_1_out_1 = |
86 |
Collect( |
87 |
main_Isosurface_1_out_1, |
88 |
main_AutoColor_1_out_1 |
89 |
) [instance: 1, cache: 1]; |
90 |
// |
91 |
// node Image[1]: x = 123, y = 460, inputs = 49, label = Image |
92 |
// input[1]: defaulting = 0, visible = 0, type = 67108863, value = "Image_1" |
93 |
// input[4]: defaulting = 0, visible = 0, type = 1, value = 1 |
94 |
// input[5]: defaulting = 0, visible = 0, type = 8, value = [0.025 0.005 0] |
95 |
// input[6]: defaulting = 0, visible = 0, type = 8, value = [0.025 0.005 0.128134] |
96 |
// input[7]: defaulting = 0, visible = 0, type = 5, value = 0.0686668 |
97 |
// input[8]: defaulting = 0, visible = 0, type = 1, value = 640 |
98 |
// input[9]: defaulting = 0, visible = 0, type = 5, value = 0.75 |
99 |
// input[10]: defaulting = 0, visible = 0, type = 8, value = [0 1 0] |
100 |
// input[11]: defaulting = 1, visible = 0, type = 5, value = 30.0 |
101 |
// input[12]: defaulting = 0, visible = 0, type = 1, value = 0 |
102 |
// input[14]: defaulting = 0, visible = 0, type = 1, value = 1 |
103 |
// input[15]: defaulting = 1, visible = 0, type = 32, value = "none" |
104 |
// input[16]: defaulting = 1, visible = 0, type = 32, value = "none" |
105 |
// input[17]: defaulting = 1, visible = 0, type = 1, value = 1 |
106 |
// input[18]: defaulting = 1, visible = 0, type = 1, value = 1 |
107 |
// input[19]: defaulting = 0, visible = 0, type = 3, value = 0 |
108 |
// input[22]: defaulting = 0, visible = 0, type = 32, value = "White" |
109 |
// input[29]: defaulting = 1, visible = 0, type = 3, value = 0 |
110 |
// depth: value = 24 |
111 |
// window: position = (0.4437,0.1270), size = 0.5109x0.5098 |
112 |
// internal caching: 1 |
113 |
// |
114 |
main_Image_1_out_1, |
115 |
main_Image_1_out_2, |
116 |
main_Image_1_out_3 = |
117 |
Image( |
118 |
main_Image_1_in_1, |
119 |
main_Collect_1_out_1, |
120 |
main_Image_1_in_3, |
121 |
main_Image_1_in_4, |
122 |
main_Image_1_in_5, |
123 |
main_Image_1_in_6, |
124 |
main_Image_1_in_7, |
125 |
main_Image_1_in_8, |
126 |
main_Image_1_in_9, |
127 |
main_Image_1_in_10, |
128 |
main_Image_1_in_11, |
129 |
main_Image_1_in_12, |
130 |
main_Image_1_in_13, |
131 |
main_Image_1_in_14, |
132 |
main_Image_1_in_15, |
133 |
main_Image_1_in_16, |
134 |
main_Image_1_in_17, |
135 |
main_Image_1_in_18, |
136 |
main_Image_1_in_19, |
137 |
main_Image_1_in_20, |
138 |
main_Image_1_in_21, |
139 |
main_Image_1_in_22, |
140 |
main_Image_1_in_23, |
141 |
main_Image_1_in_24, |
142 |
main_Image_1_in_25, |
143 |
main_Image_1_in_26, |
144 |
main_Image_1_in_27, |
145 |
main_Image_1_in_28, |
146 |
main_Image_1_in_29, |
147 |
main_Image_1_in_30, |
148 |
main_Image_1_in_31, |
149 |
main_Image_1_in_32, |
150 |
main_Image_1_in_33, |
151 |
main_Image_1_in_34, |
152 |
main_Image_1_in_35, |
153 |
main_Image_1_in_36, |
154 |
main_Image_1_in_37, |
155 |
main_Image_1_in_38, |
156 |
main_Image_1_in_39, |
157 |
main_Image_1_in_40, |
158 |
main_Image_1_in_41, |
159 |
main_Image_1_in_42, |
160 |
main_Image_1_in_43, |
161 |
main_Image_1_in_44, |
162 |
main_Image_1_in_45, |
163 |
main_Image_1_in_46, |
164 |
main_Image_1_in_47, |
165 |
main_Image_1_in_48, |
166 |
main_Image_1_in_49 |
167 |
) [instance: 1, cache: 1]; |
168 |
// network: end of macro body |
169 |
CacheScene(main_Image_1_in_1, main_Image_1_out_1, main_Image_1_out_2); |
170 |
} |
171 |
main_Sequencer_1_in_1 = "Sequencer_1"; |
172 |
main_Sequencer_1_in_2 = NULL; |
173 |
main_Sequencer_1_in_3 = NULL; |
174 |
main_Sequencer_1_in_4 = NULL; |
175 |
main_Sequencer_1_in_5 = NULL; |
176 |
main_Sequencer_1_in_6 = NULL; |
177 |
main_Sequencer_1_in_7 = { 1 100 1 1 51 1 }; |
178 |
main_Sequencer_1_out_1 = NULL; |
179 |
|
180 |
@startframe = 1; |
181 |
@nextframe = @startframe; |
182 |
@endframe = 51; |
183 |
@deltaframe = 1; |
184 |
main_Format_1_in_1 = "T%d.dx"; |
185 |
main_Format_1_in_3 = NULL; |
186 |
main_Format_1_out_1 = NULL; |
187 |
main_Import_1_in_2 = NULL; |
188 |
main_Import_1_in_3 = NULL; |
189 |
main_Import_1_in_4 = NULL; |
190 |
main_Import_1_in_5 = NULL; |
191 |
main_Import_1_in_6 = NULL; |
192 |
main_Import_1_out_1 = NULL; |
193 |
main_AutoColor_1_in_2 = NULL; |
194 |
main_AutoColor_1_in_3 = NULL; |
195 |
main_AutoColor_1_in_4 = NULL; |
196 |
main_AutoColor_1_in_5 = NULL; |
197 |
main_AutoColor_1_in_6 = NULL; |
198 |
main_AutoColor_1_in_7 = 0.0; |
199 |
main_AutoColor_1_in_8 = 1.0; |
200 |
main_AutoColor_1_in_9 = NULL; |
201 |
main_AutoColor_1_in_10 = NULL; |
202 |
main_AutoColor_1_out_1 = NULL; |
203 |
main_Isosurface_1_in_2 = { 0. 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 .9 1. }; |
204 |
main_Isosurface_1_in_3 = 10; |
205 |
main_Isosurface_1_in_4 = NULL; |
206 |
main_Isosurface_1_in_5 = NULL; |
207 |
main_Isosurface_1_in_6 = NULL; |
208 |
main_Isosurface_1_out_1 = NULL; |
209 |
main_Collect_1_out_1 = NULL; |
210 |
macro Image( |
211 |
id, |
212 |
object, |
213 |
where, |
214 |
useVector, |
215 |
to, |
216 |
from, |
217 |
width, |
218 |
resolution, |
219 |
aspect, |
220 |
up, |
221 |
viewAngle, |
222 |
perspective, |
223 |
options, |
224 |
buttonState = 1, |
225 |
buttonUpApprox = "none", |
226 |
buttonDownApprox = "none", |
227 |
buttonUpDensity = 1, |
228 |
buttonDownDensity = 1, |
229 |
renderMode = 0, |
230 |
defaultCamera, |
231 |
reset, |
232 |
backgroundColor, |
233 |
throttle, |
234 |
RECenable = 0, |
235 |
RECfile, |
236 |
RECformat, |
237 |
RECresolution, |
238 |
RECaspect, |
239 |
AAenable = 0, |
240 |
AAlabels, |
241 |
AAticks, |
242 |
AAcorners, |
243 |
AAframe, |
244 |
AAadjust, |
245 |
AAcursor, |
246 |
AAgrid, |
247 |
AAcolors, |
248 |
AAannotation, |
249 |
AAlabelscale, |
250 |
AAfont, |
251 |
interactionMode, |
252 |
title, |
253 |
AAxTickLocs, |
254 |
AAyTickLocs, |
255 |
AAzTickLocs, |
256 |
AAxTickLabels, |
257 |
AAyTickLabels, |
258 |
AAzTickLabels, |
259 |
webOptions) -> ( |
260 |
object, |
261 |
camera, |
262 |
where) |
263 |
{ |
264 |
ImageMessage( |
265 |
id, |
266 |
backgroundColor, |
267 |
throttle, |
268 |
RECenable, |
269 |
RECfile, |
270 |
RECformat, |
271 |
RECresolution, |
272 |
RECaspect, |
273 |
AAenable, |
274 |
AAlabels, |
275 |
AAticks, |
276 |
AAcorners, |
277 |
AAframe, |
278 |
AAadjust, |
279 |
AAcursor, |
280 |
AAgrid, |
281 |
AAcolors, |
282 |
AAannotation, |
283 |
AAlabelscale, |
284 |
AAfont, |
285 |
AAxTickLocs, |
286 |
AAyTickLocs, |
287 |
AAzTickLocs, |
288 |
AAxTickLabels, |
289 |
AAyTickLabels, |
290 |
AAzTickLabels, |
291 |
interactionMode, |
292 |
title, |
293 |
renderMode, |
294 |
buttonUpApprox, |
295 |
buttonDownApprox, |
296 |
buttonUpDensity, |
297 |
buttonDownDensity) [instance: 1, cache: 1]; |
298 |
autoCamera = |
299 |
AutoCamera( |
300 |
object, |
301 |
"front", |
302 |
object, |
303 |
resolution, |
304 |
aspect, |
305 |
[0,1,0], |
306 |
perspective, |
307 |
viewAngle, |
308 |
backgroundColor) [instance: 1, cache: 1]; |
309 |
realCamera = |
310 |
Camera( |
311 |
to, |
312 |
from, |
313 |
width, |
314 |
resolution, |
315 |
aspect, |
316 |
up, |
317 |
perspective, |
318 |
viewAngle, |
319 |
backgroundColor) [instance: 1, cache: 1]; |
320 |
coloredDefaultCamera = |
321 |
UpdateCamera(defaultCamera, |
322 |
background=backgroundColor) [instance: 1, cache: 1]; |
323 |
nullDefaultCamera = |
324 |
Inquire(defaultCamera, |
325 |
"is null + 1") [instance: 1, cache: 1]; |
326 |
resetCamera = |
327 |
Switch( |
328 |
nullDefaultCamera, |
329 |
coloredDefaultCamera, |
330 |
autoCamera) [instance: 1, cache: 1]; |
331 |
resetNull = |
332 |
Inquire( |
333 |
reset, |
334 |
"is null + 1") [instance: 2, cache: 1]; |
335 |
reset = |
336 |
Switch( |
337 |
resetNull, |
338 |
reset, |
339 |
0) [instance: 2, cache: 1]; |
340 |
whichCamera = |
341 |
Compute( |
342 |
"($0 != 0 || $1 == 0) ? 1 : 2", |
343 |
reset, |
344 |
useVector) [instance: 1, cache: 1]; |
345 |
camera = Switch( |
346 |
whichCamera, |
347 |
resetCamera, |
348 |
realCamera) [instance: 3, cache: 1]; |
349 |
AAobject = |
350 |
AutoAxes( |
351 |
object, |
352 |
camera, |
353 |
AAlabels, |
354 |
AAticks, |
355 |
AAcorners, |
356 |
AAframe, |
357 |
AAadjust, |
358 |
AAcursor, |
359 |
AAgrid, |
360 |
AAcolors, |
361 |
AAannotation, |
362 |
AAlabelscale, |
363 |
AAfont, |
364 |
AAxTickLocs, |
365 |
AAyTickLocs, |
366 |
AAzTickLocs, |
367 |
AAxTickLabels, |
368 |
AAyTickLabels, |
369 |
AAzTickLabels) [instance: 1, cache: 1]; |
370 |
switchAAenable = Compute("$0+1", |
371 |
AAenable) [instance: 2, cache: 1]; |
372 |
object = Switch( |
373 |
switchAAenable, |
374 |
object, |
375 |
AAobject) [instance:4, cache: 1]; |
376 |
SWapproximation_options = |
377 |
Switch( |
378 |
buttonState, |
379 |
buttonUpApprox, |
380 |
buttonDownApprox) [instance: 5, cache: 1]; |
381 |
SWdensity_options = |
382 |
Switch( |
383 |
buttonState, |
384 |
buttonUpDensity, |
385 |
buttonDownDensity) [instance: 6, cache: 1]; |
386 |
HWapproximation_options = |
387 |
Format( |
388 |
"%s,%s", |
389 |
buttonDownApprox, |
390 |
buttonUpApprox) [instance: 1, cache: 1]; |
391 |
HWdensity_options = |
392 |
Format( |
393 |
"%d,%d", |
394 |
buttonDownDensity, |
395 |
buttonUpDensity) [instance: 2, cache: 1]; |
396 |
switchRenderMode = Compute( |
397 |
"$0+1", |
398 |
renderMode) [instance: 3, cache: 1]; |
399 |
approximation_options = Switch( |
400 |
switchRenderMode, |
401 |
SWapproximation_options, |
402 |
HWapproximation_options) [instance: 7, cache: 1]; |
403 |
density_options = Switch( |
404 |
switchRenderMode, |
405 |
SWdensity_options, |
406 |
HWdensity_options) [instance: 8, cache: 1]; |
407 |
renderModeString = Switch( |
408 |
switchRenderMode, |
409 |
"software", |
410 |
"hardware")[instance: 9, cache: 1]; |
411 |
object_tag = Inquire( |
412 |
object, |
413 |
"object tag")[instance: 3, cache: 1]; |
414 |
annoted_object = |
415 |
Options( |
416 |
object, |
417 |
"send boxes", |
418 |
0, |
419 |
"cache", |
420 |
1, |
421 |
"object tag", |
422 |
object_tag, |
423 |
"ddcamera", |
424 |
whichCamera, |
425 |
"rendering approximation", |
426 |
approximation_options, |
427 |
"render every", |
428 |
density_options, |
429 |
"button state", |
430 |
buttonState, |
431 |
"rendering mode", |
432 |
renderModeString) [instance: 1, cache: 1]; |
433 |
RECresNull = |
434 |
Inquire( |
435 |
RECresolution, |
436 |
"is null + 1") [instance: 4, cache: 1]; |
437 |
ImageResolution = |
438 |
Inquire( |
439 |
camera, |
440 |
"camera resolution") [instance: 5, cache: 1]; |
441 |
RECresolution = |
442 |
Switch( |
443 |
RECresNull, |
444 |
RECresolution, |
445 |
ImageResolution) [instance: 10, cache: 1]; |
446 |
RECaspectNull = |
447 |
Inquire( |
448 |
RECaspect, |
449 |
"is null + 1") [instance: 6, cache: 1]; |
450 |
ImageAspect = |
451 |
Inquire( |
452 |
camera, |
453 |
"camera aspect") [instance: 7, cache: 1]; |
454 |
RECaspect = |
455 |
Switch( |
456 |
RECaspectNull, |
457 |
RECaspect, |
458 |
ImageAspect) [instance: 11, cache: 1]; |
459 |
switchRECenable = Compute( |
460 |
"$0 == 0 ? 1 : (($2 == $3) && ($4 == $5)) ? ($1 == 1 ? 2 : 3) : 4", |
461 |
RECenable, |
462 |
switchRenderMode, |
463 |
RECresolution, |
464 |
ImageResolution, |
465 |
RECaspect, |
466 |
ImageAspect) [instance: 4, cache: 1]; |
467 |
NoRECobject, RECNoRerenderObject, RECNoRerHW, RECRerenderObject = Route(switchRECenable, annoted_object); |
468 |
Display( |
469 |
NoRECobject, |
470 |
camera, |
471 |
where, |
472 |
throttle) [instance: 1, cache: 1]; |
473 |
image = |
474 |
Render( |
475 |
RECNoRerenderObject, |
476 |
camera) [instance: 1, cache: 1]; |
477 |
Display( |
478 |
image, |
479 |
NULL, |
480 |
where, |
481 |
throttle) [instance: 2, cache: 1]; |
482 |
WriteImage( |
483 |
image, |
484 |
RECfile, |
485 |
RECformat) [instance: 1, cache: 1]; |
486 |
rec_where = Display( |
487 |
RECNoRerHW, |
488 |
camera, |
489 |
where, |
490 |
throttle) [instance: 1, cache: 0]; |
491 |
rec_image = ReadImageWindow( |
492 |
rec_where) [instance: 1, cache: 1]; |
493 |
WriteImage( |
494 |
rec_image, |
495 |
RECfile, |
496 |
RECformat) [instance: 1, cache: 1]; |
497 |
RECupdateCamera = |
498 |
UpdateCamera( |
499 |
camera, |
500 |
resolution=RECresolution, |
501 |
aspect=RECaspect) [instance: 2, cache: 1]; |
502 |
Display( |
503 |
RECRerenderObject, |
504 |
camera, |
505 |
where, |
506 |
throttle) [instance: 1, cache: 1]; |
507 |
RECRerenderObject = |
508 |
ScaleScreen( |
509 |
RECRerenderObject, |
510 |
NULL, |
511 |
RECresolution, |
512 |
camera) [instance: 1, cache: 1]; |
513 |
image = |
514 |
Render( |
515 |
RECRerenderObject, |
516 |
RECupdateCamera) [instance: 2, cache: 1]; |
517 |
WriteImage( |
518 |
image, |
519 |
RECfile, |
520 |
RECformat) [instance: 2, cache: 1]; |
521 |
} |
522 |
main_Image_1_in_1 = "Image_1"; |
523 |
main_Image_1_in_3 = "X24,,"; |
524 |
main_Image_1_in_4 = 1; |
525 |
main_Image_1_in_5 = [0.025 0.005 0]; |
526 |
main_Image_1_in_6 = [0.025 0.005 0.128134]; |
527 |
main_Image_1_in_7 = 0.0686668; |
528 |
main_Image_1_in_8 = 640; |
529 |
main_Image_1_in_9 = 0.75; |
530 |
main_Image_1_in_10 = [0 1 0]; |
531 |
main_Image_1_in_11 = NULL; |
532 |
main_Image_1_in_12 = 0; |
533 |
main_Image_1_in_13 = NULL; |
534 |
main_Image_1_in_14 = 1; |
535 |
main_Image_1_in_15 = NULL; |
536 |
main_Image_1_in_16 = NULL; |
537 |
main_Image_1_in_17 = NULL; |
538 |
main_Image_1_in_18 = NULL; |
539 |
main_Image_1_in_19 = 0; |
540 |
main_Image_1_in_20 = NULL; |
541 |
main_Image_1_in_21 = NULL; |
542 |
main_Image_1_in_22 = "White"; |
543 |
main_Image_1_in_23 = NULL; |
544 |
main_Image_1_in_25 = NULL; |
545 |
main_Image_1_in_26 = NULL; |
546 |
main_Image_1_in_27 = NULL; |
547 |
main_Image_1_in_28 = NULL; |
548 |
main_Image_1_in_29 = NULL; |
549 |
main_Image_1_in_30 = NULL; |
550 |
main_Image_1_in_31 = NULL; |
551 |
main_Image_1_in_32 = NULL; |
552 |
main_Image_1_in_33 = NULL; |
553 |
main_Image_1_in_34 = NULL; |
554 |
main_Image_1_in_35 = NULL; |
555 |
main_Image_1_in_36 = NULL; |
556 |
main_Image_1_in_37 = NULL; |
557 |
main_Image_1_in_38 = NULL; |
558 |
main_Image_1_in_39 = NULL; |
559 |
main_Image_1_in_40 = NULL; |
560 |
main_Image_1_in_41 = NULL; |
561 |
main_Image_1_in_42 = NULL; |
562 |
main_Image_1_in_43 = NULL; |
563 |
main_Image_1_in_44 = NULL; |
564 |
main_Image_1_in_45 = NULL; |
565 |
main_Image_1_in_46 = NULL; |
566 |
main_Image_1_in_47 = NULL; |
567 |
main_Image_1_in_48 = NULL; |
568 |
main_Image_1_in_49 = NULL; |
569 |
Executive("product version 4 3 2"); |
570 |
$sync |
571 |
|
572 |
sequence main(); |
573 |
play; |