File: SampleMacro.net

package info (click to toggle)
dxsamples 4.4.0-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 26,340 kB
  • sloc: ansic: 10,079; sh: 8,445; java: 1,772; makefile: 1,102
file content (323 lines) | stat: -rw-r--r-- 9,065 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
//
// time: Tue Aug 13 15:56:04 1996
//
// version: 3.0.1 (format), 3.2.0 (DX Beta)
//
//
// Begin MDF
// MODULE SampleMacro
// CATEGORY Macros
// DESCRIPTION creates a rubbersheet with contour lines
// INPUT data; field; (none); two-dimensional data field
// INPUT num_contours; integer; 5; number of contour lines
// INPUT color; field or vector or string; "black"; color of contour lines
// OUTPUT output; image; rubbersheet and contour lines
// End MDF
//
// comment: This visual program is used as part of the tutorial for Data Explorer. To access the tutorial you can type
// comment:      dx -tutor
// comment: or you can choose "Tutorial..." from the Help menu of any window.
// comment: 
// comment: This visual program is discussed in the section "Creating and Using Macros". To find this section, start the tutorial, then click on
// comment: "Appendix B, Tutorial II: Editing and Creating Visual Programs" in the third paragraph. Then click on "Creating and Using Macros" in
// comment: the list of Tutorial II Topics.
// comment: 
// comment: The tutorial will suggest ways to use and modify this visual program.
// workspace: width = 631, height = 812
// layout: snap = 0, width = 50, height = 50, align = UL
//
macro SampleMacro(
 data
,num_contours = 5
,color = "black"
) -> (
 output
) {
    // 
    // node Input[2]: x = 137, y = 11, inputs = 0, label = Input
    // parameter: position = 1, name = 'data', value = ' ', descriptive = 0, description = 'two-dimensional data field', required = 1, visible = 1
    //
SampleMacro_Input_2_out_1 = data;
    // 
    // node RubberSheet[1]: x = 25, y = 112, inputs = 4, label = RubberSheet
    //
SampleMacro_RubberSheet_1_out_1 = 
    RubberSheet(
    SampleMacro_Input_2_out_1,
    NULL,
    NULL,
    NULL
    ) [instance: 1, cache: 1];
    // 
    // node AutoColor[1]: x = 36, y = 195, inputs = 10, label = AutoColor
    //
SampleMacro_AutoColor_1_out_1,
SampleMacro_AutoColor_1_out_2 = 
    AutoColor(
    SampleMacro_RubberSheet_1_out_1,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL
    ) [instance: 1, cache: 1];
    // 
    // node ColorBar[1]: x = 124, y = 313, inputs = 14, label = ColorBar
    // input[3]: defaulting = 0, visible = 1, type = 8, value = [200 10]
    // input[4]: defaulting = 0, visible = 1, type = 3, value = 1
    //
SampleMacro_ColorBar_1_out_1 = 
    ColorBar(
    SampleMacro_AutoColor_1_out_2,
    NULL,
    [200 10],
    1,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL
    ) [instance: 1, cache: 1];
    // 
    // node Input[3]: x = 220, y = 0, inputs = 0, label = Input
    // parameter: position = 2, name = 'num_contours', value = '5', descriptive = 0, description = 'number of contour lines', required = 0, visible = 1
    //
SampleMacro_Input_3_out_1 = num_contours;
    // 
    // node Isosurface[1]: x = 253, y = 217, inputs = 6, label = Isosurface
    //
SampleMacro_Isosurface_1_out_1 = 
    Isosurface(
    SampleMacro_RubberSheet_1_out_1,
    NULL,
    SampleMacro_Input_3_out_1,
    NULL,
    NULL,
    NULL
    ) [instance: 1, cache: 1];
    // 
    // node Input[4]: x = 321, y = 10, inputs = 0, label = Input
    // parameter: position = 3, name = 'color', value = '"black"', descriptive = 0, description = 'color of contour lines', required = 0, visible = 1
    //
SampleMacro_Input_4_out_1 = color;
    // 
    // node Color[1]: x = 344, y = 269, inputs = 5, label = Color
    //
SampleMacro_Color_1_out_1 = 
    Color(
    SampleMacro_Isosurface_1_out_1,
    SampleMacro_Input_4_out_1,
    NULL,
    NULL,
    NULL
    ) [instance: 1, cache: 1];
    // 
    // node Collect[1]: x = 159, y = 440, inputs = 3, label = Collect
    //
SampleMacro_Collect_1_out_1 = 
    Collect(
    SampleMacro_AutoColor_1_out_1,
    SampleMacro_ColorBar_1_out_1,
    SampleMacro_Color_1_out_1
    ) [instance: 1, cache: 1];
    // 
    // node AutoCamera[1]: x = 251, y = 486, inputs = 9, label = AutoCamera
    // input[4]: defaulting = 0, visible = 0, type = 1, value = 400
    // input[5]: defaulting = 0, visible = 0, type = 5, value = 1.0
    //
SampleMacro_AutoCamera_1_out_1 = 
    AutoCamera(
    SampleMacro_Collect_1_out_1,
    NULL,
    NULL,
    400,
    1.0,
    NULL,
    NULL,
    NULL,
    NULL
    ) [instance: 1, cache: 1];
    // 
    // node Render[1]: x = 82, y = 486, inputs = 3, label = Render
    //
SampleMacro_Render_1_out_1 = 
    Render(
    SampleMacro_Collect_1_out_1,
    SampleMacro_AutoCamera_1_out_1,
    NULL
    ) [instance: 1, cache: 1];
    // 
    // node Histogram[1]: x = 415, y = 112, inputs = 5, label = Histogram
    //
SampleMacro_Histogram_1_out_1,
SampleMacro_Histogram_1_out_2 = 
    Histogram(
    SampleMacro_Input_2_out_1,
    NULL,
    NULL,
    NULL,
    NULL
    ) [instance: 1, cache: 1];
    // 
    // node Mark[1]: x = 507, y = 148, inputs = 2, label = Mark
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "positions"
    //
SampleMacro_Mark_1_out_1 = 
    Mark(
    SampleMacro_Histogram_1_out_1,
    "positions"
    ) [instance: 1, cache: 1];
    // 
    // node Transmitter[1]: x = 156, y = 233, inputs = 1, label = colormap
    //
colormap = SampleMacro_AutoColor_1_out_2;
    // 
    // node Receiver[1]: x = 562, y = 160, inputs = 1, label = colormap
    //
SampleMacro_Receiver_1_out_1 = colormap;
    // 
    // node Color[3]: x = 504, y = 239, inputs = 5, label = Color
    //
SampleMacro_Color_3_out_1 = 
    Color(
    SampleMacro_Mark_1_out_1,
    SampleMacro_Receiver_1_out_1,
    NULL,
    NULL,
    NULL
    ) [instance: 3, cache: 1];
    // 
    // node Unmark[1]: x = 459, y = 319, inputs = 2, label = Unmark
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "positions"
    //
SampleMacro_Unmark_1_out_1 = 
    Unmark(
    SampleMacro_Color_3_out_1,
    "positions"
    ) [instance: 1, cache: 1];
    // 
    // node Post[1]: x = 567, y = 384, inputs = 2, label = Post
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "connections"
    //
SampleMacro_Post_1_out_1 = 
    Post(
    SampleMacro_Unmark_1_out_1,
    "connections"
    ) [instance: 1, cache: 1];
    // 
    // node Plot[1]: x = 400, y = 438, inputs = 24, label = Plot
    // input[2]: defaulting = 0, visible = 1, type = 16777248, value = {"altitude" "number of data values"}
    // input[9]: defaulting = 0, visible = 1, type = 5, value = 1.0
    //
SampleMacro_Plot_1_out_1 = 
    Plot(
    SampleMacro_Post_1_out_1,
    {"altitude" "number of data values"},
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    1.0,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL
    ) [instance: 1, cache: 1];
    // 
    // node AutoCamera[2]: x = 539, y = 486, inputs = 9, label = AutoCamera
    // input[4]: defaulting = 0, visible = 0, type = 1, value = 400
    // input[5]: defaulting = 0, visible = 0, type = 5, value = 1.0
    //
SampleMacro_AutoCamera_2_out_1 = 
    AutoCamera(
    SampleMacro_Plot_1_out_1,
    NULL,
    NULL,
    400,
    1.0,
    NULL,
    NULL,
    NULL,
    NULL
    ) [instance: 2, cache: 1];
    // 
    // node Render[2]: x = 457, y = 570, inputs = 3, label = Render
    //
SampleMacro_Render_2_out_1 = 
    Render(
    SampleMacro_Plot_1_out_1,
    SampleMacro_AutoCamera_2_out_1,
    NULL
    ) [instance: 2, cache: 1];
    // 
    // node Collect[2]: x = 202, y = 586, inputs = 2, label = Collect
    //
SampleMacro_Collect_2_out_1 = 
    Collect(
    SampleMacro_Render_1_out_1,
    SampleMacro_Render_2_out_1
    ) [instance: 2, cache: 1];
    // 
    // node Arrange[1]: x = 387, y = 586, inputs = 5, label = Arrange
    //
SampleMacro_Arrange_1_out_1 = 
    Arrange(
    SampleMacro_Collect_2_out_1,
    NULL,
    NULL,
    NULL,
    NULL
    ) [instance: 1, cache: 1];
    // 
    // node Output[2]: x = 381, y = 750, inputs = 1, label = Output
    // parameter: position = 1, name = 'output', value = ' ', descriptive = 0, description = 'rubbersheet and contour lines', required = 0, visible = 1
    //
output = SampleMacro_Arrange_1_out_1;
// network: end of macro body
}
SampleMacro_Input_2_out_1 = NULL;
SampleMacro_RubberSheet_1_out_1 = NULL;
SampleMacro_AutoColor_1_out_1 = NULL;
SampleMacro_AutoColor_1_out_2 = NULL;
SampleMacro_ColorBar_1_out_1 = NULL;
SampleMacro_Input_3_out_1 = NULL;
SampleMacro_Isosurface_1_out_1 = NULL;
SampleMacro_Input_4_out_1 = NULL;
SampleMacro_Color_1_out_1 = NULL;
SampleMacro_Collect_1_out_1 = NULL;
SampleMacro_AutoCamera_1_out_1 = NULL;
SampleMacro_Render_1_out_1 = NULL;
SampleMacro_Histogram_1_out_1 = NULL;
SampleMacro_Mark_1_out_1 = NULL;
SampleMacro_Transmitter_1_out_1 = NULL;
SampleMacro_Receiver_1_out_1 = NULL;
SampleMacro_Color_3_out_1 = NULL;
SampleMacro_Unmark_1_out_1 = NULL;
SampleMacro_Post_1_out_1 = NULL;
SampleMacro_Plot_1_out_1 = NULL;
SampleMacro_AutoCamera_2_out_1 = NULL;
SampleMacro_Render_2_out_1 = NULL;
SampleMacro_Collect_2_out_1 = NULL;
SampleMacro_Arrange_1_out_1 = NULL;