MeVisLab Toolbox Reference
mlITKNonScalarSupport.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2007, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13#pragma once
14
15#include "mlITKSupport.h"
16
17#include <complex>
18#include <itkDiffusionTensor3D.h>
19
21
23typedef itk::Vector<float, 2> mlItkVector2f;
24typedef itk::Vector<float, 3> mlItkVector3f;
25typedef itk::Vector<float, 4> mlItkVector4f;
26typedef itk::Vector<float, 6> mlItkVector6f;
27typedef itk::Vector<float, 8> mlItkVector8f;
28typedef itk::CovariantVector<float, 2> mlItkCVVector2f;
29typedef itk::CovariantVector<float, 3> mlItkCVVector3f;
30typedef itk::CovariantVector<float, 4> mlItkCVVector4f;
31typedef itk::CovariantVector<float, 6> mlItkCVVector6f;
32typedef itk::CovariantVector<float, 8> mlItkCVVector8f;
34
36typedef itk::Vector<double, 2> mlItkVector2d;
37typedef itk::Vector<double, 3> mlItkVector3d;
38typedef itk::Vector<double, 4> mlItkVector4d;
39typedef itk::Vector<double, 6> mlItkVector6d;
40typedef itk::Vector<double, 8> mlItkVector8d;
41typedef itk::CovariantVector<double, 2> mlItkCVVector2d;
42typedef itk::CovariantVector<double, 3> mlItkCVVector3d;
43typedef itk::CovariantVector<double, 4> mlItkCVVector4d;
44typedef itk::CovariantVector<double, 6> mlItkCVVector6d;
45typedef itk::CovariantVector<double, 8> mlItkCVVector8d;
47
49typedef std::complex<float> mlItkComplexf;
50typedef std::complex<double> mlItkComplexd;
52
54typedef std::complex<float> Complexf;
55typedef std::complex<double> Complexd;
57
59typedef itk::DiffusionTensor3D<float> mlItkDiffusionTensor3Df;
60typedef itk::DiffusionTensor3D<double> mlItkDiffusionTensor3Dd;
61typedef itk::SymmetricSecondRankTensor<float, 3> mlItkSymmetricSecondRankTensor3Df;
62typedef itk::SymmetricSecondRankTensor<double,3> mlItkSymmetricSecondRankTensor3Dd;
64
65
66
69#define _ML_IMPLEMENT_EMPTY_VECTOR_CASE(CLASS_NAME) \
70 case MLuint8Type: ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DATA_TYPE, "Dummy MLuint8Type type is not legal and is ignored."); break;
71
72//---------------------------------------------------------------------------
73//
75//
76//---------------------------------------------------------------------------
78#define _ML_IMPLEMENT_FVECTOR_TO_FVECTOR_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, ML_IT_VEC_TYPE) \
79 case MLVector2fType : \
80 DIM_INST(Vector2f, ML_IT_VEC_TYPE##2f, Vector2f, ML_IT_VEC_TYPE##2f, USER_CODE, CLASS_NAME, DIM); \
81 break; \
82 \
83 case MLVector3fType : \
84 DIM_INST(Vector3f, ML_IT_VEC_TYPE##3f, Vector3f, ML_IT_VEC_TYPE##3f, USER_CODE, CLASS_NAME, DIM); \
85 break; \
86 \
87 case MLVector4fType : \
88 DIM_INST(Vector4f, ML_IT_VEC_TYPE##4f, Vector4f, ML_IT_VEC_TYPE##4f, USER_CODE, CLASS_NAME, DIM); \
89 break; \
90 \
91 case MLVector6fType : \
92 DIM_INST(Vector6f, ML_IT_VEC_TYPE##6f, Vector6f, ML_IT_VEC_TYPE##6f, USER_CODE, CLASS_NAME, DIM); \
93 break; \
94 \
95 case MLVector8fType : \
96 DIM_INST(Vector8f, ML_IT_VEC_TYPE##8f, Vector8f, ML_IT_VEC_TYPE##8f, USER_CODE, CLASS_NAME, DIM); \
97 break; \
98
99
100#define _ML_IMPLEMENT_DVECTOR_TO_DVECTOR_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, ML_IT_VEC_TYPE) \
101 case MLVector2dType : \
102 DIM_INST(Vector2d, ML_IT_VEC_TYPE##2d, Vector2d, ML_IT_VEC_TYPE##2d, USER_CODE, CLASS_NAME, DIM); \
103 break; \
104 \
105 case MLVector3dType : \
106 DIM_INST(Vector3d, ML_IT_VEC_TYPE##3d, Vector3d, ML_IT_VEC_TYPE##3d, USER_CODE, CLASS_NAME, DIM); \
107 break; \
108 \
109 case MLVector4dType : \
110 DIM_INST(Vector4d, ML_IT_VEC_TYPE##4d, Vector4d, ML_IT_VEC_TYPE##4d, USER_CODE, CLASS_NAME, DIM); \
111 break; \
112 \
113 case MLVector6dType : \
114 DIM_INST(Vector6d, ML_IT_VEC_TYPE##6d, Vector6d, ML_IT_VEC_TYPE##6d, USER_CODE, CLASS_NAME, DIM); \
115 break; \
116 \
117 case MLVector8dType : \
118 DIM_INST(Vector8d, ML_IT_VEC_TYPE##8d, Vector8d, ML_IT_VEC_TYPE##8d, USER_CODE, CLASS_NAME, DIM); \
119 break; \
120 \
121 \
122
123
124#define _ML_IMPLEMENT_FDVECTOR_TO_FDVECTOR_CASES(INFO_STRING, CLASS_NAME, DATATYPE_ENUM, FCASES, DCASES) \
125{ \
126 /* Check for float component of first component of output image type. */ \
127 bool isFloatType = _addOns->getOutSubImageTypeInfos()->structInfoString[0]=='f'; \
128 bool isDoubleType = _addOns->getOutSubImageTypeInfos()->structInfoString[0]=='d'; \
129 if (isFloatType){ \
130 switch (DATATYPE_ENUM){ \
131 FCASES \
132 default: { \
133 ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DATA_TYPE, \
134 "Data type case not executed(_ML_IMPLEMENT_FDVECTOR_TO_FDVECTOR_CASES, 1).", \
135 ", DATATYPE_ENUM=", DATATYPE_ENUM); \
136 } \
137 break; \
138 } \
139 } \
140 else if (isDoubleType){ \
141 switch (DATATYPE_ENUM){ \
142 DCASES \
143 default: { \
144 ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DATA_TYPE, \
145 "Data type case not executed(_ML_IMPLEMENT_FDVECTOR_TO_FDVECTOR_CASES, 2).", \
146 ", DATATYPE_ENUM=", DATATYPE_ENUM); \
147 } \
148 break; \
149 } \
150 } \
151 else { \
152 ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DATA_TYPE, \
153 "Input data type case not executed(_ML_IMPLEMENT_FDVECTOR_TO_FDVECTOR_CASES)," \
154 "because it is neither a float nor a double vector type.", \
155 ", DATATYPE_ENUM=", DATATYPE_ENUM); \
156 } \
157} \
158
160
161
162
163//---------------------------------------------------------------------------
164//
166//
167//---------------------------------------------------------------------------
169#define _ML_IMPLEMENT_FVECTOR_TO_INT_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, ML_IT_VEC_TYPE) \
170 case MLVector2fType : \
171 if (MLint16Type == _m_PixelType){ \
172 DIM_INST(MLint16, MLint16, Vector2f, ML_IT_VEC_TYPE##2f, USER_CODE, CLASS_NAME, DIM); \
173 } else { \
174 DIM_INST(MLint32, MLint32, Vector2f, ML_IT_VEC_TYPE##2f, USER_CODE, CLASS_NAME, DIM); \
175 } \
176 break; \
177 \
178 case MLVector3fType : \
179 if (MLint16Type == _m_PixelType){ \
180 DIM_INST(MLint16, MLint16, Vector3f, ML_IT_VEC_TYPE##3f, USER_CODE, CLASS_NAME, DIM); \
181 } else { \
182 DIM_INST(MLint32, MLint32, Vector3f, ML_IT_VEC_TYPE##3f, USER_CODE, CLASS_NAME, DIM); \
183 } \
184 break; \
185 \
186 case MLVector4fType : \
187 if (MLint16Type == _m_PixelType){ \
188 DIM_INST(MLint16, MLint16, Vector4f, ML_IT_VEC_TYPE##4f, USER_CODE, CLASS_NAME, DIM); \
189 } else { \
190 DIM_INST(MLint32, MLint32, Vector4f, ML_IT_VEC_TYPE##4f, USER_CODE, CLASS_NAME, DIM); \
191 } \
192 break; \
193 \
194 case MLVector6fType : \
195 if (MLint16Type == _m_PixelType){ \
196 DIM_INST(MLint16, MLint16, Vector6f, ML_IT_VEC_TYPE##6f, USER_CODE, CLASS_NAME, DIM); \
197 } else { \
198 DIM_INST(MLint32, MLint32, Vector6f, ML_IT_VEC_TYPE##6f, USER_CODE, CLASS_NAME, DIM); \
199 } \
200 break; \
201 \
202 case MLVector8fType : \
203 if (MLint16Type == _m_PixelType){ \
204 DIM_INST(MLint16, MLint16, Vector8f, ML_IT_VEC_TYPE##8f, USER_CODE, CLASS_NAME, DIM); \
205 } else { \
206 DIM_INST(MLint32, MLint32, Vector8f, ML_IT_VEC_TYPE##8f, USER_CODE, CLASS_NAME, DIM); \
207 } \
208 break; \
209
210
211#define _ML_IMPLEMENT_DVECTOR_TO_INT_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, ML_IT_VEC_TYPE) \
212 case MLVector2dType : \
213 if (MLint16Type == _m_PixelType){ \
214 DIM_INST(MLint16, MLint16, Vector2d, ML_IT_VEC_TYPE##2d, USER_CODE, CLASS_NAME, DIM); \
215 } else { \
216 DIM_INST(MLint32, MLint32, Vector2d, ML_IT_VEC_TYPE##2d, USER_CODE, CLASS_NAME, DIM); \
217 } \
218 break; \
219 \
220 case MLVector3dType : \
221 if (MLint16Type == _m_PixelType){ \
222 DIM_INST(MLint16, MLint16, Vector3d, ML_IT_VEC_TYPE##3d, USER_CODE, CLASS_NAME, DIM); \
223 } else { \
224 DIM_INST(MLint32, MLint32, Vector3d, ML_IT_VEC_TYPE##3d, USER_CODE, CLASS_NAME, DIM); \
225 } \
226 break; \
227 \
228 case MLVector4dType : \
229 if (MLint16Type == _m_PixelType){ \
230 DIM_INST(MLint16, MLint16, Vector4d, ML_IT_VEC_TYPE##4d, USER_CODE, CLASS_NAME, DIM); \
231 } else { \
232 DIM_INST(MLint32, MLint32, Vector4d, ML_IT_VEC_TYPE##4d, USER_CODE, CLASS_NAME, DIM); \
233 } \
234 break; \
235 \
236 case MLVector6dType : \
237 if (MLint16Type == _m_PixelType){ \
238 DIM_INST(MLint16, MLint16, Vector6d, ML_IT_VEC_TYPE##6d, USER_CODE, CLASS_NAME, DIM); \
239 } else { \
240 DIM_INST(MLint32, MLint32, Vector6d, ML_IT_VEC_TYPE##6d, USER_CODE, CLASS_NAME, DIM); \
241 } \
242 break; \
243 \
244 case MLVector8dType : \
245 if (MLint16Type == _m_PixelType){ \
246 DIM_INST(MLint16, MLint16, Vector8d, ML_IT_VEC_TYPE##8d, USER_CODE, CLASS_NAME, DIM); \
247 } else { \
248 DIM_INST(MLint32, MLint32, Vector8d, ML_IT_VEC_TYPE##8d, USER_CODE, CLASS_NAME, DIM); \
249 } \
250 break; \
251
252
253#define _ML_IMPLEMENT_FDVECTOR_TO_INT_CASES(INFO_STRING, CLASS_NAME, DATATYPE_ENUM, FCASES, DCASES) \
254{ \
255 /* Check first component of input pixel type to select correct implementation for float or double vectors. */ \
256 bool isFloatType = _addOns->getInSubImageTypeInfos()->structInfoString[0]=='f'; \
257 bool isDoubleType = _addOns->getInSubImageTypeInfos()->structInfoString[0]=='d'; \
258 if (isFloatType){ \
259 const MLDataType fDataType = _addOns->getInputSubImageDataType(); \
260 switch (fDataType){ \
261 FCASES \
262 default: { \
263 ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DATA_TYPE, \
264 "Input type case not executed(_ML_IMPLEMENT_FDVECTOR_TO_INT_CASES, 1).", \
265 ", fDataType=", fDataType, ", _m_PixelType=", _m_PixelType); \
266 } \
267 break; \
268 }; \
269 } \
270 else if (isDoubleType){ \
271 const MLDataType dDataType = _addOns->getInputSubImageDataType(); \
272 switch (dDataType){ \
273 DCASES \
274 default: { \
275 ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DATA_TYPE, \
276 "Input type case not executed(_ML_IMPLEMENT_FDVECTOR_TO_INT_CASES, 2).", \
277 ", dDataType=", dDataType, ", _m_PixelType=", _m_PixelType); \
278 } \
279 }; \
280 } \
281 else{ \
282 ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DATA_TYPE, \
283 "Input type case not executed(_ML_IMPLEMENT_FDVECTOR_TO_INT_CASES), because it is neither " \
284 "a float nor a double vector type)", " _m_PixelType=", _m_PixelType); \
285 } \
286} \
287
289
290
291
292//---------------------------------------------------------------------------
293//
295//
296//---------------------------------------------------------------------------
298#define _ML_IMPLEMENT_FVECTOR_TO_REAL_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, ML_IT_VEC_TYPE) \
299 case MLVector2fType : \
300 DIM_INST(MLfloat, MLfloat, Vector2f, ML_IT_VEC_TYPE##2f, USER_CODE, CLASS_NAME, DIM); \
301 break; \
302 \
303 case MLVector3fType : \
304 DIM_INST(MLfloat, MLfloat, Vector3f, ML_IT_VEC_TYPE##3f, USER_CODE, CLASS_NAME, DIM); \
305 break; \
306 \
307 case MLVector4fType : \
308 DIM_INST(MLfloat, MLfloat, Vector4f, ML_IT_VEC_TYPE##4f, USER_CODE, CLASS_NAME, DIM); \
309 break; \
310 \
311 case MLVector6fType : \
312 DIM_INST(MLfloat, MLfloat, Vector6f, ML_IT_VEC_TYPE##6f, USER_CODE, CLASS_NAME, DIM); \
313 break; \
314 \
315 case MLVector8fType : \
316 DIM_INST(MLfloat, MLfloat, Vector8f, ML_IT_VEC_TYPE##8f, USER_CODE, CLASS_NAME, DIM); \
317 break; \
318
319
320#define _ML_IMPLEMENT_DVECTOR_TO_REAL_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, ML_IT_VEC_TYPE) \
321 case MLVector2dType : \
322 DIM_INST(MLdouble, MLdouble, Vector2d, ML_IT_VEC_TYPE##2d, USER_CODE, CLASS_NAME, DIM); \
323 break; \
324 \
325 case MLVector3dType : \
326 DIM_INST(MLdouble, MLdouble, Vector3d, ML_IT_VEC_TYPE##3d, USER_CODE, CLASS_NAME, DIM); \
327 break; \
328 \
329 case MLVector4dType : \
330 DIM_INST(MLdouble, MLdouble, Vector4d, ML_IT_VEC_TYPE##4d, USER_CODE, CLASS_NAME, DIM); \
331 break; \
332 \
333 case MLVector6dType : \
334 DIM_INST(MLdouble, MLdouble, Vector6d, ML_IT_VEC_TYPE##6d, USER_CODE, CLASS_NAME, DIM); \
335 break; \
336 \
337 case MLVector8dType : \
338 DIM_INST(MLdouble, MLdouble, Vector8d, ML_IT_VEC_TYPE##8d, USER_CODE, CLASS_NAME, DIM); \
339 break; \
340
341
342#define _ML_IMPLEMENT_FDVECTOR_TO_REAL_CASES(INFO_STRING, CLASS_NAME, DATATYPE_ENUM, FCASES, DCASES) \
343{ \
344 switch (_m_PixelType){ \
345 case MLfloatType : { \
346 const MLDataType fDataType = _addOns->getInputSubImageDataType(); \
347 switch (fDataType){ \
348 FCASES \
349 default: { \
350 ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DATA_TYPE, \
351 "Input type case not executed(_ML_IMPLEMENT_FDVECTOR_TO_REAL_CASES, 1).", \
352 ", fDataType=", fDataType, ", _m_PixelType=", _m_PixelType);\
353 } \
354 break; \
355 }; \
356 }; \
357 break; \
358 \
359 case MLdoubleType : { \
360 const MLDataType dDataType = _addOns->getInputSubImageDataType(); \
361 switch (dDataType){ \
362 DCASES \
363 default: { \
364 ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DATA_TYPE, \
365 "Input type case not executed(_ML_IMPLEMENT_FDVECTOR_TO_REAL_CASES, 2).", \
366 ", dDataType=", dDataType, ", _m_PixelType=", _m_PixelType); \
367 } \
368 }; \
369 }; \
370 break; \
371 \
372 default: { \
373 ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DATA_TYPE, \
374 "Output type case not executed(_ML_IMPLEMENT_FDVECTOR_TO_REAL_CASES, 3).", \
375 ", _m_PixelType=", _m_PixelType); \
376 } \
377 break; \
378 } \
379} \
380
381
382//---------------------------------------------------------------------------
383//
385//
386//---------------------------------------------------------------------------
388#define _ML_IMPLEMENT_REAL_TO_FVECTOR_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, ML_IT_VEC_TYPE) \
389 case MLVector2fType : \
390 DIM_INST(Vector2f, ML_IT_VEC_TYPE##2f, MLfloat, MLfloat, USER_CODE, CLASS_NAME, DIM); \
391 break; \
392 \
393 case MLVector3fType : \
394 DIM_INST(Vector3f, ML_IT_VEC_TYPE##3f, MLfloat, MLfloat, USER_CODE, CLASS_NAME, DIM); \
395 break; \
396 \
397 case MLVector4fType : \
398 DIM_INST(Vector4f, ML_IT_VEC_TYPE##4f, MLfloat, MLfloat, USER_CODE, CLASS_NAME, DIM); \
399 break; \
400 \
401 case MLVector6fType : \
402 DIM_INST(Vector6f, ML_IT_VEC_TYPE##6f, MLfloat, MLfloat, USER_CODE, CLASS_NAME, DIM); \
403 break; \
404 \
405 case MLVector8fType : \
406 DIM_INST(Vector8f, ML_IT_VEC_TYPE##8f, MLfloat, MLfloat, USER_CODE, CLASS_NAME, DIM); \
407 break; \
408
409
410#define _ML_IMPLEMENT_REAL_TO_DVECTOR_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, ML_IT_VEC_TYPE) \
411 case MLVector2dType : \
412 DIM_INST(Vector2d, ML_IT_VEC_TYPE##2d, MLdouble, MLdouble, USER_CODE, CLASS_NAME, DIM); \
413 break; \
414 \
415 case MLVector3dType : \
416 DIM_INST(Vector3d, ML_IT_VEC_TYPE##3d, MLdouble, MLdouble, USER_CODE, CLASS_NAME, DIM); \
417 break; \
418 \
419 case MLVector4dType : \
420 DIM_INST(Vector4d, ML_IT_VEC_TYPE##4d, MLdouble, MLdouble, USER_CODE, CLASS_NAME, DIM); \
421 break; \
422 \
423 case MLVector6dType : \
424 DIM_INST(Vector6d, ML_IT_VEC_TYPE##6d, MLdouble, MLdouble, USER_CODE, CLASS_NAME, DIM); \
425 break; \
426 \
427 case MLVector8dType : \
428 DIM_INST(Vector8d, ML_IT_VEC_TYPE##8d, MLdouble, MLdouble, USER_CODE, CLASS_NAME, DIM); \
429 break; \
430
431
432#define _ML_IMPLEMENT_REAL_TO_FDVECTOR_CASES(INFO_STRING, CLASS_NAME, DATATYPE_ENUM, FCASES, DCASES) \
433{ \
434 /* Check for float component of first component of output image type. */ \
435 bool isFloatType = _addOns->getOutSubImageTypeInfos()->structInfoString[0]=='f'; \
436 if (isFloatType){ \
437 switch (DATATYPE_ENUM){ \
438 FCASES \
439 default: { \
440 ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DATA_TYPE, "Data type case not executed(_ML_IMPLEMENT_REAL_TO_FDVECTOR_CASES, 1).", ", DATATYPE_ENUM=", DATATYPE_ENUM); \
441 } \
442 break; \
443 } \
444 } \
445 else{ \
446 switch (DATATYPE_ENUM){ \
447 DCASES \
448 default: { \
449 ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DATA_TYPE, "Data type case not executed(_ML_IMPLEMENT_REAL_TO_FDVECTOR_CASES, 2).", ", DATATYPE_ENUM=", DATATYPE_ENUM); \
450 } \
451 break; \
452 } \
453 } \
454} \
455
457
458//---------------------------------------------------------------------------------------------------------------------------
460//---------------------------------------------------------------------------------------------------------------------------
461
462//---------------------------------------------------------------------------
463// Float and double vectors.
464//---------------------------------------------------------------------------
465#define ML_IMPLEMENT_FDVECTOR_TO_FDVECTOR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
466 _ML_IMPLEMENT_FDVECTOR_TO_FDVECTOR_CASES(INFO_STRING, CLASS_NAME, DATATYPE_ENUM, \
467 _ML_IMPLEMENT_FVECTOR_TO_FVECTOR_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkVector),\
468 _ML_IMPLEMENT_DVECTOR_TO_DVECTOR_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkVector))
469
470#define ML_IMPLEMENT_FDVECTOR_TO_INT_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
471 _ML_IMPLEMENT_FDVECTOR_TO_INT_CASES(INFO_STRING, CLASS_NAME, DATATYPE_ENUM, \
472 _ML_IMPLEMENT_FVECTOR_TO_INT_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkVector), \
473 _ML_IMPLEMENT_DVECTOR_TO_INT_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkVector))
474
475#define ML_IMPLEMENT_FDVECTOR_TO_REAL_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
476 _ML_IMPLEMENT_FDVECTOR_TO_REAL_CASES(INFO_STRING, CLASS_NAME, DATATYPE_ENUM, \
477 _ML_IMPLEMENT_FVECTOR_TO_REAL_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkVector), \
478 _ML_IMPLEMENT_DVECTOR_TO_REAL_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkVector))
479
480#define ML_IMPLEMENT_REAL_TO_FDVECTOR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
481 _ML_IMPLEMENT_REAL_TO_FDVECTOR_CASES(INFO_STRING, CLASS_NAME, DATATYPE_ENUM, \
482 _ML_IMPLEMENT_REAL_TO_FVECTOR_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkVector), \
483 _ML_IMPLEMENT_REAL_TO_DVECTOR_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkVector))
484
485
486//---------------------------------------------------------------------------
487// Only float vectors.
488//---------------------------------------------------------------------------
489#define ML_IMPLEMENT_FVECTOR_TO_FVECTOR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
490 _ML_IMPLEMENT_FDVECTOR_TO_FDVECTOR_CASES(INFO_STRING, CLASS_NAME, DATATYPE_ENUM, \
491 _ML_IMPLEMENT_FVECTOR_TO_FVECTOR_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkVector), \
492 _ML_IMPLEMENT_EMPTY_VECTOR_CASE(CLASS_NAME))
493
494#define ML_IMPLEMENT_FVECTOR_TO_INT_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
495 _ML_IMPLEMENT_FDVECTOR_TO_INT_CASES(INFO_STRING, CLASS_NAME, DATATYPE_ENUM, \
496 _ML_IMPLEMENT_FVECTOR_TO_INT_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkVector), \
497 _ML_IMPLEMENT_EMPTY_VECTOR_CASE(CLASS_NAME))
498
499#define ML_IMPLEMENT_FVECTOR_TO_REAL_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
500 _ML_IMPLEMENT_FDVECTOR_TO_REAL_CASES(INFO_STRING, CLASS_NAME, DATATYPE_ENUM, \
501 _ML_IMPLEMENT_FVECTOR_TO_REAL_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkVector), \
502 _ML_IMPLEMENT_EMPTY_VECTOR_CASE(CLASS_NAME))
503
504#define ML_IMPLEMENT_REAL_TO_FVECTOR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
505 _ML_IMPLEMENT_REAL_TO_FDVECTOR_CASES(INFO_STRING, CLASS_NAME, DATATYPE_ENUM, \
506 _ML_IMPLEMENT_REAL_TO_FVECTOR_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkVector), \
507 _ML_IMPLEMENT_EMPTY_VECTOR_CASE(CLASS_NAME))
508
509//---------------------------------------------------------------------------
510// Only double vectors.
511//---------------------------------------------------------------------------
512#define ML_IMPLEMENT_DVECTOR_TO_DVECTOR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
513 _ML_IMPLEMENT_FDVECTOR_TO_FDVECTOR_CASES(INFO_STRING, CLASS_NAME, DATATYPE_ENUM, \
514 _ML_IMPLEMENT_EMPTY_VECTOR_CASE(CLASS_NAME), \
515 _ML_IMPLEMENT_DVECTOR_TO_DVECTOR_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkVector))
516
517#define ML_IMPLEMENT_DVECTOR_TO_INT_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
518 _ML_IMPLEMENT_FDVECTOR_TO_INT_CASES(INFO_STRING, CLASS_NAME, DATATYPE_ENUM, \
519 _ML_IMPLEMENT_EMPTY_VECTOR_CASE(CLASS_NAME), \
520 _ML_IMPLEMENT_DVECTOR_TO_INT_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkVector))
521
522#define ML_IMPLEMENT_DVECTOR_TO_REAL_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
523 _ML_IMPLEMENT_FDVECTOR_TO_REAL_CASES(INFO_STRING, CLASS_NAME, DATATYPE_ENUM, \
524 _ML_IMPLEMENT_EMPTY_VECTOR_CASE(CLASS_NAME), \
525 _ML_IMPLEMENT_DVECTOR_TO_REAL_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkVector))
526
527#define ML_IMPLEMENT_REAL_TO_DVECTOR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
528 _ML_IMPLEMENT_REAL_TO_FDVECTOR_CASES(INFO_STRING, CLASS_NAME, DATATYPE_ENUM, \
529 _ML_IMPLEMENT_EMPTY_VECTOR_CASE(CLASS_NAME), \
530 _ML_IMPLEMENT_REAL_TO_DVECTOR_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkVector))
532
533
534//---------------------------------------------------------------------------------------------------------------------------
536//---------------------------------------------------------------------------------------------------------------------------
537
538//---------------------------------------------------------------------------
539// Float and double vectors.
540//---------------------------------------------------------------------------
541#define ML_IMPLEMENT_CVFDVECTOR_TO_CVFDVECTOR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
542 _ML_IMPLEMENT_FDVECTOR_TO_FDVECTOR_CASES(INFO_STRING, CLASS_NAME, DATATYPE_ENUM, \
543 _ML_IMPLEMENT_FVECTOR_TO_FVECTOR_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkCVVector),\
544 _ML_IMPLEMENT_DVECTOR_TO_DVECTOR_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkCVVector))
545
546#define ML_IMPLEMENT_CVFDVECTOR_TO_INT_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
547 _ML_IMPLEMENT_FDVECTOR_TO_INT_CASES(INFO_STRING, CLASS_NAME, DATATYPE_ENUM, \
548 _ML_IMPLEMENT_FVECTOR_TO_INT_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkCVVector), \
549 _ML_IMPLEMENT_DVECTOR_TO_INT_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkCVVector))
550
551#define ML_IMPLEMENT_CVFDVECTOR_TO_REAL_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
552 _ML_IMPLEMENT_FDVECTOR_TO_REAL_CASES(INFO_STRING, CLASS_NAME, DATATYPE_ENUM, \
553 _ML_IMPLEMENT_FVECTOR_TO_REAL_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkCVVector), \
554 _ML_IMPLEMENT_DVECTOR_TO_REAL_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkCVVector))
555
556#define ML_IMPLEMENT_REAL_TO_CVFDVECTOR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
557 _ML_IMPLEMENT_REAL_TO_FDVECTOR_CASES(INFO_STRING, CLASS_NAME, DATATYPE_ENUM, \
558 _ML_IMPLEMENT_REAL_TO_FVECTOR_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkCVVector), \
559 _ML_IMPLEMENT_REAL_TO_DVECTOR_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkCVVector))
560
561
562//---------------------------------------------------------------------------
563// Only float vectors.
564//---------------------------------------------------------------------------
565#define ML_IMPLEMENT_CVFVECTOR_TO_CVFVECTOR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
566 _ML_IMPLEMENT_FDVECTOR_TO_FDVECTOR_CASES(INFO_STRING, CLASS_NAME, DATATYPE_ENUM, \
567 _ML_IMPLEMENT_FVECTOR_TO_FVECTOR_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkCVVector), \
568 _ML_IMPLEMENT_EMPTY_VECTOR_CASE(CLASS_NAME))
569
570#define ML_IMPLEMENT_CVFVECTOR_TO_INT_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
571 _ML_IMPLEMENT_FDVECTOR_TO_INT_CASES(INFO_STRING, CLASS_NAME, DATATYPE_ENUM, \
572 _ML_IMPLEMENT_FVECTOR_TO_INT_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkCVVector), \
573 _ML_IMPLEMENT_EMPTY_VECTOR_CASE(CLASS_NAME))
574
575#define ML_IMPLEMENT_CVFVECTOR_TO_REAL_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
576 _ML_IMPLEMENT_FDVECTOR_TO_REAL_CASES(INFO_STRING, CLASS_NAME, DATATYPE_ENUM, \
577 _ML_IMPLEMENT_FVECTOR_TO_REAL_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkCVVector),\
578 _ML_IMPLEMENT_EMPTY_VECTOR_CASE(CLASS_NAME))
579
580#define ML_IMPLEMENT_REAL_TO_CVFVECTOR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
581 _ML_IMPLEMENT_REAL_TO_FDVECTOR_CASES(INFO_STRING, CLASS_NAME, DATATYPE_ENUM, \
582 _ML_IMPLEMENT_REAL_TO_FVECTOR_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkCVVector),\
583 _ML_IMPLEMENT_EMPTY_VECTOR_CASE(CLASS_NAME))
584
585//---------------------------------------------------------------------------
586// Only double vectors.
587//---------------------------------------------------------------------------
588#define ML_IMPLEMENT_CVDVECTOR_TO_CVDVECTOR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
589 _ML_IMPLEMENT_FDVECTOR_TO_FDVECTOR_CASES(INFO_STRING, CLASS_NAME, DATATYPE_ENUM, \
590 _ML_IMPLEMENT_EMPTY_VECTOR_CASE(CLASS_NAME), \
591 _ML_IMPLEMENT_DVECTOR_TO_DVECTOR_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkCVVector))
592
593#define ML_IMPLEMENT_CVDVECTOR_TO_INT_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
594 _ML_IMPLEMENT_FDVECTOR_TO_INT_CASES(INFO_STRING, CLASS_NAME, DATATYPE_ENUM, \
595 _ML_IMPLEMENT_EMPTY_VECTOR_CASE(CLASS_NAME), \
596 _ML_IMPLEMENT_DVECTOR_TO_INT_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkCVVector))
597
598#define ML_IMPLEMENT_CVDVECTOR_TO_REAL_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
599 _ML_IMPLEMENT_FDVECTOR_TO_REAL_CASES(INFO_STRING, CLASS_NAME, DATATYPE_ENUM, \
600 _ML_IMPLEMENT_EMPTY_VECTOR_CASE(CLASS_NAME), \
601 _ML_IMPLEMENT_DVECTOR_TO_REAL_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkCVVector))
602
603#define ML_IMPLEMENT_REAL_TO_CVDVECTOR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
604 _ML_IMPLEMENT_REAL_TO_FDVECTOR_CASES(INFO_STRING, CLASS_NAME, DATATYPE_ENUM, \
605 _ML_IMPLEMENT_EMPTY_VECTOR_CASE(CLASS_NAME), \
606 _ML_IMPLEMENT_REAL_TO_DVECTOR_CASES(DIM_INST, USER_CODE, DATATYPE_ENUM, CLASS_NAME, DIM, mlItkCVVector))
608
609
610
611
612
613// START REAL TO IMG DIM
614
615//----------------------------------------------------------------------------------
617//----------------------------------------------------------------------------------
618#define _ML_IMPLEMENT_REAL_TO_IMG_DIM_FVECTOR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, ML_ITK_VECTOR_TYPE) \
619 { \
620 switch (DIM){ \
621 case 2 : USER_CODE(Vector2f, ML_ITK_VECTOR_TYPE##2f, MLfloat, MLfloat, 2, CLASS_NAME); break; \
622 case 3 : USER_CODE(Vector3f, ML_ITK_VECTOR_TYPE##3f, MLfloat, MLfloat, 3, CLASS_NAME); break; \
623 case 4 : USER_CODE(Vector4f, ML_ITK_VECTOR_TYPE##4f, MLfloat, MLfloat, 4, CLASS_NAME); break; \
624 case 6 : USER_CODE(Vector6f, ML_ITK_VECTOR_TYPE##6f, MLfloat, MLfloat, 6, CLASS_NAME); break; \
625 default: ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DIMENSION, "Dimension not supported(_ML_IMPLEMENT_REAL_TO_IMG_DIM_FVECTOR_CASES).", ", DIM=", DIM); break; \
626 } \
627 } \
628
629//----------------------------------------------------------------------------------
631//----------------------------------------------------------------------------------
632#define _ML_IMPLEMENT_REAL_TO_IMG_DIM_DVECTOR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, ML_ITK_VECTOR_TYPE) \
633 { \
634 switch (DIM){ \
635 case 2 : USER_CODE(Vector2d, ML_ITK_VECTOR_TYPE##2d, MLdouble, MLdouble, 2, CLASS_NAME); break; \
636 case 3 : USER_CODE(Vector3d, ML_ITK_VECTOR_TYPE##3d, MLdouble, MLdouble, 3, CLASS_NAME); break; \
637 case 4 : USER_CODE(Vector4d, ML_ITK_VECTOR_TYPE##4d, MLdouble, MLdouble, 4, CLASS_NAME); break; \
638 case 6 : USER_CODE(Vector6d, ML_ITK_VECTOR_TYPE##6d, MLdouble, MLdouble, 6, CLASS_NAME); break; \
639 default: ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DIMENSION, "Dimension not supported(_ML_IMPLEMENT_REAL_TO_IMG_DIM_DVECTOR_CASES).", ", DIM=", DIM); break; \
640 } \
641 } \
642
643//--------------------------------------------------------------------------------------------
645//--------------------------------------------------------------------------------------------
646#define _ML_IMPLEMENT_REAL_TO_IMG_DIM_FDVECTOR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, ML_ITK_VECTOR_TYPE) \
647 { \
648 if (_addOns->getInputSubImageDataType()==MLfloatType){ \
649 switch (DIM){ \
650 case 2 : USER_CODE(Vector2f, ML_ITK_VECTOR_TYPE##2f, MLfloat, MLfloat, 2, CLASS_NAME); break; \
651 case 3 : USER_CODE(Vector3f, ML_ITK_VECTOR_TYPE##3f, MLfloat, MLfloat, 3, CLASS_NAME); break; \
652 case 4 : USER_CODE(Vector4f, ML_ITK_VECTOR_TYPE##4f, MLfloat, MLfloat, 4, CLASS_NAME); break; \
653 case 6 : USER_CODE(Vector6f, ML_ITK_VECTOR_TYPE##6f, MLfloat, MLfloat, 6, CLASS_NAME); break; \
654 default: ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DIMENSION, "Dimension not supported(_ML_IMPLEMENT_REAL_TO_IMG_DIM_FDVECTOR_CASES), 1.", ", DIM=", DIM); break; \
655 } \
656 } \
657 else{ \
658 switch (DIM){ \
659 case 2 : USER_CODE(Vector2d, ML_ITK_VECTOR_TYPE##2d, MLdouble, MLdouble, 2, CLASS_NAME); break; \
660 case 3 : USER_CODE(Vector3d, ML_ITK_VECTOR_TYPE##3d, MLdouble, MLdouble, 3, CLASS_NAME); break; \
661 case 4 : USER_CODE(Vector4d, ML_ITK_VECTOR_TYPE##4d, MLdouble, MLdouble, 4, CLASS_NAME); break; \
662 case 6 : USER_CODE(Vector6d, ML_ITK_VECTOR_TYPE##6d, MLdouble, MLdouble, 6, CLASS_NAME); break; \
663 default: ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DIMENSION, "Dimension not supported(_ML_IMPLEMENT_REAL_TO_IMG_DIM_FDVECTOR_CASES, 2).", ", DIM=", DIM); break; \
664 } \
665 } \
666 } \
667
668//----------------------------------------------------------------------------------
670//----------------------------------------------------------------------------------
671#define _ML_IMPLEMENT_REAL_TO_IMG_DIM_FVECTOR_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, ML_ITK_VECTOR_TYPE, DIM_C, DIM_CF, DIM_CD) \
672 { \
673 USER_CODE(Vector##DIM_C##f, ML_ITK_VECTOR_TYPE##DIM_C##f, MLfloat, MLfloat, DIM_C, CLASS_NAME); \
674 } \
675
676//----------------------------------------------------------------------------------
678//----------------------------------------------------------------------------------
679#define _ML_IMPLEMENT_REAL_TO_IMG_DIM_DVECTOR_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, ML_ITK_VECTOR_TYPE, DIM_C, DIM_CF, DIM_CD) \
680 { \
681 USER_CODE(Vector##DIM_C##d, ML_ITK_VECTOR_TYPE##DIM_C##d, MLdouble, MLdouble, DIM_C, CLASS_NAME); \
682 } \
683
684//--------------------------------------------------------------------------------------------
686//--------------------------------------------------------------------------------------------
687#define _ML_IMPLEMENT_REAL_TO_IMG_DIM_FDVECTOR_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, ML_ITK_VECTOR_TYPE, DIM_C, DIM_CF, DIM_CD) \
688 { \
689 if (_addOns->getInputSubImageDataType() == MLfloatType){ \
690 USER_CODE(Vector##DIM_C##f, ML_ITK_VECTOR_TYPE##DIM_C##f, MLfloat, MLfloat, DIM_C, CLASS_NAME); \
691 } \
692 else{ \
693 USER_CODE(Vector##DIM_C##d, ML_ITK_VECTOR_TYPE##DIM_C##d, MLdouble, MLdouble, DIM_C, CLASS_NAME); \
694 } \
695 } \
696
698#define ML_IMPLEMENT_REAL_TO_IMG_DIM_CVFVECTOR_CASES_2D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
699 _ML_IMPLEMENT_REAL_TO_IMG_DIM_FVECTOR_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkCVVector, 2, 8, 16)
700#define ML_IMPLEMENT_REAL_TO_IMG_DIM_CVFVECTOR_CASES_3D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
701 _ML_IMPLEMENT_REAL_TO_IMG_DIM_FVECTOR_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkCVVector, 3, 12, 24)
702#define ML_IMPLEMENT_REAL_TO_IMG_DIM_CVFVECTOR_CASES_6D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
703 _ML_IMPLEMENT_REAL_TO_IMG_DIM_FVECTOR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkCVVector)
704
705#define ML_IMPLEMENT_REAL_TO_IMG_DIM_CVDVECTOR_CASES_2D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
706 _ML_IMPLEMENT_REAL_TO_IMG_DIM_DVECTOR_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkCVVector, 2, 8, 16)
707#define ML_IMPLEMENT_REAL_TO_IMG_DIM_CVDVECTOR_CASES_3D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
708 _ML_IMPLEMENT_REAL_TO_IMG_DIM_DVECTOR_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkCVVector, 3, 12, 24)
709#define ML_IMPLEMENT_REAL_TO_IMG_DIM_CVDVECTOR_CASES_6D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
710 _ML_IMPLEMENT_REAL_TO_IMG_DIM_DVECTOR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkCVVector)
711
712#define ML_IMPLEMENT_REAL_TO_IMG_DIM_CVFDVECTOR_CASES_2D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
713 _ML_IMPLEMENT_REAL_TO_IMG_DIM_FDVECTOR_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkCVVector, 2, 8, 16)
714#define ML_IMPLEMENT_REAL_TO_IMG_DIM_CVFDVECTOR_CASES_3D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
715 _ML_IMPLEMENT_REAL_TO_IMG_DIM_FDVECTOR_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkCVVector, 3, 12, 24)
716#define ML_IMPLEMENT_REAL_TO_IMG_DIM_CVFDVECTOR_CASES_6D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
717 _ML_IMPLEMENT_REAL_TO_IMG_DIM_FDVECTOR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkCVVector)
719
721#define ML_IMPLEMENT_REAL_TO_IMG_DIM_FVECTOR_CASES_2D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
722 _ML_IMPLEMENT_REAL_TO_IMG_DIM_FVECTOR_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkVector, 2, 8, 16)
723#define ML_IMPLEMENT_REAL_TO_IMG_DIM_FVECTOR_CASES_3D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
724 _ML_IMPLEMENT_REAL_TO_IMG_DIM_FVECTOR_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkVector, 3, 12, 24)
725#define ML_IMPLEMENT_REAL_TO_IMG_DIM_FVECTOR_CASES_6D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
726 _ML_IMPLEMENT_REAL_TO_IMG_DIM_FVECTOR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkVector)
727
728#define ML_IMPLEMENT_REAL_TO_IMG_DIM_DVECTOR_CASES_2D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
729 _ML_IMPLEMENT_REAL_TO_IMG_DIM_DVECTOR_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkVector, 2, 8, 16)
730#define ML_IMPLEMENT_REAL_TO_IMG_DIM_DVECTOR_CASES_3D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
731 _ML_IMPLEMENT_REAL_TO_IMG_DIM_DVECTOR_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkVector, 3, 12, 24)
732#define ML_IMPLEMENT_REAL_TO_IMG_DIM_DVECTOR_CASES_6D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
733 _ML_IMPLEMENT_REAL_TO_IMG_DIM_DVECTOR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkVector)
734
735#define ML_IMPLEMENT_REAL_TO_IMG_DIM_FDVECTOR_CASES_2D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
736 _ML_IMPLEMENT_REAL_TO_IMG_DIM_FDVECTOR_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkVector, 2, 8, 16)
737#define ML_IMPLEMENT_REAL_TO_IMG_DIM_FDVECTOR_CASES_3D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
738 _ML_IMPLEMENT_REAL_TO_IMG_DIM_FDVECTOR_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkVector, 3, 12, 24)
739#define ML_IMPLEMENT_REAL_TO_IMG_DIM_FDVECTOR_CASES_6D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
740 _ML_IMPLEMENT_REAL_TO_IMG_DIM_FDVECTOR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkVector)
742
743// END REAL TO IMG DIM
744
745
746
747
748
749
750
751// START IMG DIM TO REAL
752
753// IMPORTANT: !!! ONLY TESTED FOR ONE CASE! Switches may still be incomplete or data types may be of invalid order etc. !!!!
754
755//----------------------------------------------------------------------------------
757//----------------------------------------------------------------------------------
758#define _ML_IMPLEMENT_IMG_DIM_FVECTOR_TO_REAL_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, ML_ITK_VECTOR_TYPE) \
759 { \
760 switch (DIM){ \
761 case 2 : USER_CODE(MLfloat, MLfloat, Vector2f, ML_ITK_VECTOR_TYPE##2f, 2, CLASS_NAME); break; \
762 case 3 : USER_CODE(MLfloat, MLfloat, Vector3f, ML_ITK_VECTOR_TYPE##3f, 3, CLASS_NAME); break; \
763 case 4 : USER_CODE(MLfloat, MLfloat, Vector4f, ML_ITK_VECTOR_TYPE##4f, 4, CLASS_NAME); break; \
764 case 6 : USER_CODE(MLfloat, MLfloat, Vector6f, ML_ITK_VECTOR_TYPE##6f, 6, CLASS_NAME); break; \
765 default: ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DIMENSION, "Dimension not supported(_ML_IMPLEMENT_IMG_DIM_FVECTOR_TO_REAL_CASES).", ", DIM=", DIM); break; \
766 } \
767 } \
768
769//----------------------------------------------------------------------------------
771//----------------------------------------------------------------------------------
772#define _ML_IMPLEMENT_IMG_DIM_DVECTOR_TO_REAL_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, ML_ITK_VECTOR_TYPE) \
773 { \
774 switch (DIM){ \
775 case 2 : USER_CODE(MLdouble, MLdouble, Vector2d, ML_ITK_VECTOR_TYPE##2d, 2, CLASS_NAME); break; \
776 case 3 : USER_CODE(MLdouble, MLdouble, Vector3d, ML_ITK_VECTOR_TYPE##3d, 3, CLASS_NAME); break; \
777 case 4 : USER_CODE(MLdouble, MLdouble, Vector4d, ML_ITK_VECTOR_TYPE##4d, 4, CLASS_NAME); break; \
778 case 6 : USER_CODE(MLdouble, MLdouble, Vector6d, ML_ITK_VECTOR_TYPE##6d, 6, CLASS_NAME); break; \
779 default: ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DIMENSION, "Dimension not supported(_ML_IMPLEMENT_IMG_DIM_DVECTOR_TO_REAL_CASES).", ", DIM=", DIM); break; \
780 } \
781 } \
782
783//--------------------------------------------------------------------------------------------
785//--------------------------------------------------------------------------------------------
786#define _ML_IMPLEMENT_IMG_DIM_FDVECTOR_TO_REAL_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, ML_ITK_VECTOR_TYPE) \
787 { \
788 /* Check for float point type input vector. */ \
789 const bool isFloatType = _addOns->getInSubImageTypeInfos()->structInfoString[0]=='f'; \
790 if (isFloatType){ \
791 switch (DIM){ \
792 case 2 : USER_CODE(MLfloat, MLfloat, Vector2f, ML_ITK_VECTOR_TYPE##2f, 2, CLASS_NAME); break; \
793 case 3 : USER_CODE(MLfloat, MLfloat, Vector3f, ML_ITK_VECTOR_TYPE##3f, 3, CLASS_NAME); break; \
794 case 4 : USER_CODE(MLfloat, MLfloat, Vector4f, ML_ITK_VECTOR_TYPE##4f, 4, CLASS_NAME); break; \
795 case 6 : USER_CODE(MLfloat, MLfloat, Vector6f, ML_ITK_VECTOR_TYPE##6f, 6, CLASS_NAME); break; \
796 default: ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DIMENSION, "Dimension not supported(_ML_IMPLEMENT_IMG_DIM_FDVECTOR_TO_REAL_CASES, 1).", ", DIM=", DIM); break; \
797 } \
798 } \
799 else{ \
800 switch (DIM){ \
801 case 2 : USER_CODE(MLdouble, MLdouble, Vector2d, ML_ITK_VECTOR_TYPE##2d, 2, CLASS_NAME); break; \
802 case 3 : USER_CODE(MLdouble, MLdouble, Vector3d, ML_ITK_VECTOR_TYPE##3d, 3, CLASS_NAME); break; \
803 case 4 : USER_CODE(MLdouble, MLdouble, Vector4d, ML_ITK_VECTOR_TYPE##4d, 4, CLASS_NAME); break; \
804 case 6 : USER_CODE(MLdouble, MLdouble, Vector6d, ML_ITK_VECTOR_TYPE##6d, 6, CLASS_NAME); break; \
805 default: ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DIMENSION, "Dimension not supported(_ML_IMPLEMENT_IMG_DIM_FDVECTOR_TO_REAL_CASES, 2).", ", DIM=", DIM); break; \
806 } \
807 } \
808 } \
809
810//----------------------------------------------------------------------------------
812//----------------------------------------------------------------------------------
813#define _ML_IMPLEMENT_IMG_DIM_FVECTOR_TO_REAL_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, ML_ITK_VECTOR_TYPE, DIM_C, DIM_CF, DIM_CD) \
814 { \
815 USER_CODE(MLfloat, MLfloat, Vector##DIM_C##f, ML_ITK_VECTOR_TYPE##DIM_C##f, DIM_C, CLASS_NAME); \
816 } \
817
818//----------------------------------------------------------------------------------
820//----------------------------------------------------------------------------------
821#define _ML_IMPLEMENT_IMG_DIM_DVECTOR_TO_REAL_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, ML_ITK_VECTOR_TYPE, DIM_C, DIM_CF, DIM_CD) \
822 { \
823 USER_CODE(MLdouble, MLdouble, Vector##DIM_C##d, ML_ITK_VECTOR_TYPE##DIM_C##d, DIM_C, CLASS_NAME); \
824 } \
825
826//--------------------------------------------------------------------------------------------
836//--------------------------------------------------------------------------------------------
837#define _ML_IMPLEMENT_IMG_DIM_FDVECTOR_TO_REAL_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, ML_ITK_VECTOR_TYPE, DIM_C, DIM_CF, DIM_CD) \
838 { \
839 /* Check for float point type input vector. */ \
840 const bool isFloatType = _addOns->getInSubImageTypeInfos()->structInfoString[0]=='f'; \
841 if (isFloatType){ \
842 USER_CODE(Vector##DIM_C##f, ML_ITK_VECTOR_TYPE##DIM_C##f, MLfloat, MLfloat, DIM_C, CLASS_NAME); \
843 } \
844 else{ \
845 USER_CODE(MLdouble, MLdouble, Vector##DIM_C##d, ML_ITK_VECTOR_TYPE##DIM_C##d, DIM_C, CLASS_NAME); \
846 } \
847 } \
848
850#define ML_IMPLEMENT_IMG_DIM_CVFVECTOR_TO_REAL_CASES_2D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
851 _ML_IMPLEMENT_IMG_DIM_FVECTOR_TO_REAL_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkCVVector, 2, 8, 16)
852#define ML_IMPLEMENT_IMG_DIM_CVFVECTOR_TO_REAL_CASES_3D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
853 _ML_IMPLEMENT_IMG_DIM_FVECTOR_TO_REAL_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkCVVector, 3, 12, 24)
854#define ML_IMPLEMENT_IMG_DIM_CVFVECTOR_TO_REAL_CASES_6D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
855 _ML_IMPLEMENT_IMG_DIM_FVECTOR_TO_REAL_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkCVVector)
856
857#define ML_IMPLEMENT_IMG_DIM_CVDVECTOR_TO_REAL_CASES_2D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
858 _ML_IMPLEMENT_IMG_DIM_DVECTOR_TO_REAL_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkCVVector, 2, 8, 16)
859#define ML_IMPLEMENT_IMG_DIM_CVDVECTOR_TO_REAL_CASES_3D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
860 _ML_IMPLEMENT_IMG_DIM_DVECTOR_TO_REAL_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkCVVector, 3, 12, 24)
861#define ML_IMPLEMENT_IMG_DIM_CVDVECTOR_TO_REAL_CASES_6D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
862 _ML_IMPLEMENT_IMG_DIM_DVECTOR_TO_REAL_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkCVVector)
863
864#define ML_IMPLEMENT_IMG_DIM_CVFDVECTOR_TO_REAL_CASES_2D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
865 _ML_IMPLEMENT_IMG_DIM_FDVECTOR_TO_REAL_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkCVVector, 2, 8, 16)
866#define ML_IMPLEMENT_IMG_DIM_CVFDVECTOR_TO_REAL_CASES_3D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
867 _ML_IMPLEMENT_IMG_DIM_FDVECTOR_TO_REAL_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkCVVector, 3, 12, 24)
868#define ML_IMPLEMENT_IMG_DIM_CVFDVECTOR_TO_REAL_CASES_6D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
869 _ML_IMPLEMENT_IMG_DIM_FDVECTOR_TO_REAL_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkCVVector)
871
873#define ML_IMPLEMENT_IMG_DIM_FVECTOR_TO_REAL_CASES_2D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
874 _ML_IMPLEMENT_IMG_DIM_FVECTOR_TO_REAL_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkVector, 2, 8, 16)
875#define ML_IMPLEMENT_IMG_DIM_FVECTOR_TO_REAL_CASES_3D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
876 _ML_IMPLEMENT_IMG_DIM_FVECTOR_TO_REAL_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkVector, 3, 12, 24)
877#define ML_IMPLEMENT_IMG_DIM_FVECTOR_TO_REAL_CASES_6D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
878 _ML_IMPLEMENT_IMG_DIM_FVECTOR_TO_REAL_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkVector)
879
880#define ML_IMPLEMENT_IMG_DIM_DVECTOR_TO_REAL_CASES_2D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
881 _ML_IMPLEMENT_IMG_DIM_DVECTOR_TO_REAL_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkVector, 2, 8, 16)
882#define ML_IMPLEMENT_IMG_DIM_DVECTOR_TO_REAL_CASES_3D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
883 _ML_IMPLEMENT_IMG_DIM_DVECTOR_TO_REAL_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkVector, 3, 12, 24)
884#define ML_IMPLEMENT_IMG_DIM_DVECTOR_TO_REAL_CASES_6D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
885 _ML_IMPLEMENT_IMG_DIM_DVECTOR_TO_REAL_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkVector)
886
887#define ML_IMPLEMENT_IMG_DIM_FDVECTOR_TO_REAL_CASES_2D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
888 _ML_IMPLEMENT_IMG_DIM_FDVECTOR_TO_REAL_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkVector, 2, 8, 16)
889#define ML_IMPLEMENT_IMG_DIM_FDVECTOR_TO_REAL_CASES_3D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
890 _ML_IMPLEMENT_IMG_DIM_FDVECTOR_TO_REAL_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkVector, 3, 12, 24)
891#define ML_IMPLEMENT_IMG_DIM_FDVECTOR_TO_REAL_CASES_6D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
892 _ML_IMPLEMENT_IMG_DIM_FDVECTOR_TO_REAL_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkVector)
894
895// IMPORTANT: STILL NOT TESTED!!!!
896
897// END IMG DIM TO REAL
898
899
900
901
902
903
904
905
906// START IMG DIM TO IMG DIM
907
908//----------------------------------------------------------------------------------
910//----------------------------------------------------------------------------------
911#define _ML_IMPLEMENT_IMG_DIM_FVECTOR_TO_IMG_DIM_FVECTOR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, ML_ITK_VECTOR_TYPE) \
912 { \
913 switch (DIM){ \
914 case 2 : USER_CODE(Vector2f, ML_ITK_VECTOR_TYPE##2f, Vector2f, ML_ITK_VECTOR_TYPE##2f, 2, CLASS_NAME); break; \
915 case 3 : USER_CODE(Vector3f, ML_ITK_VECTOR_TYPE##3f, Vector3f, ML_ITK_VECTOR_TYPE##3f, 3, CLASS_NAME); break; \
916 case 4 : USER_CODE(Vector4f, ML_ITK_VECTOR_TYPE##4f, Vector4f, ML_ITK_VECTOR_TYPE##4f, 4, CLASS_NAME); break; \
917 case 6 : USER_CODE(Vector6f, ML_ITK_VECTOR_TYPE##6f, Vector6f, ML_ITK_VECTOR_TYPE##6f, 6, CLASS_NAME); break; \
918 default: ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DIMENSION, "Dimension not supported(_ML_IMPLEMENT_IMG_DIM_FVECTOR_TO_IMG_DIM_FVECTOR_CASES).", ", DIM=", DIM); break; \
919 } \
920 } \
921
922//----------------------------------------------------------------------------------
924//----------------------------------------------------------------------------------
925#define _ML_IMPLEMENT_IMG_DIM_DVECTOR_TO_IMG_DIM_DVECTOR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, ML_ITK_VECTOR_TYPE) \
926 { \
927 switch (DIM){ \
928 case 2 : USER_CODE(Vector2d, ML_ITK_VECTOR_TYPE##2d, Vector2d, ML_ITK_VECTOR_TYPE##2d, 2, CLASS_NAME); break; \
929 case 3 : USER_CODE(Vector3d, ML_ITK_VECTOR_TYPE##3d, Vector3d, ML_ITK_VECTOR_TYPE##3d, 3, CLASS_NAME); break; \
930 case 4 : USER_CODE(Vector4d, ML_ITK_VECTOR_TYPE##4d, Vector4d, ML_ITK_VECTOR_TYPE##4d, 4, CLASS_NAME); break; \
931 case 6 : USER_CODE(Vector6d, ML_ITK_VECTOR_TYPE##6d, Vector6d, ML_ITK_VECTOR_TYPE##6d, 6, CLASS_NAME); break; \
932 default: ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DIMENSION, "Dimension not supported(_ML_IMPLEMENT_IMG_DIM_DVECTOR_TO_IMG_DIM_DVECTOR_CASES).", ", DIM=", DIM); break; \
933 } \
934 } \
935
936//--------------------------------------------------------------------------------------------
938//--------------------------------------------------------------------------------------------
939#define _ML_IMPLEMENT_IMG_DIM_FDVECTOR_TO_IMG_DIM_FDVECTOR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, ML_ITK_VECTOR_TYPE) \
940 { \
941 /* Check for float component of first component of input image type. */ \
942 bool isFloatType = _addOns->getInSubImageTypeInfos()->structInfoString[0]=='f'; \
943 if (isFloatType){ \
944 switch (DIM){ \
945 case 2 : USER_CODE(Vector2f, ML_ITK_VECTOR_TYPE##2f, Vector2f, ML_ITK_VECTOR_TYPE##2f, 2, CLASS_NAME); break; \
946 case 3 : USER_CODE(Vector3f, ML_ITK_VECTOR_TYPE##3f, Vector3f, ML_ITK_VECTOR_TYPE##3f, 3, CLASS_NAME); break; \
947 case 4 : USER_CODE(Vector4f, ML_ITK_VECTOR_TYPE##4f, Vector4f, ML_ITK_VECTOR_TYPE##4f, 4, CLASS_NAME); break; \
948 case 6 : USER_CODE(Vector6f, ML_ITK_VECTOR_TYPE##6f, Vector6f, ML_ITK_VECTOR_TYPE##6f, 6, CLASS_NAME); break; \
949 default: ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DIMENSION, "Dimension not supported(_ML_IMPLEMENT_IMG_DIM_FDVECTOR_TO_IMG_DIM_FDVECTOR_CASES, 1).", ", DIM=", DIM); break; \
950 } \
951 } \
952 else{ \
953 switch (DIM){ \
954 case 2 : USER_CODE(Vector2d, ML_ITK_VECTOR_TYPE##2d, Vector2d, ML_ITK_VECTOR_TYPE##2d, 2, CLASS_NAME); break; \
955 case 3 : USER_CODE(Vector3d, ML_ITK_VECTOR_TYPE##3d, Vector3d, ML_ITK_VECTOR_TYPE##3d, 3, CLASS_NAME); break; \
956 case 4 : USER_CODE(Vector4d, ML_ITK_VECTOR_TYPE##4d, Vector4d, ML_ITK_VECTOR_TYPE##4d, 4, CLASS_NAME); break; \
957 case 6 : USER_CODE(Vector6d, ML_ITK_VECTOR_TYPE##6d, Vector6d, ML_ITK_VECTOR_TYPE##6d, 6, CLASS_NAME); break; \
958 default: ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DIMENSION, "Dimension not supported(_ML_IMPLEMENT_IMG_DIM_FDVECTOR_TO_IMG_DIM_FDVECTOR_CASES, 2).", ", DIM=", DIM); break; \
959 } \
960 } \
961 } \
962
963//----------------------------------------------------------------------------------
965//----------------------------------------------------------------------------------
966#define _ML_IMPLEMENT_IMG_DIM_FVECTOR_TO_IMG_DIM_FVECTOR_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, ML_ITK_VECTOR_TYPE, DIM_C, DIM_CF, DIM_CD) \
967 { \
968 USER_CODE(Vector##DIM_C##f, ML_ITK_VECTOR_TYPE##DIM_C##f, MLfloat, MLfloat, DIM_C, CLASS_NAME); \
969 } \
970
971//----------------------------------------------------------------------------------
973//----------------------------------------------------------------------------------
974#define _ML_IMPLEMENT_IMG_DIM_DVECTOR_TO_IMG_DIM_DVECTOR_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, ML_ITK_VECTOR_TYPE, DIM_C, DIM_CF, DIM_CD) \
975 { \
976 USER_CODE(Vector##DIM_C##d, ML_ITK_VECTOR_TYPE##DIM_C##d, Vector##DIM_C##d, ML_ITK_VECTOR_TYPE##DIM_C##d, DIM_C, CLASS_NAME); \
977 } \
978
979//--------------------------------------------------------------------------------------------
981//--------------------------------------------------------------------------------------------
982#define _ML_IMPLEMENT_IMG_DIM_FDVECTOR_TO_IMG_DIM_FDVECTOR_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, ML_ITK_VECTOR_TYPE, DIM_C, DIM_CF, DIM_CD) \
983 { \
984 /* Check for float component of first component of input image type. */ \
985 bool isFloatType = _addOns->getInSubImageTypeInfos()->structInfoString[0]=='f'; \
986 if (isFloatType){ \
987 USER_CODE(Vector##DIM_C##f, ML_ITK_VECTOR_TYPE##DIM_C##f, Vector##DIM_C##f, ML_ITK_VECTOR_TYPE##DIM_C##f, DIM_C, CLASS_NAME); \
988 } \
989 else{ \
990 USER_CODE(Vector##DIM_C##d, ML_ITK_VECTOR_TYPE##DIM_C##d, Vector##DIM_C##d, ML_ITK_VECTOR_TYPE##DIM_C##d, DIM_C, CLASS_NAME); \
991 } \
992 } \
993
995#define ML_IMPLEMENT_IMG_DIM_CVFVECTOR_TO_IMG_DIM_CVFVECTOR_CASES_2D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
996 _ML_IMPLEMENT_IMG_DIM_FVECTOR_TO_IMG_DIM_FVECTOR_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkCVVector, 2, 8, 16)
997#define ML_IMPLEMENT_IMG_DIM_CVFVECTOR_TO_IMG_DIM_CVFVECTOR_CASES_3D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
998 _ML_IMPLEMENT_IMG_DIM_FVECTOR_TO_IMG_DIM_FVECTOR_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkCVVector, 3, 12, 24)
999#define ML_IMPLEMENT_IMG_DIM_CVFVECTOR_TO_IMG_DIM_CVFVECTOR_CASES_6D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1000 _ML_IMPLEMENT_IMG_DIM_FVECTOR_TO_IMG_DIM_FVECTOR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkCVVector)
1001
1002#define ML_IMPLEMENT_IMG_DIM_CVDVECTOR_TO_IMG_DIM_CVDVECTOR_CASES_2D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1003 _ML_IMPLEMENT_IMG_DIM_DVECTOR_TO_IMG_DIM_DVECTOR_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkCVVector, 2, 8, 16)
1004#define ML_IMPLEMENT_IMG_DIM_CVDVECTOR_TO_IMG_DIM_CVDVECTOR_CASES_3D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1005 _ML_IMPLEMENT_IMG_DIM_DVECTOR_TO_IMG_DIM_DVECTOR_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkCVVector, 3, 12, 24)
1006#define ML_IMPLEMENT_IMG_DIM_CVDVECTOR_TO_IMG_DIM_CVDVECTOR_CASES_6D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1007 _ML_IMPLEMENT_IMG_DIM_DVECTOR_TO_IMG_DIM_DVECTOR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkCVVector)
1008
1009#define ML_IMPLEMENT_IMG_DIM_CVFDVECTOR_TO_IMG_DIM_CVFDVECTOR_CASES_2D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1010 _ML_IMPLEMENT_IMG_DIM_FDVECTOR_TO_IMG_DIM_FDVECTOR_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkCVVector, 2, 8, 16)
1011#define ML_IMPLEMENT_IMG_DIM_CVFDVECTOR_TO_IMG_DIM_CVFDVECTOR_CASES_3D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1012 _ML_IMPLEMENT_IMG_DIM_FDVECTOR_TO_IMG_DIM_FDVECTOR_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkCVVector, 3, 12, 24)
1013#define ML_IMPLEMENT_IMG_DIM_CVFDVECTOR_TO_IMG_DIM_CVFDVECTOR_CASES_6D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1014 _ML_IMPLEMENT_IMG_DIM_FDVECTOR_TO_IMG_DIM_FDVECTOR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkCVVector)
1016
1018#define ML_IMPLEMENT_IMG_DIM_FVECTOR_TO_IMG_DIM_FVECTOR_CASES_2D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1019 _ML_IMPLEMENT_IMG_DIM_FVECTOR_TO_IMG_DIM_FVECTOR_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkVector, 2, 8, 16)
1020#define ML_IMPLEMENT_IMG_DIM_FVECTOR_TO_IMG_DIM_FVECTOR_CASES_3D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1021 _ML_IMPLEMENT_IMG_DIM_FVECTOR_TO_IMG_DIM_FVECTOR_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkVector, 3, 12, 24)
1022#define ML_IMPLEMENT_IMG_DIM_FVECTOR_TO_IMG_DIM_FVECTOR_CASES_6D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1023 _ML_IMPLEMENT_IMG_DIM_FVECTOR_TO_IMG_DIM_FVECTOR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkVector)
1024
1025#define ML_IMPLEMENT_IMG_DIM_DVECTOR_TO_IMG_DIM_DVECTOR_CASES_2D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1026 _ML_IMPLEMENT_IMG_DIM_DVECTOR_TO_IMG_DIM_DVECTOR_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkVector, 2, 8, 16)
1027#define ML_IMPLEMENT_IMG_DIM_DVECTOR_TO_IMG_DIM_DVECTOR_CASES_3D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1028 _ML_IMPLEMENT_IMG_DIM_DVECTOR_TO_IMG_DIM_DVECTOR_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkVector, 3, 12, 24)
1029#define ML_IMPLEMENT_IMG_DIM_DVECTOR_TO_IMG_DIM_DVECTOR_CASES_6D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1030 _ML_IMPLEMENT_IMG_DIM_DVECTOR_TO_IMG_DIM_DVECTOR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkVector)
1031
1032#define ML_IMPLEMENT_IMG_DIM_FDVECTOR_TO_IMG_DIM_FDVECTOR_CASES_2D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1033 _ML_IMPLEMENT_IMG_DIM_FDVECTOR_TO_IMG_DIM_FDVECTOR_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkVector, 2, 8, 16)
1034#define ML_IMPLEMENT_IMG_DIM_FDVECTOR_TO_IMG_DIM_FDVECTOR_CASES_3D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1035 _ML_IMPLEMENT_IMG_DIM_FDVECTOR_TO_IMG_DIM_FDVECTOR_CASESN(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkVector, 3, 12, 24)
1036#define ML_IMPLEMENT_IMG_DIM_FDVECTOR_TO_IMG_DIM_FDVECTOR_CASES_6D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1037 _ML_IMPLEMENT_IMG_DIM_FDVECTOR_TO_IMG_DIM_FDVECTOR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, mlItkVector)
1039
1040// END IMG DIM TO IMG DIM
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050//---------------------------------------------------------------------------
1052//---------------------------------------------------------------------------
1053#define _ML_IMPLEMENT_NONSCALAR_TO_NONSCALAR_CASES_F(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, ML_ITK_NONSCALAR_TYPE, FCARRIER, DCARRIER) \
1054 case ML##FCARRIER##Type : \
1055 DIM_INST(FCARRIER, ML_ITK_NONSCALAR_TYPE##f, FCARRIER, ML_ITK_NONSCALAR_TYPE##f, USER_CODE, CLASS_NAME, DIM); \
1056 break; \
1057
1058//---------------------------------------------------------------------------
1060//---------------------------------------------------------------------------
1061#define _ML_IMPLEMENT_NONSCALAR_TO_NONSCALAR_CASES_D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, ML_ITK_NONSCALAR_TYPE, FCARRIER, DCARRIER) \
1062 case ML##DCARRIER##Type : \
1063 DIM_INST(DCARRIER, ML_ITK_NONSCALAR_TYPE##d, DCARRIER, ML_ITK_NONSCALAR_TYPE##d, USER_CODE, CLASS_NAME, DIM); \
1064 break; \
1065
1066//---------------------------------------------------------------------------
1068//---------------------------------------------------------------------------
1069#define _ML_IMPLEMENT_NONSCALAR_TO_NONSCALAR_CASES_FD(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, ML_ITK_NONSCALAR_TYPE, FCARRIER, DCARRIER) \
1070 _ML_IMPLEMENT_NONSCALAR_TO_NONSCALAR_CASES_F(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, ML_ITK_NONSCALAR_TYPE, FCARRIER, DCARRIER) \
1071 _ML_IMPLEMENT_NONSCALAR_TO_NONSCALAR_CASES_D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, ML_ITK_NONSCALAR_TYPE, FCARRIER, DCARRIER)
1072
1073//---------------------------------------------------------------------------
1075//---------------------------------------------------------------------------
1076#define _ML_IMPLEMENT_NONSCALAR_TO_NONSCALAR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, ML_ITK_NONSCALAR_TYPE, FCARRIER, DCARRIER, INST_CASES)\
1077{ \
1078 switch (DATATYPE_ENUM){ \
1079 INST_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, ML_ITK_NONSCALAR_TYPE, FCARRIER, DCARRIER) \
1080 default: { \
1081 ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DATA_TYPE, "Data type case(_ML_IMPLEMENT_NONSCALAR_TO_NONSCALAR_CASES) not executed.", ", DATATYPE_ENUM=", DATATYPE_ENUM); \
1082 } \
1083 break; \
1084 } \
1085} \
1086
1087
1088
1089//---------------------------------------------------------------------------
1091//---------------------------------------------------------------------------
1092#define _ML_IMPLEMENT_REAL_TO_NONSCALAR_CASES_F(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, ML_ITK_NONSCALAR_TYPE, FCARRIER, DCARRIER) \
1093 case ML##FCARRIER##Type : \
1094 DIM_INST(FCARRIER, ML_ITK_NONSCALAR_TYPE##f, MLfloat, MLfloat, USER_CODE, CLASS_NAME, DIM); \
1095 break; \
1096
1097//---------------------------------------------------------------------------
1099//---------------------------------------------------------------------------
1100#define _ML_IMPLEMENT_REAL_TO_NONSCALAR_CASES_D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, ML_ITK_NONSCALAR_TYPE, FCARRIER, DCARRIER) \
1101 case ML##DCARRIER##Type : \
1102 DIM_INST(DCARRIER, ML_ITK_NONSCALAR_TYPE##d, MLdouble, MLdouble, USER_CODE, CLASS_NAME, DIM); \
1103 break; \
1104
1105//---------------------------------------------------------------------------
1107//---------------------------------------------------------------------------
1108#define _ML_IMPLEMENT_REAL_TO_NONSCALAR_CASES_FD(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, ML_ITK_NONSCALAR_TYPE, FCARRIER, DCARRIER) \
1109 _ML_IMPLEMENT_REAL_TO_NONSCALAR_CASES_F(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, ML_ITK_NONSCALAR_TYPE, FCARRIER, DCARRIER) \
1110 _ML_IMPLEMENT_REAL_TO_NONSCALAR_CASES_D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, ML_ITK_NONSCALAR_TYPE, FCARRIER, DCARRIER)
1111
1112
1113//---------------------------------------------------------------------------
1115//---------------------------------------------------------------------------
1116#define _ML_IMPLEMENT_REAL_TO_NONSCALAR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, ML_ITK_NONSCALAR_TYPE, FCARRIER, DCARRIER, INST_CASES) \
1117{ \
1118 switch (DATATYPE_ENUM){ \
1119 INST_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, ML_ITK_NONSCALAR_TYPE, FCARRIER, DCARRIER) \
1120 \
1121 default: { \
1122 ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DATA_TYPE, "Data type case(_ML_IMPLEMENT_REAL_TO_NONSCALAR_CASES) not executed.", ", DATATYPE_ENUM=", DATATYPE_ENUM); \
1123 } \
1124 break; \
1125 } \
1126} \
1127
1128
1129
1130//---------------------------------------------------------------------------
1132//---------------------------------------------------------------------------
1133#define _ML_IMPLEMENT_NONSCALAR_TO_INT_CASES_F(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, ML_ITK_NONSCALAR_TYPE, FCARRIER, DCARRIER) \
1134 case MLint16Type : { \
1135 const MLDataType i16DataType = _addOns->getInputSubImageDataType(); \
1136 switch (i16DataType){ \
1137 case ML##FCARRIER##Type: \
1138 DIM_INST(MLint16, MLint16, FCARRIER, ML_ITK_NONSCALAR_TYPE##f, USER_CODE, CLASS_NAME, DIM); \
1139 break; \
1140 \
1141 default: { \
1142 ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DATA_TYPE, "Input type case(_ML_IMPLEMENT_NONSCALAR_TO_INT_CASES_F) not executed.", ", i16DataType=", i16DataType);\
1143 } \
1144 break; \
1145 } \
1146 } \
1147 break; \
1148
1149//---------------------------------------------------------------------------
1151//---------------------------------------------------------------------------
1152#define _ML_IMPLEMENT_NONSCALAR_TO_INT_CASES_D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, ML_ITK_NONSCALAR_TYPE, FCARRIER, DCARRIER) \
1153 case MLint32Type : { \
1154 const MLDataType i32DataType = _addOns->getInputSubImageDataType(); \
1155 switch (i32DataType){ \
1156 case ML##DCARRIER##Type: \
1157 DIM_INST(MLint32, MLint32, DCARRIER, ML_ITK_NONSCALAR_TYPE##d, USER_CODE, CLASS_NAME, DIM); \
1158 break; \
1159 \
1160 default: { \
1161 ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DATA_TYPE, "Input type case(_ML_IMPLEMENT_NONSCALAR_TO_INT_CASES_D) not executed.", ", i32DataType=", i32DataType);\
1162 } \
1163 break; \
1164 } \
1165 } \
1166 break; \
1167
1168//---------------------------------------------------------------------------
1170//---------------------------------------------------------------------------
1171#define _ML_IMPLEMENT_NONSCALAR_TO_INT_CASES_FD(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, ML_ITK_NONSCALAR_TYPE, FCARRIER, DCARRIER) \
1172 _ML_IMPLEMENT_NONSCALAR_TO_INT_CASES_F(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, ML_ITK_NONSCALAR_TYPE, FCARRIER, DCARRIER) \
1173 _ML_IMPLEMENT_NONSCALAR_TO_INT_CASES_D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, ML_ITK_NONSCALAR_TYPE, FCARRIER, DCARRIER)
1174
1175//---------------------------------------------------------------------------
1177//---------------------------------------------------------------------------
1178#define _ML_IMPLEMENT_NONSCALAR_TO_INT_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, ML_ITK_NONSCALAR_TYPE, FCARRIER, DCARRIER, INST_CASES) \
1179{ \
1180 switch (_m_PixelType){ \
1181 INST_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, ML_ITK_NONSCALAR_TYPE, FCARRIER, DCARRIER) \
1182 \
1183 default: { \
1184 ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DATA_TYPE, "Output data type case for _ML_IMPLEMENT_NONSCALAR_TO_INT_CASES not executed.", ", _m_PixelType=", _m_PixelType); \
1185 } \
1186 break; \
1187 } \
1188} \
1189
1190
1191
1192
1193//---------------------------------------------------------------------------
1195//---------------------------------------------------------------------------
1196#define _ML_IMPLEMENT_NONSCALAR_TO_REAL_CASES_F(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, ML_ITK_NONSCALAR_TYPE, FCARRIER, DCARRIER) \
1197 case MLfloatType : { \
1198 const MLDataType fDataType = _addOns->getInputSubImageDataType(); \
1199 switch (fDataType){ \
1200 case ML##FCARRIER##Type: \
1201 DIM_INST(MLfloat, MLfloat, FCARRIER, ML_ITK_NONSCALAR_TYPE##f, USER_CODE, CLASS_NAME, DIM); \
1202 break; \
1203 \
1204 default: { \
1205 ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DATA_TYPE, "Input type case not executed.", ", fDataType=", fDataType); \
1206 } \
1207 break; \
1208 } \
1209 } \
1210 break; \
1211
1212//---------------------------------------------------------------------------
1214//---------------------------------------------------------------------------
1215#define _ML_IMPLEMENT_NONSCALAR_TO_REAL_CASES_D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, ML_ITK_NONSCALAR_TYPE, FCARRIER, DCARRIER) \
1216 case MLdoubleType : { \
1217 const MLDataType dDataType = _addOns->getInputSubImageDataType(); \
1218 switch (dDataType){ \
1219 case ML##DCARRIER##Type: \
1220 DIM_INST(MLdouble, MLdouble, DCARRIER, ML_ITK_NONSCALAR_TYPE##d, USER_CODE, CLASS_NAME, DIM); \
1221 break; \
1222 \
1223 default: { \
1224 ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DATA_TYPE, "Input type case not executed.", ", dDataType=", dDataType); \
1225 } \
1226 break; \
1227 } \
1228 } \
1229 break; \
1230
1231//---------------------------------------------------------------------------
1233//---------------------------------------------------------------------------
1234#define _ML_IMPLEMENT_NONSCALAR_TO_REAL_CASES_FD(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, ML_ITK_NONSCALAR_TYPE, FCARRIER, DCARRIER) \
1235 _ML_IMPLEMENT_NONSCALAR_TO_REAL_CASES_F(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, ML_ITK_NONSCALAR_TYPE, FCARRIER, DCARRIER) \
1236 _ML_IMPLEMENT_NONSCALAR_TO_REAL_CASES_D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, ML_ITK_NONSCALAR_TYPE, FCARRIER, DCARRIER)
1237
1238//---------------------------------------------------------------------------
1240//---------------------------------------------------------------------------
1241#define _ML_IMPLEMENT_NONSCALAR_TO_REAL_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, ML_ITK_NONSCALAR_TYPE, FCARRIER, DCARRIER, INST_CASES) \
1242{ \
1243 switch (_m_PixelType){ \
1244 INST_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, ML_ITK_NONSCALAR_TYPE, FCARRIER, DCARRIER) \
1245 \
1246 default: { \
1247 ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DATA_TYPE, "Output data type case not executed.", ", _m_PixelType=", _m_PixelType); \
1248 } \
1249 break; \
1250 } \
1251} \
1252
1253
1255#define ML_IMPLEMENT_DIFFUSION3D_TENSOR_TO_DIFFUSION3D_TENSOR_CASES_FD(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST)\
1256 _ML_IMPLEMENT_NONSCALAR_TO_NONSCALAR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkDiffusionTensor3D, Vector6f, Vector6d, _ML_IMPLEMENT_NONSCALAR_TO_NONSCALAR_CASES_FD)
1257
1258#define ML_IMPLEMENT_REAL_TO_DIFFUSION3D_TENSOR_CASES_FD(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST)\
1259 _ML_IMPLEMENT_REAL_TO_NONSCALAR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkDiffusionTensor3D, Vector6f, Vector6d, _ML_IMPLEMENT_REAL_TO_NONSCALAR_CASES_FD)
1260
1261#define ML_IMPLEMENT_DIFFUSION3D_TENSOR_TO_INT_CASES_FD(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1262 _ML_IMPLEMENT_NONSCALAR_TO_INT_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkDiffusionTensor3D, Vector6f, Vector6d, _ML_IMPLEMENT_NONSCALAR_TO_INT_CASES_FD)
1263
1264#define ML_IMPLEMENT_DIFFUSION3D_TENSOR_TO_REAL_CASES_FD(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1265 _ML_IMPLEMENT_NONSCALAR_TO_REAL_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkDiffusionTensor3D, Vector6f, Vector6d, _ML_IMPLEMENT_NONSCALAR_TO_REAL_CASES_FD)
1267
1268
1270#define ML_IMPLEMENT_DIFFUSION3D_TENSOR_TO_DIFFUSION3D_TENSOR_CASES_FD(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST)\
1271 _ML_IMPLEMENT_NONSCALAR_TO_NONSCALAR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkDiffusionTensor3D, Vector6f, Vector6d, _ML_IMPLEMENT_NONSCALAR_TO_NONSCALAR_CASES_FD)
1272
1273#define ML_IMPLEMENT_REAL_TO_DIFFUSION3D_TENSOR_CASES_FD(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST)\
1274 _ML_IMPLEMENT_REAL_TO_NONSCALAR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkDiffusionTensor3D, Vector6f, Vector6d, _ML_IMPLEMENT_REAL_TO_NONSCALAR_CASES_FD)
1275
1276#define ML_IMPLEMENT_DIFFUSION3D_TENSOR_TO_INT_CASES_FD(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1277 _ML_IMPLEMENT_NONSCALAR_TO_INT_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkDiffusionTensor3D, Vector6f, Vector6d, _ML_IMPLEMENT_NONSCALAR_TO_INT_CASES_FD)
1278
1279#define ML_IMPLEMENT_DIFFUSION3D_TENSOR_TO_REAL_CASES_FD(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1280 _ML_IMPLEMENT_NONSCALAR_TO_REAL_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkDiffusionTensor3D, Vector6f, Vector6d, _ML_IMPLEMENT_NONSCALAR_TO_REAL_CASES_FD)
1282
1284#define ML_IMPLEMENT_SYMMETRICSECONDRANK3D_TENSOR_TO_SYMMETRICSECONDRANK3D_TENSOR_CASES_FD(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST)\
1285 _ML_IMPLEMENT_NONSCALAR_TO_NONSCALAR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkSymmetricSecondRankTensor3D, Vector6f, Vector6d, _ML_IMPLEMENT_NONSCALAR_TO_NONSCALAR_CASES_FD)
1286
1287#define ML_IMPLEMENT_REAL_TO_SYMMETRICSECONDRANK3D_TENSOR_CASES_FD(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST)\
1288 _ML_IMPLEMENT_REAL_TO_NONSCALAR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkSymmetricSecondRankTensor3D, Vector6f, Vector6d, _ML_IMPLEMENT_REAL_TO_NONSCALAR_CASES_FD)
1289
1290#define ML_IMPLEMENT_SYMMETRICSECONDRANK3D_TENSOR_TO_INT_CASES_FD(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1291 _ML_IMPLEMENT_NONSCALAR_TO_INT_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkSymmetricSecondRankTensor3D, Vector6f, Vector6d, _ML_IMPLEMENT_NONSCALAR_TO_INT_CASES_FD)
1292
1293#define ML_IMPLEMENT_SYMMETRICSECONDRANK3D_TENSOR_TO_REAL_CASES_FD(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1294 _ML_IMPLEMENT_NONSCALAR_TO_REAL_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkSymmetricSecondRankTensor3D, Vector6f, Vector6d, _ML_IMPLEMENT_NONSCALAR_TO_REAL_CASES_FD)
1296
1298#define ML_IMPLEMENT_COMPLEX_TO_COMPLEX_CASES_FD(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST)\
1299 _ML_IMPLEMENT_NONSCALAR_TO_NONSCALAR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkComplex, Complexf, Complexd, _ML_IMPLEMENT_NONSCALAR_TO_NONSCALAR_CASES_FD)
1300
1301#define ML_IMPLEMENT_REAL_TO_COMPLEX_CASES_FD(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST)\
1302 _ML_IMPLEMENT_REAL_TO_NONSCALAR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkComplex, Complexf, Complexd, _ML_IMPLEMENT_REAL_TO_NONSCALAR_CASES_FD)
1303
1304#define ML_IMPLEMENT_COMPLEX_TO_INT_CASES_FD(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1305 _ML_IMPLEMENT_NONSCALAR_TO_INT_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkComplex, Complexf, Complexd, _ML_IMPLEMENT_NONSCALAR_TO_INT_CASES_FD)
1306
1307#define ML_IMPLEMENT_COMPLEX_TO_REAL_CASES_FD(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1308 _ML_IMPLEMENT_NONSCALAR_TO_REAL_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkComplex, Complexf, Complexd, _ML_IMPLEMENT_NONSCALAR_TO_REAL_CASES_FD)
1310
1311
1312
1314#define ML_IMPLEMENT_DIFFUSION3D_TENSOR_TO_DIFFUSION3D_TENSOR_CASES_F(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST)\
1315 _ML_IMPLEMENT_NONSCALAR_TO_NONSCALAR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkDiffusionTensor3D, Vector6f, Vector6d, _ML_IMPLEMENT_NONSCALAR_TO_NONSCALAR_CASES_F)
1316
1317#define ML_IMPLEMENT_REAL_TO_DIFFUSION3D_TENSOR_CASES_F(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST)\
1318 _ML_IMPLEMENT_REAL_TO_NONSCALAR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkDiffusionTensor3D, Vector6f, Vector6d, _ML_IMPLEMENT_REAL_TO_NONSCALAR_CASES_F)
1319
1320#define ML_IMPLEMENT_DIFFUSION3D_TENSOR_TO_INT_CASES_F(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1321 _ML_IMPLEMENT_NONSCALAR_TO_INT_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkDiffusionTensor3D, Vector6f, Vector6d, _ML_IMPLEMENT_NONSCALAR_TO_INT_CASES_F)
1322
1323#define ML_IMPLEMENT_DIFFUSION3D_TENSOR_TO_REAL_CASES_F(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1324 _ML_IMPLEMENT_NONSCALAR_TO_REAL_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkDiffusionTensor3D, Vector6f, Vector6d, _ML_IMPLEMENT_NONSCALAR_TO_REAL_CASES_F)
1326
1328#define ML_IMPLEMENT_SYMMETRICSECONDRANK3D_TENSOR_TO_SYMMETRICSECONDRANK3D_TENSOR_CASES_F(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST)\
1329 _ML_IMPLEMENT_NONSCALAR_TO_NONSCALAR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkSymmetricSecondRankTensor3D, Vector6f, Vector6d, _ML_IMPLEMENT_NONSCALAR_TO_NONSCALAR_CASES_F)
1330
1331#define ML_IMPLEMENT_REAL_TO_SYMMETRICSECONDRANK3D_TENSOR_CASES_F(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST)\
1332 _ML_IMPLEMENT_REAL_TO_NONSCALAR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkSymmetricSecondRankTensor3D, Vector6f, Vector6d, _ML_IMPLEMENT_REAL_TO_NONSCALAR_CASES_F)
1333
1334#define ML_IMPLEMENT_SYMMETRICSECONDRANK3D_TENSOR_TO_INT_CASES_F(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1335 _ML_IMPLEMENT_NONSCALAR_TO_INT_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkSymmetricSecondRankTensor3D, Vector6f, Vector6d, _ML_IMPLEMENT_NONSCALAR_TO_INT_CASES_F)
1336
1337#define ML_IMPLEMENT_SYMMETRICSECONDRANK3D_TENSOR_TO_REAL_CASES_F(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1338 _ML_IMPLEMENT_NONSCALAR_TO_REAL_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkSymmetricSecondRankTensor3D, Vector6f, Vector6d, _ML_IMPLEMENT_NONSCALAR_TO_REAL_CASES_F)
1340
1342#define ML_IMPLEMENT_COMPLEX_TO_COMPLEX_CASES_F(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST)\
1343 _ML_IMPLEMENT_NONSCALAR_TO_NONSCALAR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkComplex, Complexf, Complexd, _ML_IMPLEMENT_NONSCALAR_TO_NONSCALAR_CASES_F)
1344
1345#define ML_IMPLEMENT_REAL_TO_COMPLEX_CASES_F(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST)\
1346 _ML_IMPLEMENT_REAL_TO_NONSCALAR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkComplex, Complexf, Complexd, _ML_IMPLEMENT_REAL_TO_NONSCALAR_CASES_F)
1347
1348#define ML_IMPLEMENT_COMPLEX_TO_INT_CASES_F(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1349 _ML_IMPLEMENT_NONSCALAR_TO_INT_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkComplex, Complexf, Complexd, _ML_IMPLEMENT_NONSCALAR_TO_INT_CASES_F)
1350
1351#define ML_IMPLEMENT_COMPLEX_TO_REAL_CASES_F(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1352 _ML_IMPLEMENT_NONSCALAR_TO_REAL_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkComplex, Complexf, Complexd, _ML_IMPLEMENT_NONSCALAR_TO_REAL_CASES_F)
1354
1355
1356
1358#define ML_IMPLEMENT_DIFFUSION3D_TENSOR_TO_DIFFUSION3D_TENSOR_CASES_D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST)\
1359 _ML_IMPLEMENT_NONSCALAR_TO_NONSCALAR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkDiffusionTensor3D, Vector6f, Vector6d, _ML_IMPLEMENT_NONSCALAR_TO_NONSCALAR_CASES_D)
1360
1361#define ML_IMPLEMENT_REAL_TO_DIFFUSION3D_TENSOR_CASES_D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST)\
1362 _ML_IMPLEMENT_REAL_TO_NONSCALAR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkDiffusionTensor3D, Vector6f, Vector6d, _ML_IMPLEMENT_REAL_TO_NONSCALAR_CASES_D)
1363
1364#define ML_IMPLEMENT_DIFFUSION3D_TENSOR_TO_INT_CASES_D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1365 _ML_IMPLEMENT_NONSCALAR_TO_INT_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkDiffusionTensor3D, Vector6f, Vector6d, _ML_IMPLEMENT_NONSCALAR_TO_INT_CASES_D)
1366
1367#define ML_IMPLEMENT_DIFFUSION3D_TENSOR_TO_REAL_CASES_D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1368 _ML_IMPLEMENT_NONSCALAR_TO_REAL_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkDiffusionTensor3D, Vector6f, Vector6d, _ML_IMPLEMENT_NONSCALAR_TO_REAL_CASES_D)
1370
1372#define ML_IMPLEMENT_SYMMETRICSECONDRANK3D_TENSOR_TO_SYMMETRICSECONDRANK3D_TENSOR_CASES_D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST)\
1373 _ML_IMPLEMENT_NONSCALAR_TO_NONSCALAR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkSymmetricSecondRankTensor3D, Vector6f, Vector6d, _ML_IMPLEMENT_NONSCALAR_TO_NONSCALAR_CASES_D)
1374
1375#define ML_IMPLEMENT_REAL_TO_SYMMETRICSECONDRANK3D_TENSOR_CASES_D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST)\
1376 _ML_IMPLEMENT_REAL_TO_NONSCALAR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkSymmetricSecondRankTensor3D, Vector6f, Vector6d, _ML_IMPLEMENT_REAL_TO_NONSCALAR_CASES_D)
1377
1378#define ML_IMPLEMENT_SYMMETRICSECONDRANK3D_TENSOR_TO_INT_CASES_D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1379 _ML_IMPLEMENT_NONSCALAR_TO_INT_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkSymmetricSecondRankTensor3D, Vector6f, Vector6d, _ML_IMPLEMENT_NONSCALAR_TO_INT_CASES_D)
1380
1381#define ML_IMPLEMENT_SYMMETRICSECONDRANK3D_TENSOR_TO_REAL_CASES_D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1382 _ML_IMPLEMENT_NONSCALAR_TO_REAL_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkSymmetricSecondRankTensor3D, Vector6f, Vector6d, _ML_IMPLEMENT_NONSCALAR_TO_REAL_CASES_D)
1384
1386#define ML_IMPLEMENT_COMPLEX_TO_COMPLEX_CASES_D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST)\
1387 _ML_IMPLEMENT_NONSCALAR_TO_NONSCALAR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkComplex, Complexf, Complexd, _ML_IMPLEMENT_NONSCALAR_TO_NONSCALAR_CASES_D)
1388
1389#define ML_IMPLEMENT_REAL_TO_COMPLEX_CASES_D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST)\
1390 _ML_IMPLEMENT_REAL_TO_NONSCALAR_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkComplex, Complexf, Complexd, _ML_IMPLEMENT_REAL_TO_NONSCALAR_CASES_D)
1391
1392#define ML_IMPLEMENT_COMPLEX_TO_INT_CASES_D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1393 _ML_IMPLEMENT_NONSCALAR_TO_INT_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkComplex, Complexf, Complexd, _ML_IMPLEMENT_NONSCALAR_TO_INT_CASES_D)
1394
1395#define ML_IMPLEMENT_COMPLEX_TO_REAL_CASES_D(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST) \
1396 _ML_IMPLEMENT_NONSCALAR_TO_REAL_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST, mlItkComplex, Complexf, Complexd, _ML_IMPLEMENT_NONSCALAR_TO_REAL_CASES_D)
1398
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
itk::CovariantVector< double, 4 > mlItkCVVector4d
itk::Vector< float, 8 > mlItkVector8f
itk::CovariantVector< float, 2 > mlItkCVVector2f
itk::Vector< float, 3 > mlItkVector3f
itk::CovariantVector< double, 6 > mlItkCVVector6d
itk::SymmetricSecondRankTensor< double, 3 > mlItkSymmetricSecondRankTensor3Dd
itk::Vector< float, 6 > mlItkVector6f
std::complex< float > Complexf
itk::Vector< double, 8 > mlItkVector8d
itk::CovariantVector< float, 8 > mlItkCVVector8f
itk::CovariantVector< double, 3 > mlItkCVVector3d
std::complex< double > mlItkComplexd
itk::CovariantVector< double, 2 > mlItkCVVector2d
itk::Vector< double, 2 > mlItkVector2d
itk::Vector< float, 2 > mlItkVector2f
itk::SymmetricSecondRankTensor< float, 3 > mlItkSymmetricSecondRankTensor3Df
itk::DiffusionTensor3D< float > mlItkDiffusionTensor3Df
itk::Vector< double, 4 > mlItkVector4d
itk::Vector< float, 4 > mlItkVector4f
itk::CovariantVector< float, 4 > mlItkCVVector4f
itk::Vector< double, 3 > mlItkVector3d
itk::CovariantVector< double, 8 > mlItkCVVector8d
std::complex< float > mlItkComplexf
itk::CovariantVector< float, 6 > mlItkCVVector6f
std::complex< double > Complexd
itk::DiffusionTensor3D< double > mlItkDiffusionTensor3Dd
itk::CovariantVector< float, 3 > mlItkCVVector3f
itk::Vector< double, 6 > mlItkVector6d