]> Creatis software - CreaPhase.git/blob - octave_packages/secs2d-0.0.8/Utilities/Ucoloredrubbersheetseries.net
Add a useful package (from Source forge) for octave
[CreaPhase.git] / octave_packages / secs2d-0.0.8 / Utilities / Ucoloredrubbersheetseries.net
1 //
2 // time: Sat Jun  3 23:21:55 2006
3 //
4 // version: 3.2.0 (format), 4.3.2 (DX)
5 //
6 //
7 // MODULE main
8 // workspace: width = 629, height = 507
9 // layout: snap = 0, width = 50, height = 50, align = NN
10 //
11 macro main(
12 ) -> (
13 ) {
14     // 
15     // node FileSelector[1]: x = 51, y = 31, inputs = 0, label = FileSelector
16     // output[1]: visible = 1, type = 32, value = "__FILE__DX__"
17     // output[2]: visible = 0, type = 32, value = "__FILE__DX__"
18     //
19     // 
20     // node Import[1]: x = 104, y = 118, inputs = 6, label = Import
21     // input[2]: visible = 0
22     // input[3]: visible = 0
23     //
24 main_Import_1_out_1 = 
25     Import(
26     main_FileSelector_1_out_1,
27     main_Import_1_in_2,
28     main_Import_1_in_3,
29     main_Import_1_in_4,
30     main_Import_1_in_5,
31     main_Import_1_in_6
32     ) [instance: 1, cache: 1];
33     // 
34     // node AutoColor[1]: x = 285, y = 117, inputs = 10, label = AutoColor
35     // input[7]: visible = 0
36     //
37 main_AutoColor_1_out_1,
38 main_AutoColor_1_out_2 = 
39     AutoColor(
40     main_Import_1_out_1,
41     main_AutoColor_1_in_2,
42     main_AutoColor_1_in_3,
43     main_AutoColor_1_in_4,
44     main_AutoColor_1_in_5,
45     main_AutoColor_1_in_6,
46     main_AutoColor_1_in_7,
47     main_AutoColor_1_in_8,
48     main_AutoColor_1_in_9,
49     main_AutoColor_1_in_10
50     ) [instance: 1, cache: 1];
51     // 
52     // node RubberSheet[1]: x = 273, y = 252, inputs = 4, label = RubberSheet
53     // input[2]: defaulting = 1, visible = 0, type = 5, value = 1.0
54     //
55 main_RubberSheet_1_out_1 = 
56     RubberSheet(
57     main_AutoColor_1_out_1,
58     main_RubberSheet_1_in_2,
59     main_RubberSheet_1_in_3,
60     main_RubberSheet_1_in_4
61     ) [instance: 1, cache: 1];
62     // 
63     // node ShowConnections[1]: x = 49, y = 232, inputs = 1, label = ShowConnections
64     //
65 main_ShowConnections_1_out_1 = 
66     ShowConnections(
67     main_RubberSheet_1_out_1
68     ) [instance: 1, cache: 1];
69     // 
70     // node Color[1]: x = 72, y = 328, inputs = 5, label = Color
71     // input[2]: defaulting = 0, visible = 0, type = 32, value = "green"
72     // input[3]: visible = 0
73     //
74 main_Color_1_out_1 = 
75     Color(
76     main_ShowConnections_1_out_1,
77     main_Color_1_in_2,
78     main_Color_1_in_3,
79     main_Color_1_in_4,
80     main_Color_1_in_5
81     ) [instance: 1, cache: 1];
82     // 
83     // node Statistics[1]: x = 489, y = 120, inputs = 1, label = Statistics
84     // output[1]: visible = 0
85     // output[2]: visible = 0
86     // output[3]: visible = 0
87     //
88 main_Statistics_1_out_1,
89 main_Statistics_1_out_2,
90 main_Statistics_1_out_3,
91 main_Statistics_1_out_4,
92 main_Statistics_1_out_5 = 
93     Statistics(
94     main_Import_1_out_1
95     ) [instance: 1, cache: 1];
96     // 
97     // node ColorBar[1]: x = 455, y = 296, inputs = 16, label = ColorBar
98     // input[2]: visible = 0
99     // input[3]: visible = 0
100     // input[4]: visible = 0
101     // input[6]: visible = 1
102     // input[7]: visible = 1
103     // input[8]: visible = 0
104     // input[9]: defaulting = 0, visible = 0, type = 16777248, value = {"black"}
105     //
106 main_ColorBar_1_out_1 = 
107     ColorBar(
108     main_AutoColor_1_out_2,
109     main_ColorBar_1_in_2,
110     main_ColorBar_1_in_3,
111     main_ColorBar_1_in_4,
112     main_ColorBar_1_in_5,
113     main_Statistics_1_out_4,
114     main_Statistics_1_out_5,
115     main_ColorBar_1_in_8,
116     main_ColorBar_1_in_9,
117     main_ColorBar_1_in_10,
118     main_ColorBar_1_in_11,
119     main_ColorBar_1_in_12,
120     main_ColorBar_1_in_13,
121     main_ColorBar_1_in_14,
122     main_ColorBar_1_in_15,
123     main_ColorBar_1_in_16
124     ) [instance: 1, cache: 1];
125     // 
126     // node Collect[1]: x = 280, y = 393, inputs = 3, label = Collect
127     //
128 main_Collect_1_out_1 = 
129     Collect(
130     main_Color_1_out_1,
131     main_RubberSheet_1_out_1,
132     main_ColorBar_1_out_1
133     ) [instance: 1, cache: 1];
134     // 
135     // node Format[1]: x = 545, y = 307, inputs = 3, label = Format
136     // input[1]: defaulting = 0, visible = 1, type = 32, value = "min = %g, max = %g"
137     //
138 main_Format_1_out_1 = 
139     Format(
140     main_Format_1_in_1,
141     main_Statistics_1_out_4,
142     main_Statistics_1_out_5
143     ) [instance: 1, cache: 1];
144     // 
145     // node Image[1]: x = 188, y = 445, inputs = 49, label = Image
146     // input[1]: defaulting = 0, visible = 0, type = 67108863, value = "Image_1"
147     // input[4]: defaulting = 0, visible = 0, type = 1, value = 1
148     // input[5]: defaulting = 0, visible = 0, type = 8, value = [0.406504 0.5 0.060737]
149     // input[6]: defaulting = 0, visible = 0, type = 8, value = [3.08097 2.11826 1.94289]
150     // input[7]: defaulting = 0, visible = 0, type = 5, value = 1.95541
151     // input[8]: defaulting = 0, visible = 0, type = 1, value = 1010
152     // input[9]: defaulting = 0, visible = 0, type = 5, value = 0.669
153     // input[10]: defaulting = 0, visible = 0, type = 8, value = [-0.451253 -0.250437 0.856535]
154     // input[11]: defaulting = 1, visible = 0, type = 5, value = 30.0
155     // input[12]: defaulting = 0, visible = 0, type = 1, value = 0
156     // input[14]: defaulting = 0, visible = 0, type = 1, value = 1
157     // input[15]: defaulting = 1, visible = 0, type = 32, value = "none"
158     // input[16]: defaulting = 1, visible = 0, type = 32, value = "none"
159     // input[17]: defaulting = 1, visible = 0, type = 1, value = 1
160     // input[18]: defaulting = 1, visible = 0, type = 1, value = 1
161     // input[19]: defaulting = 0, visible = 0, type = 3, value = 0
162     // input[22]: defaulting = 0, visible = 0, type = 32, value = "snow"
163     // input[25]: defaulting = 0, visible = 0, type = 32, value = "/Users/carlo/Desktop/COMSONDEMO/CoMSON DP/doping.tif"
164     // input[26]: defaulting = 0, visible = 0, type = 32, value = "tiff"
165     // input[29]: defaulting = 0, visible = 0, type = 3, value = 1
166     // input[31]: defaulting = 0, visible = 0, type = 1, value = -5
167     // input[33]: defaulting = 0, visible = 0, type = 3, value = 1
168     // input[34]: defaulting = 0, visible = 0, type = 3, value = 1
169     // input[36]: defaulting = 0, visible = 0, type = 3, value = 1
170     // input[37]: defaulting = 0, visible = 0, type = 16777248, value = {"clear", "black", "blue", "blue"}
171     // input[38]: defaulting = 0, visible = 0, type = 16777248, value = {"background", "grid", "ticks", "labels"}
172     // input[39]: defaulting = 0, visible = 0, type = 5, value = 0.65
173     // input[40]: defaulting = 0, visible = 0, type = 32, value = "roman_d"
174     // input[41]: defaulting = 0, visible = 0, type = 32, value = "rotate"
175     // output[1]: visible = 0
176     // output[2]: visible = 0
177     // output[3]: visible = 0
178     // depth: value = 24
179     // window: position = (0.0000,0.0286), size = 1.0000x0.9375
180     // internal caching: 1
181     //
182 main_Image_1_out_1,
183 main_Image_1_out_2,
184 main_Image_1_out_3 = 
185     Image(
186     main_Image_1_in_1,
187     main_Collect_1_out_1,
188     main_Image_1_in_3,
189     main_Image_1_in_4,
190     main_Image_1_in_5,
191     main_Image_1_in_6,
192     main_Image_1_in_7,
193     main_Image_1_in_8,
194     main_Image_1_in_9,
195     main_Image_1_in_10,
196     main_Image_1_in_11,
197     main_Image_1_in_12,
198     main_Image_1_in_13,
199     main_Image_1_in_14,
200     main_Image_1_in_15,
201     main_Image_1_in_16,
202     main_Image_1_in_17,
203     main_Image_1_in_18,
204     main_Image_1_in_19,
205     main_Image_1_in_20,
206     main_Image_1_in_21,
207     main_Image_1_in_22,
208     main_Image_1_in_23,
209     main_Image_1_in_24,
210     main_Image_1_in_25,
211     main_Image_1_in_26,
212     main_Image_1_in_27,
213     main_Image_1_in_28,
214     main_Image_1_in_29,
215     main_Image_1_in_30,
216     main_Image_1_in_31,
217     main_Image_1_in_32,
218     main_Image_1_in_33,
219     main_Image_1_in_34,
220     main_Image_1_in_35,
221     main_Image_1_in_36,
222     main_Image_1_in_37,
223     main_Image_1_in_38,
224     main_Image_1_in_39,
225     main_Image_1_in_40,
226     main_Image_1_in_41,
227     main_Image_1_in_42,
228     main_Image_1_in_43,
229     main_Image_1_in_44,
230     main_Image_1_in_45,
231     main_Image_1_in_46,
232     main_Image_1_in_47,
233     main_Image_1_in_48,
234     main_Image_1_in_49
235     ) [instance: 1, cache: 1];
236     // 
237     // node Message[1]: x = 557, y = 401, inputs = 3, label = Message
238     //
239     Message(
240     main_Format_1_out_1,
241     main_Message_1_in_2,
242     main_Message_1_in_3
243     ) [instance: 1, cache: 1];
244 // network: end of macro body
245 CacheScene(main_Image_1_in_1, main_Image_1_out_1, main_Image_1_out_2);
246 }
247 main_FileSelector_1_out_1 = "./.tmp.dx";
248 main_Import_1_in_2 = NULL;
249 main_Import_1_in_3 = NULL;
250 main_Import_1_in_4 = NULL;
251 main_Import_1_in_5 = NULL;
252 main_Import_1_in_6 = NULL;
253 main_Import_1_out_1 = NULL;
254 main_AutoColor_1_in_2 = NULL;
255 main_AutoColor_1_in_3 = NULL;
256 main_AutoColor_1_in_4 = NULL;
257 main_AutoColor_1_in_5 = NULL;
258 main_AutoColor_1_in_6 = NULL;
259 main_AutoColor_1_in_7 = NULL;
260 main_AutoColor_1_in_8 = NULL;
261 main_AutoColor_1_in_9 = NULL;
262 main_AutoColor_1_in_10 = NULL;
263 main_AutoColor_1_out_1 = NULL;
264 main_AutoColor_1_out_2 = NULL;
265 main_RubberSheet_1_in_2 = NULL;
266 main_RubberSheet_1_in_3 = NULL;
267 main_RubberSheet_1_in_4 = NULL;
268 main_RubberSheet_1_out_1 = NULL;
269 main_ShowConnections_1_out_1 = NULL;
270 main_Color_1_in_2 = "green";
271 main_Color_1_in_3 = NULL;
272 main_Color_1_in_4 = NULL;
273 main_Color_1_in_5 = NULL;
274 main_Color_1_out_1 = NULL;
275 main_Statistics_1_out_4 = NULL;
276 main_Statistics_1_out_5 = NULL;
277 main_ColorBar_1_in_2 = NULL;
278 main_ColorBar_1_in_3 = NULL;
279 main_ColorBar_1_in_4 = NULL;
280 main_ColorBar_1_in_5 = NULL;
281 main_ColorBar_1_in_8 = NULL;
282 main_ColorBar_1_in_9 = {"black"};
283 main_ColorBar_1_in_10 = NULL;
284 main_ColorBar_1_in_11 = NULL;
285 main_ColorBar_1_in_12 = NULL;
286 main_ColorBar_1_in_13 = NULL;
287 main_ColorBar_1_in_14 = NULL;
288 main_ColorBar_1_in_15 = NULL;
289 main_ColorBar_1_in_16 = NULL;
290 main_ColorBar_1_out_1 = NULL;
291 main_Collect_1_out_1 = NULL;
292 main_Format_1_in_1 = "min = %g, max = %g";
293 main_Format_1_out_1 = NULL;
294 macro Image(
295         id,
296         object,
297         where,
298         useVector,
299         to,
300         from,
301         width,
302         resolution,
303         aspect,
304         up,
305         viewAngle,
306         perspective,
307         options,
308         buttonState = 1,
309         buttonUpApprox = "none",
310         buttonDownApprox = "none",
311         buttonUpDensity = 1,
312         buttonDownDensity = 1,
313         renderMode = 0,
314         defaultCamera,
315         reset,
316         backgroundColor,
317         throttle,
318         RECenable = 0,
319         RECfile,
320         RECformat,
321         RECresolution,
322         RECaspect,
323         AAenable = 0,
324         AAlabels,
325         AAticks,
326         AAcorners,
327         AAframe,
328         AAadjust,
329         AAcursor,
330         AAgrid,
331         AAcolors,
332         AAannotation,
333         AAlabelscale,
334         AAfont,
335         interactionMode,
336         title,
337         AAxTickLocs,
338         AAyTickLocs,
339         AAzTickLocs,
340         AAxTickLabels,
341         AAyTickLabels,
342         AAzTickLabels,
343         webOptions) -> (
344         object,
345         camera,
346         where)
347 {
348     ImageMessage(
349         id,
350         backgroundColor,
351         throttle,
352         RECenable,
353         RECfile,
354         RECformat,
355         RECresolution,
356         RECaspect,
357         AAenable,
358         AAlabels,
359         AAticks,
360         AAcorners,
361         AAframe,
362         AAadjust,
363         AAcursor,
364         AAgrid,
365         AAcolors,
366         AAannotation,
367         AAlabelscale,
368         AAfont,
369         AAxTickLocs,
370         AAyTickLocs,
371         AAzTickLocs,
372         AAxTickLabels,
373         AAyTickLabels,
374         AAzTickLabels,
375         interactionMode,
376         title,
377         renderMode,
378         buttonUpApprox,
379         buttonDownApprox,
380         buttonUpDensity,
381         buttonDownDensity) [instance: 1, cache: 1];
382     autoCamera =
383         AutoCamera(
384             object,
385             "front",
386             object,
387             resolution,
388             aspect,
389             [0,1,0],
390             perspective,
391             viewAngle,
392             backgroundColor) [instance: 1, cache: 1];
393     realCamera =
394         Camera(
395             to,
396             from,
397             width,
398             resolution,
399             aspect,
400             up,
401             perspective,
402             viewAngle,
403             backgroundColor) [instance: 1, cache: 1];
404     coloredDefaultCamera = 
405          UpdateCamera(defaultCamera,
406             background=backgroundColor) [instance: 1, cache: 1];
407     nullDefaultCamera =
408         Inquire(defaultCamera,
409             "is null + 1") [instance: 1, cache: 1];
410     resetCamera =
411         Switch(
412             nullDefaultCamera,
413             coloredDefaultCamera,
414             autoCamera) [instance: 1, cache: 1];
415     resetNull = 
416         Inquire(
417             reset,
418             "is null + 1") [instance: 2, cache: 1];
419     reset =
420         Switch(
421             resetNull,
422             reset,
423             0) [instance: 2, cache: 1];
424     whichCamera =
425         Compute(
426             "($0 != 0 || $1 == 0) ? 1 : 2",
427             reset,
428             useVector) [instance: 1, cache: 1];
429     camera = Switch(
430             whichCamera,
431             resetCamera,
432             realCamera) [instance: 3, cache: 1];
433     AAobject =
434         AutoAxes(
435             object,
436             camera,
437             AAlabels,
438             AAticks,
439             AAcorners,
440             AAframe,
441             AAadjust,
442             AAcursor,
443             AAgrid,
444             AAcolors,
445             AAannotation,
446             AAlabelscale,
447             AAfont,
448             AAxTickLocs,
449             AAyTickLocs,
450             AAzTickLocs,
451             AAxTickLabels,
452             AAyTickLabels,
453             AAzTickLabels) [instance: 1, cache: 1];
454     switchAAenable = Compute("$0+1",
455              AAenable) [instance: 2, cache: 1];
456     object = Switch(
457              switchAAenable,
458              object,
459              AAobject) [instance:4, cache: 1];
460     SWapproximation_options =
461         Switch(
462             buttonState,
463             buttonUpApprox,
464             buttonDownApprox) [instance: 5, cache: 1];
465     SWdensity_options =
466         Switch(
467             buttonState,
468             buttonUpDensity,
469             buttonDownDensity) [instance: 6, cache: 1];
470     HWapproximation_options =
471         Format(
472             "%s,%s",
473             buttonDownApprox,
474             buttonUpApprox) [instance: 1, cache: 1];
475     HWdensity_options =
476         Format(
477             "%d,%d",
478             buttonDownDensity,
479             buttonUpDensity) [instance: 2, cache: 1];
480     switchRenderMode = Compute(
481              "$0+1",
482              renderMode) [instance: 3, cache: 1];
483     approximation_options = Switch(
484              switchRenderMode,
485             SWapproximation_options,
486              HWapproximation_options) [instance: 7, cache: 1];
487     density_options = Switch(
488              switchRenderMode,
489             SWdensity_options,
490             HWdensity_options) [instance: 8, cache: 1];
491     renderModeString = Switch(
492             switchRenderMode,
493             "software",
494             "hardware")[instance: 9, cache: 1];
495     object_tag = Inquire(
496             object,
497             "object tag")[instance: 3, cache: 1];
498     annoted_object =
499         Options(
500             object,
501             "send boxes",
502             0,
503             "cache",
504             1,
505             "object tag",
506             object_tag,
507             "ddcamera",
508             whichCamera,
509             "rendering approximation",
510             approximation_options,
511             "render every",
512             density_options,
513             "button state",
514             buttonState,
515             "rendering mode",
516             renderModeString) [instance: 1, cache: 1];
517     RECresNull =
518         Inquire(
519             RECresolution,
520             "is null + 1") [instance: 4, cache: 1];
521     ImageResolution =
522         Inquire(
523             camera,
524             "camera resolution") [instance: 5, cache: 1];
525     RECresolution =
526         Switch(
527             RECresNull,
528             RECresolution,
529             ImageResolution) [instance: 10, cache: 1];
530     RECaspectNull =
531         Inquire(
532             RECaspect,
533             "is null + 1") [instance: 6, cache: 1];
534     ImageAspect =
535         Inquire(
536             camera,
537             "camera aspect") [instance: 7, cache: 1];
538     RECaspect =
539         Switch(
540             RECaspectNull,
541             RECaspect,
542             ImageAspect) [instance: 11, cache: 1];
543     switchRECenable = Compute(
544           "$0 == 0 ? 1 : (($2 == $3) && ($4 == $5)) ? ($1 == 1 ? 2 : 3) : 4",
545             RECenable,
546             switchRenderMode,
547             RECresolution,
548             ImageResolution,
549             RECaspect,
550              ImageAspect) [instance: 4, cache: 1];
551     NoRECobject, RECNoRerenderObject, RECNoRerHW, RECRerenderObject = Route(switchRECenable, annoted_object);
552     Display(
553         NoRECobject,
554         camera,
555         where,
556         throttle) [instance: 1, cache: 1];
557     image =
558         Render(
559             RECNoRerenderObject,
560             camera) [instance: 1, cache: 1];
561     Display(
562         image,
563         NULL,
564         where,
565         throttle) [instance: 2, cache: 1];
566     WriteImage(
567         image,
568         RECfile,
569         RECformat) [instance: 1, cache: 1];
570     rec_where = Display(
571         RECNoRerHW,
572         camera,
573         where,
574         throttle) [instance: 1, cache: 0];
575     rec_image = ReadImageWindow(
576         rec_where) [instance: 1, cache: 1];
577     WriteImage(
578         rec_image,
579         RECfile,
580         RECformat) [instance: 1, cache: 1];
581     RECupdateCamera =
582         UpdateCamera(
583             camera,
584             resolution=RECresolution,
585             aspect=RECaspect) [instance: 2, cache: 1];
586     Display(
587         RECRerenderObject,
588         camera,
589         where,
590         throttle) [instance: 1, cache: 1];
591     RECRerenderObject =
592         ScaleScreen(
593             RECRerenderObject,
594             NULL,
595             RECresolution,
596             camera) [instance: 1, cache: 1];
597     image =
598         Render(
599             RECRerenderObject,
600             RECupdateCamera) [instance: 2, cache: 1];
601     WriteImage(
602         image,
603         RECfile,
604         RECformat) [instance: 2, cache: 1];
605 }
606 main_Image_1_in_1 = "Image_1";
607 main_Image_1_in_3 = "X24,,";
608 main_Image_1_in_4 = 1;
609 main_Image_1_in_5 = [0.406504 0.5 0.060737];
610 main_Image_1_in_6 = [3.08097 2.11826 1.94289];
611 main_Image_1_in_7 = 1.95541;
612 main_Image_1_in_8 = 1010;
613 main_Image_1_in_9 = 0.669;
614 main_Image_1_in_10 = [-0.451253 -0.250437 0.856535];
615 main_Image_1_in_11 = NULL;
616 main_Image_1_in_12 = 0;
617 main_Image_1_in_13 = NULL;
618 main_Image_1_in_14 = 1;
619 main_Image_1_in_15 = NULL;
620 main_Image_1_in_16 = NULL;
621 main_Image_1_in_17 = NULL;
622 main_Image_1_in_18 = NULL;
623 main_Image_1_in_19 = 0;
624 main_Image_1_in_20 = NULL;
625 main_Image_1_in_21 = NULL;
626 main_Image_1_in_22 = "snow";
627 main_Image_1_in_23 = NULL;
628 main_Image_1_in_25 = "/Users/carlo/Desktop/COMSONDEMO/CoMSON DP/doping.tif";
629 main_Image_1_in_26 = "tiff";
630 main_Image_1_in_27 = NULL;
631 main_Image_1_in_28 = NULL;
632 main_Image_1_in_29 = 1;
633 main_Image_1_in_30 = NULL;
634 main_Image_1_in_31 = -5;
635 main_Image_1_in_32 = NULL;
636 main_Image_1_in_33 = 1;
637 main_Image_1_in_34 = 1;
638 main_Image_1_in_35 = NULL;
639 main_Image_1_in_36 = 1;
640 main_Image_1_in_37 = {"clear", "black", "blue", "blue"};
641 main_Image_1_in_38 = {"background", "grid", "ticks", "labels"};
642 main_Image_1_in_39 = 0.65;
643 main_Image_1_in_40 = "roman_d";
644 main_Image_1_in_41 = "rotate";
645 main_Image_1_in_42 = NULL;
646 main_Image_1_in_43 = NULL;
647 main_Image_1_in_44 = NULL;
648 main_Image_1_in_45 = NULL;
649 main_Image_1_in_46 = NULL;
650 main_Image_1_in_47 = NULL;
651 main_Image_1_in_48 = NULL;
652 main_Image_1_in_49 = NULL;
653 main_Message_1_in_2 = NULL;
654 main_Message_1_in_3 = NULL;
655 Executive("product version 4 3 2");
656 $sync
657 main();