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