Skip to content

Commit

Permalink
ENH: Add Cuda wrapping of Parker, scatter glare and ramp filters
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Rit authored and SimonRit committed Jul 4, 2023
1 parent 2ab79c1 commit 777b75a
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 2 deletions.
6 changes: 4 additions & 2 deletions wrapping/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ set(WRAPPER_SUBMODULE_ORDER
itkImageRTK
itkCudaImageRTK
itkVectorImageRTK
rtkFFTRampImageFilter
rtkScatterGlareCorrectionImageFilter
itkImageSourceRTK
itkImageToImageFilterRTK
itkCudaImageToImageFilter
itkCudaImageToImageFilterRTK
itkInPlaceImageFilterRTK
itkCudaInPlaceImageFilter
itkCudaInPlaceImageFilterRTK
rtkForwardProjectionImageFilter
itkPyBufferRTK
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
if(RTK_USE_CUDA)
itk_wrap_include(rtkFFTRampImageFilter.h)
itk_wrap_include(rtkScatterGlareCorrectionImageFilter.h)

itk_wrap_class("itk::CudaImageToImageFilter" POINTER)

Expand All @@ -17,6 +19,10 @@ if(RTK_USE_CUDA)
endforeach()
endforeach()

itk_wrap_template("CIF3CIF3RFCIF3CIF3F"
"itk::CudaImage<float, 3>, itk::CudaImage<float, 3>, rtk::FFTRampImageFilter< itk::CudaImage<float, 3>, itk::CudaImage<float, 3>, float >")
itk_wrap_template("CIF3CIF3SGCIF3CIF3F"
"itk::CudaImage<float, 3>, itk::CudaImage<float, 3>, rtk::ScatterGlareCorrectionImageFilter< itk::CudaImage<float, 3>, itk::CudaImage<float, 3>, float >")
itk_end_wrap_class()

endif()
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
if(RTK_USE_CUDA)
itk_wrap_include(rtkParkerShortScanImageFilter.h)

itk_wrap_class("itk::CudaInPlaceImageFilter" POINTER)

Expand All @@ -17,6 +18,8 @@ if(RTK_USE_CUDA)
endforeach()
endforeach()

itk_wrap_template("CIF3CIF3PSCIF3"
"itk::CudaImage<float, 3>, itk::CudaImage<float, 3>, rtk::ParkerShortScanImageFilter< itk::CudaImage<float, 3>>")
itk_end_wrap_class()

itk_wrap_class("itk::CudaImageToImageFilter" POINTER)
Expand All @@ -35,6 +38,8 @@ if(RTK_USE_CUDA)
endforeach()
endforeach()

itk_wrap_template("CIF3CIF3PSCIF3"
"itk::CudaImage<float, 3>, itk::CudaImage<float, 3>, rtk::ParkerShortScanImageFilter< itk::CudaImage<float, 3>>")
itk_end_wrap_class()

endif()
9 changes: 9 additions & 0 deletions wrapping/rtkCudaFFTProjectionsConvolutionImageFilter.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
if(RTK_USE_CUDA)
itk_wrap_include(rtkScatterGlareCorrectionImageFilter.h)
itk_wrap_include(rtkFFTRampImageFilter.h)

itk_wrap_class("rtk::CudaFFTProjectionsConvolutionImageFilter" POINTER)
itk_wrap_template("SGCIF3CIF3F" "rtk::ScatterGlareCorrectionImageFilter<itk::CudaImage<float, 3>, itk::CudaImage<float, 3>, float>")
itk_wrap_template("RFCIF3CIF3F" "rtk::FFTRampImageFilter<itk::CudaImage<float, 3>, itk::CudaImage<float, 3>, float>")
itk_end_wrap_class()
endif()
7 changes: 7 additions & 0 deletions wrapping/rtkCudaFFTRampImageFilter.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
if(RTK_USE_CUDA)
itk_wrap_class("rtk::FFTRampImageFilter" POINTER)
itk_wrap_template("CIF3CIF3F" "itk::CudaImage<float, 3>, itk::CudaImage<float, 3>, float")
itk_end_wrap_class()

itk_wrap_simple_class("rtk::CudaFFTRampImageFilter" POINTER)
endif()
3 changes: 3 additions & 0 deletions wrapping/rtkCudaParkerShortScanImageFilter.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if(RTK_USE_CUDA)
itk_wrap_simple_class("rtk::CudaParkerShortScanImageFilter" POINTER)
endif()
3 changes: 3 additions & 0 deletions wrapping/rtkCudaScatterGlareCorrectionImageFilter.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if(RTK_USE_CUDA)
itk_wrap_simple_class("rtk::CudaScatterGlareCorrectionImageFilter" POINTER)
endif()
7 changes: 7 additions & 0 deletions wrapping/rtkParkerShortScanImageFilter.wrap
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
if(RTK_USE_CUDA)
itk_wrap_include(itkCudaImage.h)
endif()

itk_wrap_class("rtk::ParkerShortScanImageFilter" POINTER)
itk_wrap_image_filter("${WRAP_ITK_REAL}" 1)
if(RTK_USE_CUDA)
itk_wrap_template("CIF3" "itk::CudaImage<float, 3>")
endif()
itk_end_wrap_class()
7 changes: 7 additions & 0 deletions wrapping/rtkScatterGlareCorrectionImageFilter.wrap
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
if(RTK_USE_CUDA)
itk_wrap_include(itkCudaImage.h)
endif()

itk_wrap_class("rtk::ScatterGlareCorrectionImageFilter" POINTER)
foreach(t ${WRAP_ITK_REAL})
itk_wrap_template("I${ITKM_${t}}3I${ITKM_${t}}3F"
"itk::Image<${ITKT_${t}}, 3>, itk::Image<${ITKT_${t}}, 3>, float")
endforeach()
if(RTK_USE_CUDA)
itk_wrap_template("CIF3CIF3F" "itk::CudaImage<float, 3>, itk::CudaImage<float, 3>, float")
endif()
itk_end_wrap_class()

0 comments on commit 777b75a

Please sign in to comment.