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