Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
Home
Manual
API Reference
Download
Bugzilla
Groups
Namespace List
Class List
File List
Examples
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
mitkIpPicTypeMultiplex.h
Go to the documentation of this file.
1
39
#ifndef IP_PIC_TYPE_MULTIPLEX_H
40
#define IP_PIC_TYPE_MULTIPLEX_H
41
42
#include "
mitkIpPic.h
"
43
//#include <complex>
44
45
#define mitkIpPicTypeMultiplex0( function, pic ) \
46
{ \
47
if ( ( pic->type == mitkIpPicInt || pic->type == mitkIpPicUInt ) && pic->bpe == 1 ){ \
48
} else if ( pic->type == mitkIpPicInt && pic->bpe == 8 ){ \
49
function<char>( pic ); \
50
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 8 ){ \
51
function<unsigned char>( pic ); \
52
} else if ( pic->type == mitkIpPicInt && pic->bpe == 16 ){ \
53
function<short>( pic ); \
54
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 16 ){ \
55
function<unsigned short>( pic ); \
56
} else if ( pic->type == mitkIpPicInt && pic->bpe == 32 ){ \
57
function<int>( pic ); \
58
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 32 ){ \
59
function<unsigned int>( pic ); \
60
} else if ( pic->type == mitkIpPicInt && pic->bpe == 64 ){ \
61
function<long>( pic ); \
62
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 64 ){ \
63
function<unsigned long>( pic ); \
64
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 32 ){ \
65
function<float>( pic ); \
66
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 64 ){ \
67
function<double>( pic ); \
68
} \
69
}
70
71
#define mitkIpPicTypeMultiplex1( function, pic, param1 ) \
72
{ \
73
if ( ( pic->type == mitkIpPicInt || pic->type == mitkIpPicUInt ) && pic->bpe == 1 ){ \
74
} else if ( pic->type == mitkIpPicInt && pic->bpe == 8 ){ \
75
function<char>( pic, param1 ); \
76
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 8 ){ \
77
function<unsigned char>( pic, param1 ); \
78
} else if ( pic->type == mitkIpPicInt && pic->bpe == 16 ){ \
79
function<short>( pic, param1 ); \
80
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 16 ){ \
81
function<unsigned short>( pic, param1 ); \
82
} else if ( pic->type == mitkIpPicInt && pic->bpe == 32 ){ \
83
function<int>( pic, param1 ); \
84
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 32 ){ \
85
function<unsigned int>( pic, param1 ); \
86
} else if ( pic->type == mitkIpPicInt && pic->bpe == 64 ){ \
87
function<long>( pic, param1 ); \
88
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 64 ){ \
89
function<unsigned long>( pic, param1 ); \
90
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 32 ){ \
91
function<float>( pic, param1 ); \
92
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 64 ){ \
93
function<double>( pic, param1 ); \
94
} \
95
}
96
/*
97
else if ( pic->type == mitkIpPicComplex && pic->bpe == 64 ){
98
function<std::complex<float> >( pic, param1 );
99
} else if ( pic->type == mitkIpPicComplex && pic->bpe == 128 ){
100
function<std::complex<double> >( pic, param1 );
101
}
102
*/
103
104
#define mitkIpPicTypeMultiplex2( function, pic, param1, param2 ) \
105
{ \
106
if ( pic->type == mitkIpPicInt && pic->bpe == 8 ){ \
107
function<char>( pic, param1, param2 ); \
108
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 8 ){ \
109
function<unsigned char>( pic, param1, param2 ); \
110
} else if ( pic->type == mitkIpPicInt && pic->bpe == 16 ){ \
111
function<short>( pic, param1, param2 ); \
112
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 16 ){ \
113
function<unsigned short>( pic, param1, param2 ); \
114
} else if ( pic->type == mitkIpPicInt && pic->bpe == 32 ){ \
115
function<int>( pic, param1, param2 ); \
116
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 32 ){ \
117
function<unsigned int>( pic, param1, param2 ); \
118
} else if ( pic->type == mitkIpPicInt && pic->bpe == 64 ){ \
119
function<long>( pic, param1, param2 ); \
120
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 64 ){ \
121
function<unsigned long>( pic, param1, param2 ); \
122
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 32 ){ \
123
function<float>( pic, param1, param2 ); \
124
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 64 ){ \
125
function<double>( pic, param1, param2 ); \
126
} \
127
}
128
/*
129
else if ( pic->type == mitkIpPicComplex && pic->bpe == 64 ){
130
function<std::complex<float> >( pic, param1, param2 );
131
} else if ( pic->type == mitkIpPicComplex && pic->bpe == 128 ){
132
function<std::complex<double> >( pic, param1, param2 );
133
}
134
*/
135
#define mitkIpPicTypeMultiplex3( function, pic, param1, param2, param3 ) \
136
{ \
137
if ( pic->type == mitkIpPicInt && pic->bpe == 8 ){ \
138
function<char>( pic, param1, param2, param3 ); \
139
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 8 ){ \
140
function<unsigned char>( pic, param1, param2, param3 ); \
141
} else if ( pic->type == mitkIpPicInt && pic->bpe == 16 ){ \
142
function<short>( pic, param1, param2, param3 ); \
143
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 16 ){ \
144
function<unsigned short>( pic, param1, param2, param3 ); \
145
} else if ( pic->type == mitkIpPicInt && pic->bpe == 32 ){ \
146
function<int>( pic, param1, param2, param3 ); \
147
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 32 ){ \
148
function<unsigned int>( pic, param1, param2, param3 ); \
149
} else if ( pic->type == mitkIpPicInt && pic->bpe == 64 ){ \
150
function<long>( pic, param1, param2, param3 ); \
151
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 64 ){ \
152
function<unsigned long>( pic, param1, param2, param3 ); \
153
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 32 ){ \
154
function<float>( pic, param1, param2, param3 ); \
155
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 64 ){ \
156
function<double>( pic, param1, param2, param3 ); \
157
} \
158
}
159
/*else if ( pic->type == mitkIpPicComplex && pic->bpe == 64 ){
160
function<std::complex<float> >( pic, param1, param2, param3 );
161
} else if ( pic->type == mitkIpPicComplex && pic->bpe == 128 ){
162
function<std::complex<double> >( pic, param1, param2, param3 );
163
}*/
164
165
#define mitkIpPicTypeMultiplex4( function, pic, param1, param2, param3, param4 ) \
166
{ \
167
if ( pic->type == mitkIpPicInt && pic->bpe == 8 ){ \
168
function<char>( pic, param1, param2, param3, param4 ); \
169
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 8 ){ \
170
function<unsigned char>( pic, param1, param2, param3, param4 ); \
171
} else if ( pic->type == mitkIpPicInt && pic->bpe == 16 ){ \
172
function<short>( pic, param1, param2, param3, param4 ); \
173
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 16 ){ \
174
function<unsigned short>( pic, param1, param2, param3, param4 ); \
175
} else if ( pic->type == mitkIpPicInt && pic->bpe == 32 ){ \
176
function<int>( pic, param1, param2, param3, param4 ); \
177
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 32 ){ \
178
function<unsigned int>( pic, param1, param2, param3, param4 ); \
179
} else if ( pic->type == mitkIpPicInt && pic->bpe == 64 ){ \
180
function<long>( pic, param1, param2, param3, param4 ); \
181
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 64 ){ \
182
function<unsigned long>( pic, param1, param2, param3, param4 ); \
183
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 32 ){ \
184
function<float>( pic, param1, param2, param3, param4 ); \
185
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 64 ){ \
186
function<double>( pic, param1, param2, param3, param4 ); \
187
} \
188
}
189
/*
190
else if ( pic->type == mitkIpPicComplex && pic->bpe == 64 ){
191
function<std::complex<float> >( pic, param1, param2, param3, param4 );
192
} else if ( pic->type == mitkIpPicComplex && pic->bpe == 128 ){
193
function<std::complex<double> >( pic, param1, param2, param3, param4 );
194
}*/
195
196
#define mitkIpPicTypeMultiplex5( function, pic, param1, param2, param3, param4, param5 ) \
197
{ \
198
if ( pic->type == mitkIpPicInt && pic->bpe == 8 ){ \
199
function<char>( pic, param1, param2, param3, param4, param5 ); \
200
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 8 ){ \
201
function<unsigned char>( pic, param1, param2, param3, param4, param5 ); \
202
} else if ( pic->type == mitkIpPicInt && pic->bpe == 16 ){ \
203
function<short>( pic, param1, param2, param3, param4, param5 ); \
204
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 16 ){ \
205
function<unsigned short>( pic, param1, param2, param3, param4, param5 ); \
206
} else if ( pic->type == mitkIpPicInt && pic->bpe == 32 ){ \
207
function<int>( pic, param1, param2, param3, param4, param5 ); \
208
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 32 ){ \
209
function<unsigned int>( pic, param1, param2, param3, param4, param5 ); \
210
} else if ( pic->type == mitkIpPicInt && pic->bpe == 64 ){ \
211
function<long>( pic, param1, param2, param3, param4, param5 ); \
212
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 64 ){ \
213
function<unsigned long>( pic, param1, param2, param3, param4, param5 ); \
214
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 32 ){ \
215
function<float>( pic, param1, param2, param3, param4, param5 ); \
216
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 64 ){ \
217
function<double>( pic, param1, param2, param3, param4, param5 ); \
218
} \
219
}
220
/* else if ( pic->type == mitkIpPicComplex && pic->bpe == 64 ){
221
function<std::complex<float> >( pic, param1, param2, param3, param4, param5 );
222
} else if ( pic->type == mitkIpPicComplex && pic->bpe == 128 ){
223
function<std::complex<double> >( pic, param1, param2, param3, param4, param5 );
224
}
225
*/
226
#define mitkIpPicTypeMultiplex6( function, pic, param1, param2, param3, param4, param5, param6 ) \
227
{ \
228
if ( pic->type == mitkIpPicInt && pic->bpe == 8 ){ \
229
function<char>( pic, param1, param2, param3, param4, param5, param6 ); \
230
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 8 ){ \
231
function<unsigned char>( pic, param1, param2, param3, param4, param5, param6 ); \
232
} else if ( pic->type == mitkIpPicInt && pic->bpe == 16 ){ \
233
function<short>( pic, param1, param2, param3, param4, param5, param6 ); \
234
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 16 ){ \
235
function<unsigned short>( pic, param1, param2, param3, param4, param5, param6 ); \
236
} else if ( pic->type == mitkIpPicInt && pic->bpe == 32 ){ \
237
function<int>( pic, param1, param2, param3, param4, param5, param6 ); \
238
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 32 ){ \
239
function<unsigned int>( pic, param1, param2, param3, param4, param5, param6 ); \
240
} else if ( pic->type == mitkIpPicInt && pic->bpe == 64 ){ \
241
function<long>( pic, param1, param2, param3, param4, param5, param6 ); \
242
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 64 ){ \
243
function<unsigned long>( pic, param1, param2, param3, param4, param5, param6 ); \
244
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 32 ){ \
245
function<float>( pic, param1, param2, param3, param4, param5, param6 ); \
246
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 64 ){ \
247
function<double>( pic, param1, param2, param3, param4, param5, param6 ); \
248
} \
249
}
250
/*else if ( pic->type == mitkIpPicComplex && pic->bpe == 64 ){
251
function<std::complex<float> >( pic, param1, param2, param3, param4, param5, param6 );
252
} else if ( pic->type == mitkIpPicComplex && pic->bpe == 128 ){
253
function<std::complex<double> >( pic, param1, param2, param3, param4, param5, param6 );
254
}*/
255
256
#define mitkIpPicTypeMultiplex7( function, pic, param1, param2, param3, param4, param5, param6, param7 ) \
257
{ \
258
if ( pic->type == mitkIpPicInt && pic->bpe == 8 ){ \
259
function<char>( pic, param1, param2, param3, param4, param5, param6, param7 ); \
260
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 8 ){ \
261
function<unsigned char>( pic, param1, param2, param3, param4, param5, param6, param7 ); \
262
} else if ( pic->type == mitkIpPicInt && pic->bpe == 16 ){ \
263
function<short>( pic, param1, param2, param3, param4, param5, param6, param7 ); \
264
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 16 ){ \
265
function<unsigned short>( pic, param1, param2, param3, param4, param5, param6, param7 ); \
266
} else if ( pic->type == mitkIpPicInt && pic->bpe == 32 ){ \
267
function<int>( pic, param1, param2, param3, param4, param5, param6, param7 ); \
268
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 32 ){ \
269
function<unsigned int>( pic, param1, param2, param3, param4, param5, param6, param7 ); \
270
} else if ( pic->type == mitkIpPicInt && pic->bpe == 64 ){ \
271
function<long>( pic, param1, param2, param3, param4, param5, param6, param7 ); \
272
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 64 ){ \
273
function<unsigned long>( pic, param1, param2, param3, param4, param5, param6, param7 ); \
274
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 32 ){ \
275
function<float>( pic, param1, param2, param3, param4, param5, param6, param7 ); \
276
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 64 ){ \
277
function<double>( pic, param1, param2, param3, param4, param5, param6, param7 ); \
278
} \
279
}
280
/*else if ( pic->type == mitkIpPicComplex && pic->bpe == 64 ){
281
function<std::complex<float> >( pic, param1, param2, param3, param4, param5, param6 );
282
} else if ( pic->type == mitkIpPicComplex && pic->bpe == 128 ){
283
function<std::complex<double> >( pic, param1, param2, param3, param4, param5, param6 );
284
}*/
285
286
#define mitkIpPicTypeMultiplex7( function, pic, param1, param2, param3, param4, param5, param6, param7 ) \
287
{ \
288
if ( pic->type == mitkIpPicInt && pic->bpe == 8 ){ \
289
function<char>( pic, param1, param2, param3, param4, param5, param6, param7 ); \
290
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 8 ){ \
291
function<unsigned char>( pic, param1, param2, param3, param4, param5, param6, param7 ); \
292
} else if ( pic->type == mitkIpPicInt && pic->bpe == 16 ){ \
293
function<short>( pic, param1, param2, param3, param4, param5, param6, param7 ); \
294
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 16 ){ \
295
function<unsigned short>( pic, param1, param2, param3, param4, param5, param6, param7 ); \
296
} else if ( pic->type == mitkIpPicInt && pic->bpe == 32 ){ \
297
function<int>( pic, param1, param2, param3, param4, param5, param6, param7 ); \
298
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 32 ){ \
299
function<unsigned int>( pic, param1, param2, param3, param4, param5, param6, param7 ); \
300
} else if ( pic->type == mitkIpPicInt && pic->bpe == 64 ){ \
301
function<long>( pic, param1, param2, param3, param4, param5, param6, param7 ); \
302
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 64 ){ \
303
function<unsigned long>( pic, param1, param2, param3, param4, param5, param6, param7 ); \
304
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 32 ){ \
305
function<float>( pic, param1, param2, param3, param4, param5, param6, param7 ); \
306
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 64 ){ \
307
function<double>( pic, param1, param2, param3, param4, param5, param6, param7 ); \
308
} \
309
}
310
/*else if ( pic->type == mitkIpPicComplex && pic->bpe == 64 ){
311
function<std::complex<float> >( pic, param1, param2, param3, param4, param5, param6 );
312
} else if ( pic->type == mitkIpPicComplex && pic->bpe == 128 ){
313
function<std::complex<double> >( pic, param1, param2, param3, param4, param5, param6 );
314
}*/
315
316
#define mitkIpPicTypeMultiplex8( function, pic, param1, param2, param3, param4, param5, param6, param7, param8) \
317
{ \
318
if ( pic->type == mitkIpPicInt && pic->bpe == 8 ){ \
319
function<char>( pic, param1, param2, param3, param4, param5, param6, param7, param8); \
320
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 8 ){ \
321
function<unsigned char>( pic, param1, param2, param3, param4, param5, param6, param7, param8); \
322
} else if ( pic->type == mitkIpPicInt && pic->bpe == 16 ){ \
323
function<short>( pic, param1, param2, param3, param4, param5, param6, param7, param8); \
324
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 16 ){ \
325
function<unsigned short>( pic, param1, param2, param3, param4, param5, param6, param7, param8); \
326
} else if ( pic->type == mitkIpPicInt && pic->bpe == 32 ){ \
327
function<int>( pic, param1, param2, param3, param4, param5, param6, param7, param8); \
328
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 32 ){ \
329
function<unsigned int>( pic, param1, param2, param3, param4, param5, param6, param7, param8); \
330
} else if ( pic->type == mitkIpPicInt && pic->bpe == 64 ){ \
331
function<long>( pic, param1, param2, param3, param4, param5, param6, param7, param8); \
332
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 64 ){ \
333
function<unsigned long>( pic, param1, param2, param3, param4, param5, param6, param7, param8); \
334
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 32 ){ \
335
function<float>( pic, param1, param2, param3, param4, param5, param6, param7, param8); \
336
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 64 ){ \
337
function<double>( pic, param1, param2, param3, param4, param5, param6, param7, param8); \
338
} \
339
}
340
/*else if ( pic->type == mitkIpPicComplex && pic->bpe == 64 ){
341
function<std::complex<float> >( pic, param1, param2, param3, param4, param5, param6 );
342
} else if ( pic->type == mitkIpPicComplex && pic->bpe == 128 ){
343
function<std::complex<double> >( pic, param1, param2, param3, param4, param5, param6 );
344
}*/
345
346
#define mitkIpPicTypeMultiplex9( function, pic, param1, param2, param3, param4, param5, param6, param7, param8, param9) \
347
{ \
348
if ( pic->type == mitkIpPicInt && pic->bpe == 8 ){ \
349
function<char>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9); \
350
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 8 ){ \
351
function<unsigned char>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9); \
352
} else if ( pic->type == mitkIpPicInt && pic->bpe == 16 ){ \
353
function<short>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9); \
354
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 16 ){ \
355
function<unsigned short>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9); \
356
} else if ( pic->type == mitkIpPicInt && pic->bpe == 32 ){ \
357
function<int>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9); \
358
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 32 ){ \
359
function<unsigned int>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9); \
360
} else if ( pic->type == mitkIpPicInt && pic->bpe == 64 ){ \
361
function<long>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9); \
362
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 64 ){ \
363
function<unsigned long>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9); \
364
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 32 ){ \
365
function<float>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9); \
366
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 64 ){ \
367
function<double>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9); \
368
} \
369
}
370
/*else if ( pic->type == mitkIpPicComplex && pic->bpe == 64 ){
371
function<std::complex<float> >( pic, param1, param2, param3, param4, param5, param6 );
372
} else if ( pic->type == mitkIpPicComplex && pic->bpe == 128 ){
373
function<std::complex<double> >( pic, param1, param2, param3, param4, param5, param6 );
374
}*/
375
376
#define mitkIpPicTypeMultiplex10( function, pic, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10) \
377
{ \
378
if ( pic->type == mitkIpPicInt && pic->bpe == 8 ){ \
379
function<char>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10); \
380
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 8 ){ \
381
function<unsigned char>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10); \
382
} else if ( pic->type == mitkIpPicInt && pic->bpe == 16 ){ \
383
function<short>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10); \
384
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 16 ){ \
385
function<unsigned short>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10); \
386
} else if ( pic->type == mitkIpPicInt && pic->bpe == 32 ){ \
387
function<int>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10); \
388
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 32 ){ \
389
function<unsigned int>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10); \
390
} else if ( pic->type == mitkIpPicInt && pic->bpe == 64 ){ \
391
function<long>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10); \
392
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 64 ){ \
393
function<unsigned long>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10); \
394
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 32 ){ \
395
function<float>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10); \
396
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 64 ){ \
397
function<double>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10); \
398
} \
399
}
400
/*else if ( pic->type == mitkIpPicComplex && pic->bpe == 64 ){
401
function<std::complex<float> >( pic, param1, param2, param3, param4, param5, param6 );
402
} else if ( pic->type == mitkIpPicComplex && pic->bpe == 128 ){
403
function<std::complex<double> >( pic, param1, param2, param3, param4, param5, param6 );
404
}*/
405
406
#define mitkIpPicTypeMultiplex16( function, pic, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16 ) \
407
{ \
408
if ( pic->type == mitkIpPicInt && pic->bpe == 8 ){ \
409
function<char>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16 ); \
410
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 8 ){ \
411
function<unsigned char>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16 ); \
412
} else if ( pic->type == mitkIpPicInt && pic->bpe == 16 ){ \
413
function<short>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16 ); \
414
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 16 ){ \
415
function<unsigned short>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16 ); \
416
} else if ( pic->type == mitkIpPicInt && pic->bpe == 32 ){ \
417
function<int>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16 ); \
418
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 32 ){ \
419
function<unsigned int>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16 ); \
420
} else if ( pic->type == mitkIpPicInt && pic->bpe == 64 ){ \
421
function<long>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16 ); \
422
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 64 ){ \
423
function<unsigned long>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16 ); \
424
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 32 ){ \
425
function<float>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16 ); \
426
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 64 ){ \
427
function<double>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16 ); \
428
} \
429
}
430
/*else if ( pic->type == mitkIpPicComplex && pic->bpe == 64 ){
431
function<std::complex<float> >( pic, param1, param2, param3, param4, param5, param6 );
432
} else if ( pic->type == mitkIpPicComplex && pic->bpe == 128 ){
433
function<std::complex<double> >( pic, param1, param2, param3, param4, param5, param6 );
434
}*/
439
#define mitkIpPicTypeMultiplexR0( function, pic, returnValue ) \
440
{ \
441
if ( ( pic->type == mitkIpPicInt || pic->type == mitkIpPicUInt ) && pic->bpe == 1 ){ \
442
} else if ( pic->type == mitkIpPicInt && pic->bpe == 8 ){ \
443
returnValue = function<char>( pic ); \
444
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 8 ){ \
445
returnValue = function<unsigned char>( pic ); \
446
} else if ( pic->type == mitkIpPicInt && pic->bpe == 16 ){ \
447
returnValue = function<short>( pic ); \
448
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 16 ){ \
449
returnValue = function<unsigned short>( pic ); \
450
} else if ( pic->type == mitkIpPicInt && pic->bpe == 32 ){ \
451
returnValue = function<int>( pic ); \
452
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 32 ){ \
453
returnValue = function<unsigned int>( pic ); \
454
} else if ( pic->type == mitkIpPicInt && pic->bpe == 64 ){ \
455
returnValue = function<long>( pic ); \
456
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 64 ){ \
457
returnValue = function<unsigned long>( pic ); \
458
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 32 ){ \
459
returnValue = function<float>( pic ); \
460
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 64 ){ \
461
returnValue = function<double>( pic ); \
462
} \
463
}
464
465
#define mitkIpPicTypeMultiplexR1( function, pic, returnValue, param1 ) \
466
{ \
467
if ( ( pic->type == mitkIpPicInt || pic->type == mitkIpPicUInt ) && pic->bpe == 1 ){ \
468
} else if ( pic->type == mitkIpPicInt && pic->bpe == 8 ){ \
469
returnValue = function<char>( pic, param1 ); \
470
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 8 ){ \
471
returnValue = function<unsigned char>( pic, param1 ); \
472
} else if ( pic->type == mitkIpPicInt && pic->bpe == 16 ){ \
473
returnValue = function<short>( pic, param1 ); \
474
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 16 ){ \
475
returnValue = function<unsigned short>( pic, param1 ); \
476
} else if ( pic->type == mitkIpPicInt && pic->bpe == 32 ){ \
477
returnValue = function<int>( pic, param1 ); \
478
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 32 ){ \
479
returnValue = function<unsigned int>( pic, param1 ); \
480
} else if ( pic->type == mitkIpPicInt && pic->bpe == 64 ){ \
481
returnValue = function<long>( pic, param1 ); \
482
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 64 ){ \
483
returnValue = function<unsigned long>( pic, param1 ); \
484
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 32 ){ \
485
returnValue = function<float>( pic, param1 ); \
486
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 64 ){ \
487
returnValue = function<double>( pic, param1 ); \
488
} \
489
}
490
491
#define mitkIpPicTypeMultiplexR2( function, pic, returnValue, param1, param2 ) \
492
{ \
493
if ( pic->type == mitkIpPicInt && pic->bpe == 8 ){ \
494
returnValue = function<char>( pic, param1, param2 ); \
495
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 8 ){ \
496
returnValue = function<unsigned char>( pic, param1, param2 ); \
497
} else if ( pic->type == mitkIpPicInt && pic->bpe == 16 ){ \
498
returnValue = function<short>( pic, param1, param2 ); \
499
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 16 ){ \
500
returnValue = function<unsigned short>( pic, param1, param2 ); \
501
} else if ( pic->type == mitkIpPicInt && pic->bpe == 32 ){ \
502
returnValue = function<int>( pic, param1, param2 ); \
503
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 32 ){ \
504
returnValue = function<unsigned int>( pic, param1, param2 ); \
505
} else if ( pic->type == mitkIpPicInt && pic->bpe == 64 ){ \
506
returnValue = function<long>( pic, param1, param2 ); \
507
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 64 ){ \
508
returnValue = function<unsigned long>( pic, param1, param2 ); \
509
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 32 ){ \
510
returnValue = function<float>( pic, param1, param2 ); \
511
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 64 ){ \
512
returnValue = function<double>( pic, param1, param2 ); \
513
} \
514
}
515
516
#define mitkIpPicTypeMultiplexR3( function, pic, returnValue, param1, param2, param3 ) \
517
{ \
518
if ( pic->type == mitkIpPicInt && pic->bpe == 8 ){ \
519
returnValue = function<char>( pic, param1, param2, param3 ); \
520
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 8 ){ \
521
returnValue = function<unsigned char>( pic, param1, param2, param3 ); \
522
} else if ( pic->type == mitkIpPicInt && pic->bpe == 16 ){ \
523
returnValue = function<short>( pic, param1, param2, param3 ); \
524
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 16 ){ \
525
returnValue = function<unsigned short>( pic, param1, param2, param3 ); \
526
} else if ( pic->type == mitkIpPicInt && pic->bpe == 32 ){ \
527
returnValue = function<int>( pic, param1, param2, param3 ); \
528
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 32 ){ \
529
returnValue = function<unsigned int>( pic, param1, param2, param3 ); \
530
} else if ( pic->type == mitkIpPicInt && pic->bpe == 64 ){ \
531
returnValue = function<long>( pic, param1, param2, param3 ); \
532
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 64 ){ \
533
returnValue = function<unsigned long>( pic, param1, param2, param3 ); \
534
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 32 ){ \
535
returnValue = function<float>( pic, param1, param2, param3 ); \
536
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 64 ){ \
537
returnValue = function<double>( pic, param1, param2, param3 ); \
538
} \
539
}
540
541
#define mitkIpPicTypeMultiplexR4( function, pic, returnValue, param1, param2, param3, param4 ) \
542
{ \
543
if ( pic->type == mitkIpPicInt && pic->bpe == 8 ){ \
544
returnValue = function<char>( pic, param1, param2, param3, param4 ); \
545
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 8 ){ \
546
returnValue = function<unsigned char>( pic, param1, param2, param3, param4 ); \
547
} else if ( pic->type == mitkIpPicInt && pic->bpe == 16 ){ \
548
returnValue = function<short>( pic, param1, param2, param3, param4 ); \
549
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 16 ){ \
550
returnValue = function<unsigned short>( pic, param1, param2, param3, param4 ); \
551
} else if ( pic->type == mitkIpPicInt && pic->bpe == 32 ){ \
552
returnValue = function<int>( pic, param1, param2, param3, param4 ); \
553
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 32 ){ \
554
returnValue = function<unsigned int>( pic, param1, param2, param3, param4 ); \
555
} else if ( pic->type == mitkIpPicInt && pic->bpe == 64 ){ \
556
returnValue = function<long>( pic, param1, param2, param3, param4 ); \
557
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 64 ){ \
558
returnValue = function<unsigned long>( pic, param1, param2, param3, param4 ); \
559
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 32 ){ \
560
returnValue = function<float>( pic, param1, param2, param3, param4 ); \
561
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 64 ){ \
562
returnValue = function<double>( pic, param1, param2, param3, param4 ); \
563
} \
564
}
565
566
#define mitkIpPicTypeMultiplexR5( function, pic, returnValue, param1, param2, param3, param4, param5 ) \
567
{ \
568
if ( pic->type == mitkIpPicInt && pic->bpe == 8 ){ \
569
returnValue = function<char>( pic, param1, param2, param3, param4, param5 ); \
570
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 8 ){ \
571
returnValue = function<unsigned char>( pic, param1, param2, param3, param4, param5 ); \
572
} else if ( pic->type == mitkIpPicInt && pic->bpe == 16 ){ \
573
returnValue = function<short>( pic, param1, param2, param3, param4, param5 ); \
574
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 16 ){ \
575
returnValue = function<unsigned short>( pic, param1, param2, param3, param4, param5 ); \
576
} else if ( pic->type == mitkIpPicInt && pic->bpe == 32 ){ \
577
returnValue = function<int>( pic, param1, param2, param3, param4, param5 ); \
578
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 32 ){ \
579
returnValue = function<unsigned int>( pic, param1, param2, param3, param4, param5 ); \
580
} else if ( pic->type == mitkIpPicInt && pic->bpe == 64 ){ \
581
returnValue = function<long>( pic, param1, param2, param3, param4, param5 ); \
582
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 64 ){ \
583
returnValue = function<unsigned long>( pic, param1, param2, param3, param4, param5 ); \
584
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 32 ){ \
585
returnValue = function<float>( pic, param1, param2, param3, param4, param5 ); \
586
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 64 ){ \
587
returnValue = function<double>( pic, param1, param2, param3, param4, param5 ); \
588
} \
589
}
590
591
#define mitkIpPicTypeMultiplexR6( function, pic, returnValue, param1, param2, param3, param4, param5, param6 ) \
592
{ \
593
if ( pic->type == mitkIpPicInt && pic->bpe == 8 ){ \
594
returnValue = function<char>( pic, param1, param2, param3, param4, param5, param6 ); \
595
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 8 ){ \
596
returnValue = function<unsigned char>( pic, param1, param2, param3, param4, param5, param6 ); \
597
} else if ( pic->type == mitkIpPicInt && pic->bpe == 16 ){ \
598
returnValue = function<short>( pic, param1, param2, param3, param4, param5, param6 ); \
599
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 16 ){ \
600
returnValue = function<unsigned short>( pic, param1, param2, param3, param4, param5, param6 ); \
601
} else if ( pic->type == mitkIpPicInt && pic->bpe == 32 ){ \
602
returnValue = function<int>( pic, param1, param2, param3, param4, param5, param6 ); \
603
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 32 ){ \
604
returnValue = function<unsigned int>( pic, param1, param2, param3, param4, param5, param6 ); \
605
} else if ( pic->type == mitkIpPicInt && pic->bpe == 64 ){ \
606
returnValue = function<long>( pic, param1, param2, param3, param4, param5, param6 ); \
607
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 64 ){ \
608
returnValue = function<unsigned long>( pic, param1, param2, param3, param4, param5, param6 ); \
609
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 32 ){ \
610
returnValue = function<float>( pic, param1, param2, param3, param4, param5, param6 ); \
611
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 64 ){ \
612
returnValue = function<double>( pic, param1, param2, param3, param4, param5, param6 ); \
613
} \
614
}
615
616
#define mitkIpPicTypeMultiplexR7( function, pic, returnValue, param1, param2, param3, param4, param5, param6, param7 ) \
617
{ \
618
if ( pic->type == mitkIpPicInt && pic->bpe == 8 ){ \
619
returnValue = function<char>( pic, param1, param2, param3, param4, param5, param6, param7 ); \
620
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 8 ){ \
621
returnValue = function<unsigned char>( pic, param1, param2, param3, param4, param5, param6, param7 ); \
622
} else if ( pic->type == mitkIpPicInt && pic->bpe == 16 ){ \
623
returnValue = function<short>( pic, param1, param2, param3, param4, param5, param6, param7 ); \
624
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 16 ){ \
625
returnValue = function<unsigned short>( pic, param1, param2, param3, param4, param5, param6, param7 ); \
626
} else if ( pic->type == mitkIpPicInt && pic->bpe == 32 ){ \
627
returnValue = function<int>( pic, param1, param2, param3, param4, param5, param6, param7 ); \
628
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 32 ){ \
629
returnValue = function<unsigned int>( pic, param1, param2, param3, param4, param5, param6, param7 ); \
630
} else if ( pic->type == mitkIpPicInt && pic->bpe == 64 ){ \
631
returnValue = function<long>( pic, param1, param2, param3, param4, param5, param6, param7 ); \
632
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 64 ){ \
633
returnValue = function<unsigned long>( pic, param1, param2, param3, param4, param5, param6, param7 ); \
634
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 32 ){ \
635
returnValue = function<float>( pic, param1, param2, param3, param4, param5, param6, param7 ); \
636
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 64 ){ \
637
returnValue = function<double>( pic, param1, param2, param3, param4, param5, param6, param7 ); \
638
} \
639
}
640
641
#define mitkIpPicTypeMultiplexR8( function, pic, returnValue, param1, param2, param3, param4, param5, param6, param7, param8 ) \
642
{ \
643
if ( pic->type == mitkIpPicInt && pic->bpe == 8 ){ \
644
returnValue = function<char>( pic, param1, param2, param3, param4, param5, param6, param7, param8 ); \
645
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 8 ){ \
646
returnValue = function<unsigned char>( pic, param1, param2, param3, param4, param5, param6, param7, param8 ); \
647
} else if ( pic->type == mitkIpPicInt && pic->bpe == 16 ){ \
648
returnValue = function<short>( pic, param1, param2, param3, param4, param5, param6, param7, param8 ); \
649
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 16 ){ \
650
returnValue = function<unsigned short>( pic, param1, param2, param3, param4, param5, param6, param7, param8 ); \
651
} else if ( pic->type == mitkIpPicInt && pic->bpe == 32 ){ \
652
returnValue = function<int>( pic, param1, param2, param3, param4, param5, param6, param7, param8 ); \
653
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 32 ){ \
654
returnValue = function<unsigned int>( pic, param1, param2, param3, param4, param5, param6, param7, param8 ); \
655
} else if ( pic->type == mitkIpPicInt && pic->bpe == 64 ){ \
656
returnValue = function<long>( pic, param1, param2, param3, param4, param5, param6, param7, param8 ); \
657
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 64 ){ \
658
returnValue = function<unsigned long>( pic, param1, param2, param3, param4, param5, param6, param7, param8 ); \
659
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 32 ){ \
660
returnValue = function<float>( pic, param1, param2, param3, param4, param5, param6, param7, param8 ); \
661
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 64 ){ \
662
returnValue = function<double>( pic, param1, param2, param3, param4, param5, param6, param7, param8 ); \
663
} \
664
}
665
666
#define mitkIpPicTypeMultiplexR9( function, pic, returnValue, param1, param2, param3, param4, param5, param6, param7, param8, param9 ) \
667
{ \
668
if ( pic->type == mitkIpPicInt && pic->bpe == 8 ){ \
669
returnValue = function<char>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9 ); \
670
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 8 ){ \
671
returnValue = function<unsigned char>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9 ); \
672
} else if ( pic->type == mitkIpPicInt && pic->bpe == 16 ){ \
673
returnValue = function<short>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9 ); \
674
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 16 ){ \
675
returnValue = function<unsigned short>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9 ); \
676
} else if ( pic->type == mitkIpPicInt && pic->bpe == 32 ){ \
677
returnValue = function<int>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9 ); \
678
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 32 ){ \
679
returnValue = function<unsigned int>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9 ); \
680
} else if ( pic->type == mitkIpPicInt && pic->bpe == 64 ){ \
681
returnValue = function<long>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9 ); \
682
} else if ( pic->type == mitkIpPicUInt && pic->bpe == 64 ){ \
683
returnValue = function<unsigned long>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9 ); \
684
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 32 ){ \
685
returnValue = function<float>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9 ); \
686
} else if ( pic->type == mitkIpPicFloat && pic->bpe == 64 ){ \
687
returnValue = function<double>( pic, param1, param2, param3, param4, param5, param6, param7, param8, param9 ); \
688
} \
689
}
690
691
#endif // IP_PIC_TYPE_MULTIPLEX_H
mitkIpPic.h
git
MITK
Utilities
IpPic
mitkIpPicTypeMultiplex.h
Generated on Fri Feb 3 2017 20:52:01 for Medical Imaging Interaction Toolkit by
1.8.9.1