File: CappedIsoMacro.net

package info (click to toggle)
dxsamples 4.4.0-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 26,340 kB
  • sloc: ansic: 10,079; sh: 8,445; java: 1,772; makefile: 1,102
file content (272 lines) | stat: -rw-r--r-- 11,019 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
//
// time: Tue Apr  8 11:46:52 1997
//
// version: 3.1.1 (format), 3.1.4 (DX Beta)
//
//
// Begin MDF
// MODULE CappedIsosurfaceMacro
// CATEGORY Macros
// DESCRIPTION new macro
// INPUT volume; field; (no default);  The volume of data
// INPUT isovalue; scalar or scalar list; (no default);  The isovalue
// INPUT gradient[visible:0]; vector field; (no default);  gradient field (see Isosurface)
// INPUT flag[visible:0]; flag; (no default);  whether to compute normals (see Isosurface)
// INPUT direction[visible:0]; integer; (no default);  how to orient normals (see Isosurface)
// INPUT capDir; value list or string list or object; 1;  Does the enclosed volume represent values below (1) or above (0) the isovalue?
// OUTPUT capped_iso; object;  capped isosurface
// End MDF
//
// comment: CappedIsosurface is used to generate a closed isosurface where the openings resulting when the isosurface intersects the boundary of the volume are closed by caps generated from the volume boundary.
// workspace: width = 803, height = 654
// layout: snap = 0, width = 50, height = 50, align = NN
//
macro CappedIsosurfaceMacro(
 volume
,isovalue
,gradient
,flag
,direction
,capDir = 1
) -> (
 capped_iso
) {
    // 
    // node Input[1]: x = 461, y = 4, inputs = 0, label = Input
    // parameter: position = 1, name = 'volume', value = '(no default)', descriptive = 1, description = ' The volume of data', required = 0, visible = 1
    //
CappedIsosurfaceMacro_Input_1_out_1 = volume;
    // 
    // node Input[5]: x = 523, y = 2, inputs = 0, label = Input
    // parameter: position = 2, name = 'isovalue', value = '(no default)', descriptive = 1, description = ' The isovalue', required = 0, visible = 1
    //
CappedIsosurfaceMacro_Input_5_out_1 = isovalue;
    // 
    // node Input[6]: x = 583, y = 4, inputs = 0, label = Input
    // parameter: position = 3, name = 'gradient', value = '(no default)', descriptive = 1, description = ' gradient field (see Isosurface)', required = 0, visible = 0
    //
CappedIsosurfaceMacro_Input_6_out_1 = gradient;
    // 
    // node Input[7]: x = 645, y = 3, inputs = 0, label = Input
    // parameter: position = 4, name = 'flag', value = '(no default)', descriptive = 1, description = ' whether to compute normals (see Isosurface)', required = 0, visible = 0
    //
CappedIsosurfaceMacro_Input_7_out_1 = flag;
    // 
    // node Input[8]: x = 709, y = 5, inputs = 0, label = Input
    // parameter: position = 5, name = 'direction', value = '(no default)', descriptive = 1, description = ' how to orient normals (see Isosurface)', required = 0, visible = 0
    //
CappedIsosurfaceMacro_Input_8_out_1 = direction;
    // 
    // node Isosurface[1]: x = 592, y = 220, inputs = 6, label = Isosurface
    // input[4]: visible = 1
    // input[5]: visible = 1
    // input[6]: visible = 1
    //
CappedIsosurfaceMacro_Isosurface_1_out_1 = 
    Isosurface(
    CappedIsosurfaceMacro_Input_1_out_1,
    CappedIsosurfaceMacro_Input_5_out_1,
    NULL,
    CappedIsosurfaceMacro_Input_6_out_1,
    CappedIsosurfaceMacro_Input_7_out_1,
    CappedIsosurfaceMacro_Input_8_out_1
    ) [instance: 1, cache: 1];
    // 
    // node Attribute[1]: x = 389, y = 249, inputs = 2, label = Attribute
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "Isosurface value"
    //
CappedIsosurfaceMacro_Attribute_1_out_1 = 
    Attribute(
    CappedIsosurfaceMacro_Isosurface_1_out_1,
    "Isosurface value"
    ) [instance: 1, cache: 1];
    // 
    // node ShowBoundary[2]: x = 457, y = 137, inputs = 2, label = ShowBoundary
    //
CappedIsosurfaceMacro_ShowBoundary_2_out_1 = 
    ShowBoundary(
    CappedIsosurfaceMacro_Input_1_out_1,
    NULL
    ) [instance: 2, cache: 1];
    // 
    // node Refine[1]: x = 291, y = 216, inputs = 2, label = Refine
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "triangles"
    //
CappedIsosurfaceMacro_Refine_1_out_1 = 
    Refine(
    CappedIsosurfaceMacro_ShowBoundary_2_out_1,
    "triangles"
    ) [instance: 1, cache: 1];
    // 
    // node Band[2]: x = 229, y = 315, inputs = 4, label = Band
    // input[2]: defaulting = 1, visible = 1, type = 5, value = 0.0
    // input[4]: defaulting = 0, visible = 1, type = 32, value = "original"
    //
CappedIsosurfaceMacro_Band_2_out_1 = 
    Band(
    CappedIsosurfaceMacro_Refine_1_out_1,
    CappedIsosurfaceMacro_Attribute_1_out_1,
    NULL,
    "original"
    ) [instance: 2, cache: 1];
    // 
    // node Input[9]: x = 92, y = 260, inputs = 0, label = Input
    // parameter: position = 6, name = 'capDir', value = '1', descriptive = 0, description = ' Does the enclosed volume represent values below (1) or above (0) the isovalue?', required = 0, visible = 1
    //
CappedIsosurfaceMacro_Input_9_out_1 = capDir;
    // 
    // node Inquire[1]: x = 21, y = 375, inputs = 3, label = Inquire
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "is null + 1"
    //
CappedIsosurfaceMacro_Inquire_1_out_1 = 
    Inquire(
    CappedIsosurfaceMacro_Input_9_out_1,
    "is null + 1",
    NULL
    ) [instance: 1, cache: 1];
    // 
    // node Switch[1]: x = 99, y = 470, inputs = 3, label = Switch
    // input[3]: defaulting = 0, visible = 1, type = 67108863, value = 1
    //
CappedIsosurfaceMacro_Switch_1_out_1 = 
    Switch(
    CappedIsosurfaceMacro_Inquire_1_out_1,
    CappedIsosurfaceMacro_Input_9_out_1,
    1
    ) [instance: 1, cache: 1];
    // 
    // node Compute[4]: x = 192, y = 493, inputs = 2, label = Compute
    // input[1]: defaulting = 0, visible = 0, type = 32, value = "$0 == 1 ? 2 : 1"
    // expression: value = a == 1 ? 2 : 1
    // name[2]: value = a
    //
CappedIsosurfaceMacro_Compute_4_out_1 = 
    Compute(
    "$0 == 1 ? 2 : 1",
    CappedIsosurfaceMacro_Switch_1_out_1
    ) [instance: 4, cache: 1];
    // 
    // node Include[1]: x = 147, y = 402, inputs = 6, label = Include
    // input[2]: defaulting = 1, visible = 1, type = 5, value = 0.0
    //
CappedIsosurfaceMacro_Include_1_out_1 = 
    Include(
    CappedIsosurfaceMacro_Band_2_out_1,
    CappedIsosurfaceMacro_Attribute_1_out_1,
    NULL,
    NULL,
    NULL,
    NULL
    ) [instance: 1, cache: 1];
    // 
    // node Include[2]: x = 323, y = 401, inputs = 6, label = Include
    // input[2]: defaulting = 1, visible = 1, type = 5, value = 0.0
    // input[3]: defaulting = 1, visible = 1, type = 5, value = 0.0
    //
CappedIsosurfaceMacro_Include_2_out_1 = 
    Include(
    CappedIsosurfaceMacro_Band_2_out_1,
    NULL,
    CappedIsosurfaceMacro_Attribute_1_out_1,
    NULL,
    NULL,
    NULL
    ) [instance: 2, cache: 1];
    // 
    // node Switch[2]: x = 628, y = 507, inputs = 3, label = Switch
    //
CappedIsosurfaceMacro_Switch_2_out_1 = 
    Switch(
    CappedIsosurfaceMacro_Compute_4_out_1,
    CappedIsosurfaceMacro_Include_1_out_1,
    CappedIsosurfaceMacro_Include_2_out_1
    ) [instance: 2, cache: 1];
    // 
    // node Collect[3]: x = 435, y = 494, inputs = 2, label = Collect
    //
CappedIsosurfaceMacro_Collect_3_out_1 = 
    Collect(
    CappedIsosurfaceMacro_Switch_2_out_1,
    CappedIsosurfaceMacro_Isosurface_1_out_1
    ) [instance: 3, cache: 1];
    // 
    // node Transmitter[1]: x = 38, y = 482, inputs = 1, label = Cap
    //
Cap = CappedIsosurfaceMacro_Switch_1_out_1;
    // 
    // node Receiver[1]: x = 555, y = 494, inputs = 1, label = Cap
    //
CappedIsosurfaceMacro_Receiver_1_out_1[cache: 0] = Cap;
    // 
    // node Options[1]: x = 478, y = 584, inputs = 5, label = Options
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "Isosurface value"
    // input[4]: defaulting = 0, visible = 1, type = 32, value = "CappedIsosurface capDIr"
    //
CappedIsosurfaceMacro_Options_1_out_1 = 
    Options(
    CappedIsosurfaceMacro_Collect_3_out_1,
    "Isosurface value",
    CappedIsosurfaceMacro_Attribute_1_out_1,
    "CappedIsosurface capDIr",
    CappedIsosurfaceMacro_Receiver_1_out_1
    ) [instance: 1, cache: 1];
    // 
    // node Output[1]: x = 643, y = 590, inputs = 1, label = Output
    // parameter: position = 1, name = 'capped_iso', value = ' ', descriptive = 0, description = ' capped isosurface', required = 0, visible = 1
    //
capped_iso = CappedIsosurfaceMacro_Options_1_out_1;
    //
    // decorator Annotate	pos=(518,294) size=285x188 style(Label), value = <NULL>
    // annotation user_begin: 371
    // annotation user: We Band the ShowBoundary of 
    // annotation user: the volume at the isovalue to
    // annotation user: divide the boundary surface neatly at
    // annotation user: the isocontour.  We then use Include to
    // annotation user: remove the portion of the boundary
    // annotation user: surface either above or below the
    // annotation user: isovalue.  We use the Isosurface value
    // annotation user: attribute of the Isosurface result so
    // annotation user: that if no isovalue is given we use the 
    // annotation user: same value as Isosurface chose as 
    // annotation user: the default.
    // annotation user_end: <NULL>
    //
    // decorator Annotate	pos=(0,25) size=437x108 style(Label), value = <NULL>
    // annotation user_begin: 344
    // annotation user: CappedIsosurface is used to generate a closed isosurface
    // annotation user: where the openings resulting when the isosurface intersects
    // annotation user: the boundary of the volume are closed by caps generated 
    // annotation user: from the volume boundary.  Only one isovalue may be given.
    // annotation user: An additional parameter selects whether the enclosed volume
    // annotation user: represents data values above or below the isovalue.
    // annotation user_end: <NULL>
    //
    // decorator Annotate	pos=(0,594) size=458x60 style(Label), value = <NULL>
    // annotation user_begin: 150
    // annotation user: We add the Isosurface value attribute ointo the output, and in
    // annotation user: addition add a CappedIsosurface capDir attribute containing the
    // annotation user: capDir parameter value.
    // annotation user_end: <NULL>
// network: end of macro body
}
CappedIsosurfaceMacro_Input_1_out_1 = NULL;
CappedIsosurfaceMacro_Input_5_out_1 = NULL;
CappedIsosurfaceMacro_Input_6_out_1 = NULL;
CappedIsosurfaceMacro_Input_7_out_1 = NULL;
CappedIsosurfaceMacro_Input_8_out_1 = NULL;
CappedIsosurfaceMacro_Isosurface_1_out_1 = NULL;
CappedIsosurfaceMacro_Attribute_1_out_1 = NULL;
CappedIsosurfaceMacro_ShowBoundary_2_out_1 = NULL;
CappedIsosurfaceMacro_Refine_1_out_1 = NULL;
CappedIsosurfaceMacro_Band_2_out_1 = NULL;
CappedIsosurfaceMacro_Input_9_out_1 = NULL;
CappedIsosurfaceMacro_Inquire_1_out_1 = NULL;
CappedIsosurfaceMacro_Switch_1_out_1 = NULL;
CappedIsosurfaceMacro_Compute_4_out_1 = NULL;
CappedIsosurfaceMacro_Include_1_out_1 = NULL;
CappedIsosurfaceMacro_Include_2_out_1 = NULL;
CappedIsosurfaceMacro_Switch_2_out_1 = NULL;
CappedIsosurfaceMacro_Collect_3_out_1 = NULL;
CappedIsosurfaceMacro_Transmitter_1_out_1 = NULL;
CappedIsosurfaceMacro_Receiver_1_out_1 = NULL;
CappedIsosurfaceMacro_Options_1_out_1 = NULL;