1
1
itk_wrap_class("itk::ImageToImageFilter" POINTER)
2
2
3
- # Wrap ITK double missing types --
3
+ # Wrap ITK double missing types
4
4
if (NOT ITK_WRAP_double)
5
5
itk_wrap_template("ID1ID1" "itk::Image<${ITKT_D}, 1>, itk::Image<${ITKT_D}, 1>")
6
6
itk_wrap_template("ID3ID2" "itk::Image<${ITKT_D}, 3>, itk::Image<${ITKT_D}, 2>")
@@ -52,44 +52,44 @@ itk_wrap_class("itk::ImageToImageFilter" POINTER)
52
52
endif()
53
53
endif()
54
54
55
+ # Wrap CUDA types
55
56
if(RTK_USE_CUDA)
56
57
itk_wrap_include(itkCudaImage.h)
57
- foreach(d ${ITK_WRAP_IMAGE_DIMS})
58
- itk_wrap_template("CI${ITKM_F}${d}CI${ITKM_F}${d}"
59
- "itk::CudaImage<${ITKT_F}, ${d}>, itk::CudaImage<${ITKT_F}, ${d}>")
60
- endforeach()
61
58
62
59
# Wrap ITK dimension 4 missing types
63
60
list(FIND ITK_WRAP_IMAGE_DIMS "4" _index)
64
61
if (${_index} EQUAL -1)
65
- itk_wrap_template("CIF4CIF4" "itk::CudaImage<${ITKT_F}, 4>, itk::CudaImage<${ITKT_F}, 4>")
62
+ itk_wrap_template("CI${ITKM_F}4CI${ITKM_F}4"
63
+ "itk::CudaImage<${ITKT_F}, 4>, itk::CudaImage<${ITKT_F}, 4>")
66
64
endif()
67
65
68
66
# Force VECTOR_COMPONENTS to "2;3;4;5"
69
67
UNIQUE(imageDimensions "${ITK_WRAP_IMAGE_DIMS};2;3;4")
70
68
UNIQUE(vectorComponents "${ITK_WRAP_VECTOR_COMPONENTS};2;3;4;5")
71
- foreach(component ${vectorComponents})
69
+ foreach(c ${vectorComponents})
72
70
foreach(d ${imageDimensions})
73
- itk_wrap_template("CI${ITKM_VF${component}}${d}CI${ITKM_VF${component}}${d}"
74
- "itk::CudaImage<${ITKT_VF${component}}, ${d}>, itk::CudaImage<${ITKT_VF${component}}, ${d}>")
71
+ list(FIND ITK_WRAP_IMAGE_DIMS "${d}" _indexd)
72
+ list(FIND ITK_WRAP_VECTOR_COMPONENTS "${c}" _indexc)
73
+ if (${_indexd} EQUAL -1 OR ${_indexc} EQUAL -1)
74
+ itk_wrap_template("CI${ITKM_VF${c}}${d}CI${ITKM_VF${c}}${d}"
75
+ "itk::CudaImage<${ITKT_VF${c}}, ${d}>, itk::CudaImage<${ITKT_VF${c}}, ${d}>")
76
+ endif()
75
77
endforeach()
76
78
endforeach()
77
79
78
80
endif()
79
81
80
82
# Force ITK_WRAP_IMAGE_DIMS to contain "2;3;4"
81
83
UNIQUE(imageDimensions "${ITK_WRAP_IMAGE_DIMS};2;3;4")
82
- set(vectorComponents 2 3 4 5)
83
- foreach(component ${vectorComponents})
84
- list(FIND ITK_WRAP_VECTOR_COMPONENTS "${component}" _index)
85
- if (${_index} EQUAL -1)
86
- foreach(vt ${WRAP_ITK_VECTOR_REAL})
87
- foreach(d ${imageDimensions})
88
- itk_wrap_template("I${ITKM_${vt}${component}}${d}I${ITKM_${vt}${component}}${d}"
89
- "itk::Image<${ITKT_${vt}${component}}, ${d}>, itk::Image<${ITKT_${vt}${component}}, ${d}>")
90
- endforeach()
84
+ set(vectorComponents "2;3;4;5")
85
+ remove(vectorComponents "${vectorComponents}" "${ITK_WRAP_VECTOR_COMPONENTS}")
86
+ foreach(c ${vectorComponents})
87
+ foreach(vt ${WRAP_ITK_VECTOR_REAL})
88
+ foreach(d ${imageDimensions})
89
+ itk_wrap_template("I${ITKM_${vt}${c}}${d}I${ITKM_${vt}${c}}${d}"
90
+ "itk::Image<${ITKT_${vt}${c}}, ${d}>, itk::Image<${ITKT_${vt}${c}}, ${d}>")
91
91
endforeach()
92
- endif ()
92
+ endforeach ()
93
93
endforeach()
94
94
95
95
# Force ITK_WRAP_VECTOR_COMPONENTS to contain "2;3;4;5"
@@ -101,19 +101,19 @@ itk_wrap_class("itk::ImageToImageFilter" POINTER)
101
101
list(FIND ITK_WRAP_IMAGE_DIMS "${d}" _index)
102
102
if (${_index} EQUAL -1)
103
103
foreach(vt ${WRAP_ITK_VECTOR_REAL})
104
- foreach(component ${ITK_WRAP_VECTOR_COMPONENTS})
105
- itk_wrap_template("I${ITKM_${vt}${component }}${d}I${ITKM_${vt}${component }}${d}"
106
- "itk::Image<${ITKT_${vt}${component }}, ${d}>, itk::Image<${ITKT_${vt}${component }}, ${d}>")
104
+ foreach(c ${ITK_WRAP_VECTOR_COMPONENTS})
105
+ itk_wrap_template("I${ITKM_${vt}${c }}${d}I${ITKM_${vt}${c }}${d}"
106
+ "itk::Image<${ITKT_${vt}${c }}, ${d}>, itk::Image<${ITKT_${vt}${c }}, ${d}>")
107
107
endforeach()
108
108
endforeach()
109
109
endif()
110
110
endforeach()
111
111
112
112
# Combination
113
113
set(vectorComponents 2 3 4 5)
114
- foreach(component ${vectorComponents})
114
+ foreach(c ${vectorComponents})
115
115
foreach(vt ${WRAP_ITK_VECTOR_REAL})
116
- itk_wrap_template("I${ITKM_${vt}${component }}4I${ITKM_${vt}${component }}3" "itk::Image<${ITKT_${vt}${component }}, 4>, itk::Image<${ITKT_${vt}${component }}, 3>")
116
+ itk_wrap_template("I${ITKM_${vt}${c }}4I${ITKM_${vt}${c }}3" "itk::Image<${ITKT_${vt}${c }}, 4>, itk::Image<${ITKT_${vt}${c }}, 3>")
117
117
endforeach()
118
118
endforeach()
119
119
@@ -140,5 +140,3 @@ itk_wrap_class("itk::ImageToImageFilter" POINTER)
140
140
endforeach()
141
141
142
142
itk_end_wrap_class()
143
-
144
-
0 commit comments