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