]> Creatis software - CreaPhase.git/blob - octave_packages/secs2d-0.0.8/Utilities/Ushowgrid.net
Add a useful package (from Source forge) for octave
[CreaPhase.git] / octave_packages / secs2d-0.0.8 / Utilities / Ushowgrid.net
1 //
2 // time: Mon Feb 27 22:33:21 2006
3 //
4 // version: 3.2.0 (format), 4.3.2 (DX)
5 //
6 //
7 // MODULE main
8 // workspace: width = 500, height = 463
9 // layout: snap = 0, width = 50, height = 50, align = NN
10 //
11 macro main(
12 ) -> (
13 ) {
14     // 
15     // node FileSelector[1]: x = 52, y = 31, inputs = 0, label = FileSelector
16     // output[1]: visible = 1, type = 32, value = "__FILE__DX__"
17     // output[2]: visible = 1, type = 32, value = "__FILE__DX__"
18     //
19     // 
20     // node Import[1]: x = 104, y = 118, inputs = 6, label = Import
21     //
22 main_Import_1_out_1 = 
23     Import(
24     main_FileSelector_1_out_1,
25     main_Import_1_in_2,
26     main_Import_1_in_3,
27     main_Import_1_in_4,
28     main_Import_1_in_5,
29     main_Import_1_in_6
30     ) [instance: 1, cache: 1];
31     // 
32     // node ShowConnections[1]: x = 101, y = 191, inputs = 1, label = ShowConnections
33     //
34 main_ShowConnections_1_out_1 = 
35     ShowConnections(
36     main_Import_1_out_1
37     ) [instance: 1, cache: 1];
38     // 
39     // node Color[1]: x = 106, y = 286, inputs = 5, label = Color
40     // input[2]: defaulting = 0, visible = 1, type = 32, value = "indianred"
41     //
42 main_Color_1_out_1 = 
43     Color(
44     main_ShowConnections_1_out_1,
45     main_Color_1_in_2,
46     main_Color_1_in_3,
47     main_Color_1_in_4,
48     main_Color_1_in_5
49     ) [instance: 1, cache: 1];
50     // 
51     // node Image[1]: x = 69, y = 401, inputs = 49, label = Image
52     // input[1]: defaulting = 0, visible = 0, type = 67108863, value = "Image_1"
53     // input[4]: defaulting = 0, visible = 0, type = 1, value = 1
54     // input[5]: defaulting = 0, visible = 0, type = 8, value = [3.75e-08 2.075e-08 0]
55     // input[6]: defaulting = 0, visible = 0, type = 8, value = [3.75e-08 2.075e-08 2.15172e-07]
56     // input[7]: defaulting = 0, visible = 0, type = 5, value = 1.15311e-07
57     // input[8]: defaulting = 0, visible = 0, type = 1, value = 640
58     // input[9]: defaulting = 0, visible = 0, type = 5, value = 0.750781
59     // input[10]: defaulting = 0, visible = 0, type = 8, value = [0 1 0]
60     // input[11]: defaulting = 0, visible = 0, type = 5, value = 30.0001
61     // input[12]: defaulting = 0, visible = 0, type = 1, value = 0
62     // input[14]: defaulting = 0, visible = 0, type = 1, value = 1
63     // input[15]: defaulting = 1, visible = 0, type = 32, value = "none"
64     // input[16]: defaulting = 1, visible = 0, type = 32, value = "none"
65     // input[17]: defaulting = 0, visible = 0, type = 1, value = 1
66     // input[18]: defaulting = 0, visible = 0, type = 1, value = 1
67     // input[19]: defaulting = 0, visible = 0, type = 1, value = 1
68     // input[22]: defaulting = 0, visible = 0, type = 32, value = "snow"
69     // input[25]: defaulting = 0, visible = 0, type = 32, value = "/Users/carlo/Desktop/COMSONDEMO/CoMSON DP/grid.tif"
70     // input[26]: defaulting = 0, visible = 0, type = 32, value = "tiff"
71     // input[29]: defaulting = 0, visible = 0, type = 3, value = 1
72     // input[31]: defaulting = 0, visible = 0, type = 1, value = -15
73     // input[33]: defaulting = 0, visible = 0, type = 3, value = 0
74     // input[34]: defaulting = 0, visible = 0, type = 3, value = 0
75     // input[37]: defaulting = 0, visible = 0, type = 16777248, value = {"clear", "grey5", "saddlebrown", "saddlebrown"}
76     // input[38]: defaulting = 0, visible = 0, type = 16777248, value = {"background", "grid", "ticks", "labels"}
77     // input[39]: defaulting = 0, visible = 0, type = 5, value = 0.7
78     // input[40]: defaulting = 0, visible = 0, type = 32, value = "roman_s"
79     // input[41]: defaulting = 0, visible = 0, type = 32, value = "panzoom"
80     // depth: value = 24
81     // window: position = (0.2480,0.1276), size = 0.6387x0.6836
82     // internal caching: 1
83     //
84 main_Image_1_out_1,
85 main_Image_1_out_2,
86 main_Image_1_out_3 = 
87     Image(
88     main_Image_1_in_1,
89     main_Color_1_out_1,
90     main_Image_1_in_3,
91     main_Image_1_in_4,
92     main_Image_1_in_5,
93     main_Image_1_in_6,
94     main_Image_1_in_7,
95     main_Image_1_in_8,
96     main_Image_1_in_9,
97     main_Image_1_in_10,
98     main_Image_1_in_11,
99     main_Image_1_in_12,
100     main_Image_1_in_13,
101     main_Image_1_in_14,
102     main_Image_1_in_15,
103     main_Image_1_in_16,
104     main_Image_1_in_17,
105     main_Image_1_in_18,
106     main_Image_1_in_19,
107     main_Image_1_in_20,
108     main_Image_1_in_21,
109     main_Image_1_in_22,
110     main_Image_1_in_23,
111     main_Image_1_in_24,
112     main_Image_1_in_25,
113     main_Image_1_in_26,
114     main_Image_1_in_27,
115     main_Image_1_in_28,
116     main_Image_1_in_29,
117     main_Image_1_in_30,
118     main_Image_1_in_31,
119     main_Image_1_in_32,
120     main_Image_1_in_33,
121     main_Image_1_in_34,
122     main_Image_1_in_35,
123     main_Image_1_in_36,
124     main_Image_1_in_37,
125     main_Image_1_in_38,
126     main_Image_1_in_39,
127     main_Image_1_in_40,
128     main_Image_1_in_41,
129     main_Image_1_in_42,
130     main_Image_1_in_43,
131     main_Image_1_in_44,
132     main_Image_1_in_45,
133     main_Image_1_in_46,
134     main_Image_1_in_47,
135     main_Image_1_in_48,
136     main_Image_1_in_49
137     ) [instance: 1, cache: 1];
138 // network: end of macro body
139 CacheScene(main_Image_1_in_1, main_Image_1_out_1, main_Image_1_out_2);
140 }
141 main_FileSelector_1_out_1 = "./.tmp.dx";
142 main_Import_1_in_2 = NULL;
143 main_Import_1_in_3 = NULL;
144 main_Import_1_in_4 = NULL;
145 main_Import_1_in_5 = NULL;
146 main_Import_1_in_6 = NULL;
147 main_Import_1_out_1 = NULL;
148 main_ShowConnections_1_out_1 = NULL;
149 main_Color_1_in_2 = "indianred";
150 main_Color_1_in_3 = NULL;
151 main_Color_1_in_4 = NULL;
152 main_Color_1_in_5 = NULL;
153 main_Color_1_out_1 = NULL;
154 macro Image(
155         id,
156         object,
157         where,
158         useVector,
159         to,
160         from,
161         width,
162         resolution,
163         aspect,
164         up,
165         viewAngle,
166         perspective,
167         options,
168         buttonState = 1,
169         buttonUpApprox = "none",
170         buttonDownApprox = "none",
171         buttonUpDensity = 1,
172         buttonDownDensity = 1,
173         renderMode = 0,
174         defaultCamera,
175         reset,
176         backgroundColor,
177         throttle,
178         RECenable = 0,
179         RECfile,
180         RECformat,
181         RECresolution,
182         RECaspect,
183         AAenable = 0,
184         AAlabels,
185         AAticks,
186         AAcorners,
187         AAframe,
188         AAadjust,
189         AAcursor,
190         AAgrid,
191         AAcolors,
192         AAannotation,
193         AAlabelscale,
194         AAfont,
195         interactionMode,
196         title,
197         AAxTickLocs,
198         AAyTickLocs,
199         AAzTickLocs,
200         AAxTickLabels,
201         AAyTickLabels,
202         AAzTickLabels,
203         webOptions) -> (
204         object,
205         camera,
206         where)
207 {
208     ImageMessage(
209         id,
210         backgroundColor,
211         throttle,
212         RECenable,
213         RECfile,
214         RECformat,
215         RECresolution,
216         RECaspect,
217         AAenable,
218         AAlabels,
219         AAticks,
220         AAcorners,
221         AAframe,
222         AAadjust,
223         AAcursor,
224         AAgrid,
225         AAcolors,
226         AAannotation,
227         AAlabelscale,
228         AAfont,
229         AAxTickLocs,
230         AAyTickLocs,
231         AAzTickLocs,
232         AAxTickLabels,
233         AAyTickLabels,
234         AAzTickLabels,
235         interactionMode,
236         title,
237         renderMode,
238         buttonUpApprox,
239         buttonDownApprox,
240         buttonUpDensity,
241         buttonDownDensity) [instance: 1, cache: 1];
242     autoCamera =
243         AutoCamera(
244             object,
245             "front",
246             object,
247             resolution,
248             aspect,
249             [0,1,0],
250             perspective,
251             viewAngle,
252             backgroundColor) [instance: 1, cache: 1];
253     realCamera =
254         Camera(
255             to,
256             from,
257             width,
258             resolution,
259             aspect,
260             up,
261             perspective,
262             viewAngle,
263             backgroundColor) [instance: 1, cache: 1];
264     coloredDefaultCamera = 
265          UpdateCamera(defaultCamera,
266             background=backgroundColor) [instance: 1, cache: 1];
267     nullDefaultCamera =
268         Inquire(defaultCamera,
269             "is null + 1") [instance: 1, cache: 1];
270     resetCamera =
271         Switch(
272             nullDefaultCamera,
273             coloredDefaultCamera,
274             autoCamera) [instance: 1, cache: 1];
275     resetNull = 
276         Inquire(
277             reset,
278             "is null + 1") [instance: 2, cache: 1];
279     reset =
280         Switch(
281             resetNull,
282             reset,
283             0) [instance: 2, cache: 1];
284     whichCamera =
285         Compute(
286             "($0 != 0 || $1 == 0) ? 1 : 2",
287             reset,
288             useVector) [instance: 1, cache: 1];
289     camera = Switch(
290             whichCamera,
291             resetCamera,
292             realCamera) [instance: 3, cache: 1];
293     AAobject =
294         AutoAxes(
295             object,
296             camera,
297             AAlabels,
298             AAticks,
299             AAcorners,
300             AAframe,
301             AAadjust,
302             AAcursor,
303             AAgrid,
304             AAcolors,
305             AAannotation,
306             AAlabelscale,
307             AAfont,
308             AAxTickLocs,
309             AAyTickLocs,
310             AAzTickLocs,
311             AAxTickLabels,
312             AAyTickLabels,
313             AAzTickLabels) [instance: 1, cache: 1];
314     switchAAenable = Compute("$0+1",
315              AAenable) [instance: 2, cache: 1];
316     object = Switch(
317              switchAAenable,
318              object,
319              AAobject) [instance:4, cache: 1];
320     SWapproximation_options =
321         Switch(
322             buttonState,
323             buttonUpApprox,
324             buttonDownApprox) [instance: 5, cache: 1];
325     SWdensity_options =
326         Switch(
327             buttonState,
328             buttonUpDensity,
329             buttonDownDensity) [instance: 6, cache: 1];
330     HWapproximation_options =
331         Format(
332             "%s,%s",
333             buttonDownApprox,
334             buttonUpApprox) [instance: 1, cache: 1];
335     HWdensity_options =
336         Format(
337             "%d,%d",
338             buttonDownDensity,
339             buttonUpDensity) [instance: 2, cache: 1];
340     switchRenderMode = Compute(
341              "$0+1",
342              renderMode) [instance: 3, cache: 1];
343     approximation_options = Switch(
344              switchRenderMode,
345             SWapproximation_options,
346              HWapproximation_options) [instance: 7, cache: 1];
347     density_options = Switch(
348              switchRenderMode,
349             SWdensity_options,
350             HWdensity_options) [instance: 8, cache: 1];
351     renderModeString = Switch(
352             switchRenderMode,
353             "software",
354             "hardware")[instance: 9, cache: 1];
355     object_tag = Inquire(
356             object,
357             "object tag")[instance: 3, cache: 1];
358     annoted_object =
359         Options(
360             object,
361             "send boxes",
362             0,
363             "cache",
364             1,
365             "object tag",
366             object_tag,
367             "ddcamera",
368             whichCamera,
369             "rendering approximation",
370             approximation_options,
371             "render every",
372             density_options,
373             "button state",
374             buttonState,
375             "rendering mode",
376             renderModeString) [instance: 1, cache: 1];
377     RECresNull =
378         Inquire(
379             RECresolution,
380             "is null + 1") [instance: 4, cache: 1];
381     ImageResolution =
382         Inquire(
383             camera,
384             "camera resolution") [instance: 5, cache: 1];
385     RECresolution =
386         Switch(
387             RECresNull,
388             RECresolution,
389             ImageResolution) [instance: 10, cache: 1];
390     RECaspectNull =
391         Inquire(
392             RECaspect,
393             "is null + 1") [instance: 6, cache: 1];
394     ImageAspect =
395         Inquire(
396             camera,
397             "camera aspect") [instance: 7, cache: 1];
398     RECaspect =
399         Switch(
400             RECaspectNull,
401             RECaspect,
402             ImageAspect) [instance: 11, cache: 1];
403     switchRECenable = Compute(
404           "$0 == 0 ? 1 : (($2 == $3) && ($4 == $5)) ? ($1 == 1 ? 2 : 3) : 4",
405             RECenable,
406             switchRenderMode,
407             RECresolution,
408             ImageResolution,
409             RECaspect,
410              ImageAspect) [instance: 4, cache: 1];
411     NoRECobject, RECNoRerenderObject, RECNoRerHW, RECRerenderObject = Route(switchRECenable, annoted_object);
412     Display(
413         NoRECobject,
414         camera,
415         where,
416         throttle) [instance: 1, cache: 1];
417     image =
418         Render(
419             RECNoRerenderObject,
420             camera) [instance: 1, cache: 1];
421     Display(
422         image,
423         NULL,
424         where,
425         throttle) [instance: 2, cache: 1];
426     WriteImage(
427         image,
428         RECfile,
429         RECformat) [instance: 1, cache: 1];
430     rec_where = Display(
431         RECNoRerHW,
432         camera,
433         where,
434         throttle) [instance: 1, cache: 0];
435     rec_image = ReadImageWindow(
436         rec_where) [instance: 1, cache: 1];
437     WriteImage(
438         rec_image,
439         RECfile,
440         RECformat) [instance: 1, cache: 1];
441     RECupdateCamera =
442         UpdateCamera(
443             camera,
444             resolution=RECresolution,
445             aspect=RECaspect) [instance: 2, cache: 1];
446     Display(
447         RECRerenderObject,
448         camera,
449         where,
450         throttle) [instance: 1, cache: 1];
451     RECRerenderObject =
452         ScaleScreen(
453             RECRerenderObject,
454             NULL,
455             RECresolution,
456             camera) [instance: 1, cache: 1];
457     image =
458         Render(
459             RECRerenderObject,
460             RECupdateCamera) [instance: 2, cache: 1];
461     WriteImage(
462         image,
463         RECfile,
464         RECformat) [instance: 2, cache: 1];
465 }
466 main_Image_1_in_1 = "Image_1";
467 main_Image_1_in_3 = "X24,,";
468 main_Image_1_in_4 = 1;
469 main_Image_1_in_5 = [3.75e-08 2.075e-08 0];
470 main_Image_1_in_6 = [3.75e-08 2.075e-08 2.15172e-07];
471 main_Image_1_in_7 = 1.15311e-07;
472 main_Image_1_in_8 = 640;
473 main_Image_1_in_9 = 0.750781;
474 main_Image_1_in_10 = [0 1 0];
475 main_Image_1_in_11 = 30.0001;
476 main_Image_1_in_12 = 0;
477 main_Image_1_in_13 = NULL;
478 main_Image_1_in_14 = 1;
479 main_Image_1_in_15 = NULL;
480 main_Image_1_in_16 = NULL;
481 main_Image_1_in_17 = 1;
482 main_Image_1_in_18 = 1;
483 main_Image_1_in_19 = 1;
484 main_Image_1_in_20 = NULL;
485 main_Image_1_in_21 = NULL;
486 main_Image_1_in_22 = "snow";
487 main_Image_1_in_23 = NULL;
488 main_Image_1_in_25 = "/Users/carlo/Desktop/COMSONDEMO/CoMSON DP/grid.tif";
489 main_Image_1_in_26 = "tiff";
490 main_Image_1_in_27 = NULL;
491 main_Image_1_in_28 = NULL;
492 main_Image_1_in_29 = 1;
493 main_Image_1_in_30 = NULL;
494 main_Image_1_in_31 = -15;
495 main_Image_1_in_32 = NULL;
496 main_Image_1_in_33 = 0;
497 main_Image_1_in_34 = 0;
498 main_Image_1_in_35 = NULL;
499 main_Image_1_in_36 = NULL;
500 main_Image_1_in_37 = {"clear", "grey5", "saddlebrown", "saddlebrown"};
501 main_Image_1_in_38 = {"background", "grid", "ticks", "labels"};
502 main_Image_1_in_39 = 0.7;
503 main_Image_1_in_40 = "roman_s";
504 main_Image_1_in_41 = "panzoom";
505 main_Image_1_in_42 = NULL;
506 main_Image_1_in_43 = NULL;
507 main_Image_1_in_44 = NULL;
508 main_Image_1_in_45 = NULL;
509 main_Image_1_in_46 = NULL;
510 main_Image_1_in_47 = NULL;
511 main_Image_1_in_48 = NULL;
512 main_Image_1_in_49 = NULL;
513 Executive("product version 4 3 2");
514 $sync
515 main();