File: MRI_1.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 (216 lines) | stat: -rw-r--r-- 7,115 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
//
// time: Wed Apr  9 15:40:14 1997
//
// version: 3.1.1 (format), 3.1.4 (DX Beta)
//
//
// MODULE main
//
// comment: This visualization shows a sequence of slices of mri data of a human head. The data consists of 16 slices, each 128x128. The data is imported using the general array header file mri.general.
// comment: 
// comment: Two methods of display are shown. In the first, the data are simply autocolored and displayed. In the second, "delayed colors" are used to speed display and reduce memory use. In order to use delayed colors, it is necessary to convert the data to bytes, as is done here using Compute.  Use the control panel to choose between these methods. Play the sequencer to see the 16 slices. See the AutoColor manual page for more information about "delayed colors".
// workspace: width = 413, height = 617
// layout: snap = 0, width = 50, height = 50, align = NN
//
macro main(
) -> (
) {
    // 
    // node Import[1]: x = 25, y = 20, inputs = 6, label = Import
    // input[1]: defaulting = 0, visible = 1, type = 32, value = "mri.general"
    //
main_Import_1_out_1 = 
    Import(
    main_Import_1_in_1,
    main_Import_1_in_2,
    main_Import_1_in_3,
    main_Import_1_in_4,
    main_Import_1_in_5,
    main_Import_1_in_6
    ) [instance: 1, cache: 1];
    // 
    // node Sequencer[1]: x = 201, y = 37, inputs = 7, label = Sequencer
    // input[1]: defaulting = 0, visible = 0, type = 32, value = "Sequencer_1"
    // input[4]: defaulting = 1, visible = 1, type = 1, value = 0
    // input[5]: defaulting = 1, visible = 1, type = 1, value = 15
    // input[6]: defaulting = 1, visible = 0, type = 1, value = 1
    // input[7]: defaulting = 0, visible = 0, type = 16777217, value = { 0 15 1 0 15 1 }
    // vcr[1]: min = 0, max = 15, beg = 0, end = 15, cur = 0, inc = 1, loop = off, step = off, pal = off
    // window: position = (0.1484,0.0918), size = 0.2188x0.0781
    //
    main_Sequencer_1_out_1 = @frame;
    // 
    // node Slice[1]: x = 42, y = 126, inputs = 3, label = Slice
    // input[2]: defaulting = 0, visible = 1, type = 1, value = 2
    //
main_Slice_1_out_1 = 
    Slice(
    main_Import_1_out_1,
    main_Slice_1_in_2,
    main_Sequencer_1_out_1
    ) [instance: 1, cache: 1];
    // 
    // node AutoColor[1]: x = 89, y = 359, inputs = 10, label = AutoColor
    //
main_AutoColor_1_out_1,
main_AutoColor_1_out_2 = 
    AutoColor(
    main_Slice_1_out_1,
    main_AutoColor_1_in_2,
    main_AutoColor_1_in_3,
    main_AutoColor_1_in_4,
    main_AutoColor_1_in_5,
    main_AutoColor_1_in_6,
    main_Import_1_out_1,
    main_AutoColor_1_in_8,
    main_AutoColor_1_in_9,
    main_AutoColor_1_in_10
    ) [instance: 1, cache: 1];
    // 
    // node Statistics[1]: x = 293, y = 194, inputs = 1, label = Statistics
    //
main_Statistics_1_out_1,
main_Statistics_1_out_2,
main_Statistics_1_out_3,
main_Statistics_1_out_4,
main_Statistics_1_out_5 = 
    Statistics(
    main_Slice_1_out_1
    ) [instance: 1, cache: 1];
    // 
    // node Compute[1]: x = 226, y = 302, inputs = 4, label = Compute
    // input[1]: defaulting = 0, visible = 0, type = 32, value = "byte(255*($0-$1)/($2-$1))"
    // expression: value = byte(255*(data-min)/(max-min))
    // name[2]: value = data
    // name[3]: value = min
    // name[4]: value = max
    //
main_Compute_1_out_1 = 
    Compute(
    main_Compute_1_in_1,
    main_Slice_1_out_1,
    main_Statistics_1_out_4,
    main_Statistics_1_out_5
    ) [instance: 1, cache: 1];
    // 
    // node AutoColor[2]: x = 222, y = 387, inputs = 10, label = AutoColor
    // input[7]: defaulting = 0, visible = 1, type = 5, value = 0.0
    // input[8]: defaulting = 0, visible = 1, type = 5, value = 255.0
    // input[9]: defaulting = 0, visible = 1, type = 3, value = 1
    //
main_AutoColor_2_out_1,
main_AutoColor_2_out_2 = 
    AutoColor(
    main_Compute_1_out_1,
    main_AutoColor_2_in_2,
    main_AutoColor_2_in_3,
    main_AutoColor_2_in_4,
    main_AutoColor_2_in_5,
    main_AutoColor_2_in_6,
    main_AutoColor_2_in_7,
    main_AutoColor_2_in_8,
    main_AutoColor_2_in_9,
    main_AutoColor_2_in_10
    ) [instance: 2, cache: 1];
    // 
    // node Toggle[1]: x = 4, y = 231, inputs = 6, label = Toggle
    // input[1]: defaulting = 0, visible = 0, type = 32, value = "Toggle_1"
    // input[2]: defaulting = 0, visible = 0, type = 29, value = 1
    // input[3]: defaulting = 0, visible = 0, type = 3, value = 0
    // input[4]: defaulting = 1, visible = 1, type = 29, value = 2
    // input[5]: defaulting = 1, visible = 1, type = 29, value = 1
    // output[1]: visible = 1, type = 29, value = 1
    // toggle : 0
    //
    // 
    // node Switch[1]: x = 83, y = 472, inputs = 3, label = Switch
    //
main_Switch_1_out_1 = 
    Switch(
    main_Toggle_1_out_1,
    main_AutoColor_1_out_1,
    main_AutoColor_2_out_1
    ) [instance: 1, cache: 1];
    // 
    // node Display[1]: x = 115, y = 555, inputs = 8, label = Display
    // depth: value = 24
    // window: position = (0.6734,0.0781), size = 0.1109x0.2441
    //
main_Display_1_out_1[cache: 2] = 
    Display(
    main_Switch_1_out_1,
    main_Display_1_in_2,
    main_Display_1_in_3,
    main_Display_1_in_4,
    main_Display_1_in_5,
    main_Display_1_in_6,
    main_Display_1_in_7,
    main_Display_1_in_8
    ) [instance: 1, cache: 1];
// network: end of macro body
}
main_Import_1_in_1 = "mri.general";
main_Import_1_in_2 = NULL;
main_Import_1_in_3 = NULL;
main_Import_1_in_4 = NULL;
main_Import_1_in_5 = NULL;
main_Import_1_in_6 = NULL;
main_Import_1_out_1 = NULL;
main_Sequencer_1_in_1 = "Sequencer_1";
main_Sequencer_1_in_2 = NULL;
main_Sequencer_1_in_3 = NULL;
main_Sequencer_1_in_4 = NULL;
main_Sequencer_1_in_5 = NULL;
main_Sequencer_1_in_6 = NULL;
main_Sequencer_1_in_7 = { 0 15 1 0 15 1 };
main_Sequencer_1_out_1 = NULL;

@startframe = 0;
@nextframe  = @startframe;
@endframe   = 15;
@deltaframe = 1;
main_Slice_1_in_2 = 2;
main_Slice_1_out_1 = NULL;
main_AutoColor_1_in_2 = NULL;
main_AutoColor_1_in_3 = NULL;
main_AutoColor_1_in_4 = NULL;
main_AutoColor_1_in_5 = NULL;
main_AutoColor_1_in_6 = NULL;
main_AutoColor_1_in_8 = NULL;
main_AutoColor_1_in_9 = NULL;
main_AutoColor_1_in_10 = NULL;
main_AutoColor_1_out_1 = NULL;
main_Statistics_1_out_4 = NULL;
main_Statistics_1_out_5 = NULL;
main_Compute_1_in_1 = "byte(255*($0-$1)/($2-$1))";
main_Compute_1_out_1 = NULL;
main_AutoColor_2_in_2 = NULL;
main_AutoColor_2_in_3 = NULL;
main_AutoColor_2_in_4 = NULL;
main_AutoColor_2_in_5 = NULL;
main_AutoColor_2_in_6 = NULL;
main_AutoColor_2_in_7 = 0.0;
main_AutoColor_2_in_8 = 255.0;
main_AutoColor_2_in_9 = 1;
main_AutoColor_2_in_10 = NULL;
main_AutoColor_2_out_1 = NULL;
main_Toggle_1_in_1 = "Toggle_1";
main_Toggle_1_in_2 = 1;
main_Toggle_1_in_3 = 0;
main_Toggle_1_in_4 = NULL;
main_Toggle_1_in_5 = NULL;
main_Toggle_1_in_6 = NULL;
main_Toggle_1_out_1 = 1;
main_Switch_1_out_1 = NULL;
main_Display_1_in_2 = NULL;
main_Display_1_in_3 = "X24,,";
main_Display_1_in_4 = NULL;
main_Display_1_in_5 = NULL;
main_Display_1_in_6 = NULL;
main_Display_1_in_7 = NULL;
main_Display_1_in_8 = NULL;
Executive("product version 3 1 4");
$sync

sequence main();
play;