Skip to content

Commit

Permalink
ENH: Remove unneeded types from wrapping
Browse files Browse the repository at this point in the history
This commit removes cuda image filters because they will be useless most
of the time. Also removed the wrapping of CudaSquareImageFilter since
it is more an example than a revelant part of the API.
CudaImage is now wrapped for all types.
  • Loading branch information
AlexyPellegrini committed Jun 1, 2022
1 parent 095abb2 commit 3531dd0
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 106 deletions.
15 changes: 8 additions & 7 deletions wrapping/itkCudaImage.wrap
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
itk_wrap_class("itk::CudaImage" POINTER_WITH_CONST_POINTER)

UNIQUE(types "UC;UL;${ITKM_IT};${WRAP_ITK_SCALAR}")
foreach(d ${ITK_WRAP_IMAGE_DIMS})
itk_wrap_template("F${d}" "float, ${d}")
foreach(t ${types})
itk_wrap_template("${t}${d}" "${ITKT_${t}}, ${d}")
endforeach()
endforeach()

foreach(component ${ITK_WRAP_VECTOR_COMPONENTS})
UNIQUE(vector_types "${WRAP_ITK_VECTOR_REAL};${WRAP_ITK_COV_VECTOR_REAL}")
foreach(c ${ITK_WRAP_VECTOR_COMPONENTS})
foreach(d ${ITK_WRAP_IMAGE_DIMS})
foreach(vt ${WRAP_ITK_VECTOR_REAL})
itk_wrap_template("${ITKM_${vt}${component}}${d}" "${ITKT_${vt}${component}}, ${d}")
endforeach()
foreach(cvt ${WRAP_ITK_COV_VECTOR_REAL})
itk_wrap_template("${ITKM_${cvt}${component}}${d}" "${ITKT_${cvt}${component}}, ${d}")
foreach(vt ${vector_types})
itk_wrap_template("${ITKM_${vt}${c}}${d}" "${ITKT_${vt}${c}}, ${d}")
endforeach()
endforeach()
endforeach()
Expand Down
13 changes: 9 additions & 4 deletions wrapping/itkCudaImageDataManager.wrap
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@ itk_wrap_include(itkCudaImage.h)

itk_wrap_class("itk::CudaImageDataManager" POINTER)

UNIQUE(types "UC;UL;${ITKM_IT};${WRAP_ITK_SCALAR}")
foreach(d ${ITK_WRAP_IMAGE_DIMS})
itk_wrap_template("CI${ITKM_F}${d}" "itk::CudaImage<${ITKT_F}, ${d}>")
foreach(t ${types})
itk_wrap_template("CI${ITKM_${t}}${d}" "itk::CudaImage<${ITKT_${t}}, ${d}>")
endforeach()
endforeach()

foreach(component ${ITK_WRAP_VECTOR_COMPONENTS})
UNIQUE(vector_types "${WRAP_ITK_VECTOR_REAL};${WRAP_ITK_COV_VECTOR_REAL}")
foreach(c ${ITK_WRAP_VECTOR_COMPONENTS})
foreach(d ${ITK_WRAP_IMAGE_DIMS})
itk_wrap_template("CI${ITKM_VF${component}}${d}" "itk::CudaImage<${ITKT_VF${component}}, ${d}>")
itk_wrap_template("CI${ITKM_CVF${component}}${d}" "itk::CudaImage<${ITKT_CVF${component}}, ${d}>")
foreach(vt ${vector_types})
itk_wrap_template("CI${ITKM_${vt}${c}}${d}" "itk::CudaImage<${ITKT_${vt}${c}}, ${d}>")
endforeach()
endforeach()
endforeach()

Expand Down
15 changes: 0 additions & 15 deletions wrapping/itkCudaImageToImageFilter.wrap

This file was deleted.

31 changes: 0 additions & 31 deletions wrapping/itkCudaInPlaceImageFilter.wrap

This file was deleted.

9 changes: 0 additions & 9 deletions wrapping/itkCudaSquareImageFilter.wrap

This file was deleted.

12 changes: 9 additions & 3 deletions wrapping/itkImageSourceCudaCommon.wrap
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@ itk_wrap_include(itkCudaImage.h)

itk_wrap_class("itk::ImageSource" POINTER)

UNIQUE(types "UC;UL;${ITKM_IT};${WRAP_ITK_SCALAR}")
foreach(d ${ITK_WRAP_IMAGE_DIMS})
itk_wrap_template("CI${ITKM_F}${d}" "itk::CudaImage<${ITKT_F}, ${d}>")
foreach(t ${types})
itk_wrap_template("CI${ITKM_${t}}${d}" "itk::CudaImage<${ITKT_${t}}, ${d}>")
endforeach()
endforeach()

foreach(component ${ITK_WRAP_VECTOR_COMPONENTS})
UNIQUE(vector_types "${WRAP_ITK_VECTOR_REAL};${WRAP_ITK_COV_VECTOR_REAL}")
foreach(c ${ITK_WRAP_VECTOR_COMPONENTS})
foreach(d ${ITK_WRAP_IMAGE_DIMS})
itk_wrap_template("CI${ITKM_VF${component}}${d}" "itk::CudaImage<${ITKT_VF${component}}, ${d}>")
foreach(vt ${vector_types})
itk_wrap_template("CI${ITKM_${vt}${c}}${d}" "itk::CudaImage<${ITKT_${vt}${c}}, ${d}>")
endforeach()
endforeach()
endforeach()

Expand Down
19 changes: 0 additions & 19 deletions wrapping/itkImageToImageFilterCudaCommon.wrap

This file was deleted.

18 changes: 0 additions & 18 deletions wrapping/itkInPlaceImageFilterCudaCommon.wrap

This file was deleted.

0 comments on commit 3531dd0

Please sign in to comment.