-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup wrapping infrastructure for Cuda classes
- Loading branch information
1 parent
f2d2616
commit 154abe2
Showing
19 changed files
with
232 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
if(RTK_USE_CUDA) | ||
|
||
itk_wrap_simple_class("itk::CudaDataManager" POINTER) | ||
|
||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
if(RTK_USE_CUDA) | ||
|
||
#----------------------------------------------------------------------------- | ||
# itk::CudaImage : CI | ||
#----------------------------------------------------------------------------- | ||
itk_wrap_class("itk::CudaImage" POINTER_WITH_CONST_POINTER) | ||
foreach(d ${ITK_WRAP_IMAGE_DIMS}) | ||
foreach(t ${WRAP_ITK_REAL}) | ||
itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}}, ${d}") | ||
endforeach() | ||
endforeach() | ||
itk_end_wrap_class() | ||
|
||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
if(RTK_USE_CUDA) | ||
|
||
itk_wrap_include(itkCudaImage.h) | ||
|
||
itk_wrap_class("itk::CudaImageDataManager" POINTER) | ||
foreach(d ${ITK_WRAP_IMAGE_DIMS}) | ||
foreach(t ${WRAP_ITK_REAL}) | ||
itk_wrap_template("CI${ITKM_${t}}${d}" "itk::CudaImage<${ITKT_${t}}, ${d}>") | ||
endforeach() | ||
endforeach() | ||
itk_end_wrap_class() | ||
|
||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
if(RTK_USE_CUDA) | ||
|
||
#-- itk::ImageSource templates -- | ||
itk_wrap_class("itk::ImageSource" POINTER) | ||
foreach(d ${ITK_WRAP_IMAGE_DIMS}) | ||
foreach(t ${WRAP_ITK_REAL}) | ||
itk_wrap_template("CI${ITKM_${t}}${d}" | ||
"itk::CudaImage<${ITKT_${t}}, ${d}>") | ||
endforeach() | ||
endforeach() | ||
itk_end_wrap_class() | ||
|
||
#-- itk::ImageToImageFilter templates -- | ||
itk_wrap_class("itk::ImageToImageFilter" POINTER) | ||
foreach(d ${ITK_WRAP_IMAGE_DIMS}) | ||
foreach(t ${WRAP_ITK_REAL}) | ||
itk_wrap_template("CI${ITKM_${t}}${d}CI${ITKM_${t}}${d}" | ||
"itk::CudaImage<${ITKT_${t}}, ${d}>, itk::CudaImage<${ITKT_${t}}, ${d}>") | ||
endforeach() | ||
endforeach() | ||
itk_end_wrap_class() | ||
|
||
#----------------------------------------------------------------------------- | ||
# itk::CudaImageToImageFilter | ||
#----------------------------------------------------------------------------- | ||
itk_wrap_class("itk::CudaImageToImageFilter" POINTER) | ||
foreach(d ${ITK_WRAP_IMAGE_DIMS}) | ||
foreach(t ${WRAP_ITK_REAL}) | ||
itk_wrap_template("CI${ITKM_${t}}${d}CI${ITKM_${t}}${d}" | ||
"itk::CudaImage<${ITKT_${t}}, ${d}>, itk::CudaImage<${ITKT_${t}}, ${d}>") | ||
endforeach() | ||
endforeach() | ||
itk_end_wrap_class() | ||
|
||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
if(RTK_USE_CUDA) | ||
|
||
#-- itk::InPlaceImageFilter templates -- | ||
itk_wrap_class("itk::InPlaceImageFilter" POINTER) | ||
foreach(d ${ITK_WRAP_IMAGE_DIMS}) | ||
foreach(t ${WRAP_ITK_REAL}) | ||
itk_wrap_template("CI${ITKM_${t}}${d}" "itk::CudaImage<${ITKT_${t}}, ${d}>") | ||
endforeach() | ||
endforeach() | ||
itk_end_wrap_class() | ||
|
||
#-- itk::CudaImageToImageFilter templates -- | ||
itk_wrap_class("itk::CudaImageToImageFilter" POINTER) | ||
foreach(d ${ITK_WRAP_IMAGE_DIMS}) | ||
foreach(t ${WRAP_ITK_REAL}) | ||
itk_wrap_template("CI${ITKM_${t}}${d}CI${ITKM_${t}}${d}IPIFCI${ITKM_${t}}${d}" "itk::CudaImage<${ITKT_${t}}, ${d}>, itk::CudaImage<${ITKT_${t}}, ${d}>, itk::InPlaceImageFilter< itk::CudaImage<${ITKT_${t}}, ${d}> >") | ||
endforeach() | ||
endforeach() | ||
itk_end_wrap_class() | ||
|
||
#----------------------------------------------------------------------------- | ||
# itk::CudaImageToImageFilter | ||
#----------------------------------------------------------------------------- | ||
itk_wrap_class("itk::CudaInPlaceImageFilter" POINTER) | ||
#itk_wrap_image_filter_combinations("${WRAP_ITK_REAL}" "${WRAP_ITK_REAL}") | ||
foreach(d ${ITK_WRAP_IMAGE_DIMS}) | ||
foreach(t ${WRAP_ITK_REAL}) | ||
itk_wrap_template("CI${ITKM_${t}}${d}CI${ITKM_${t}}${d}" | ||
"itk::CudaImage<${ITKT_${t}}, ${d}>, itk::CudaImage<${ITKT_${t}}, ${d}>") | ||
endforeach() | ||
endforeach() | ||
itk_end_wrap_class() | ||
|
||
endif() |
12 changes: 12 additions & 0 deletions
12
wrapping/rtkADMMTotalVariationConeBeamReconstructionFilter.wrap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#----------------------------------------------------------------------------- | ||
# rtk::ADMMTotalVariationConeBeamReconstructionFilter | ||
#----------------------------------------------------------------------------- | ||
itk_wrap_class("rtk::ADMMTotalVariationConeBeamReconstructionFilter" POINTER) | ||
|
||
if(RTK_USE_CUDA) | ||
itk_wrap_template("CIF3" "itk::CudaImage<${ITKT_F}, 3>") | ||
else() | ||
itk_wrap_image_filter("${WRAP_ITK_REAL}" 1 3+) | ||
endif() | ||
|
||
itk_end_wrap_class() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#----------------------------------------------------------------------------- | ||
# rtk::ADMMWaveletsConeBeamReconstructionFilter | ||
#----------------------------------------------------------------------------- | ||
itk_wrap_class("rtk::ADMMWaveletsConeBeamReconstructionFilter" POINTER) | ||
|
||
if(RTK_USE_CUDA) | ||
itk_wrap_template("CIF3" "itk::CudaImage<${ITKT_F}, 3>") | ||
else() | ||
itk_wrap_image_filter("${WRAP_ITK_REAL}" 1 3+) | ||
endif() | ||
|
||
itk_end_wrap_class() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
itk_wrap_class("itk::ImageSource" POINTER) | ||
foreach(t ${WRAP_ITK_REAL}) | ||
itk_wrap_template("ID2" "itk::Image<${ITKT_D}, 2>") | ||
endforeach() | ||
itk_end_wrap_class() | ||
|
||
itk_wrap_class("itk::ImageToImageFilter" POINTER) | ||
foreach(t ${WRAP_ITK_REAL}) | ||
itk_wrap_template("I${ITKM_${t}}3ID2" "itk::Image<${ITKT_${t}}, 3>, itk::Image<${ITKT_D}, 2>") | ||
endforeach() | ||
itk_end_wrap_class() | ||
|
||
#----------------------------------------------------------------------------- | ||
# rtk::AmsterdamShroudImageFilter | ||
#----------------------------------------------------------------------------- | ||
itk_wrap_class("rtk::AmsterdamShroudImageFilter" POINTER) | ||
itk_wrap_image_filter("${WRAP_ITK_REAL}" 1 3+) | ||
itk_end_wrap_class() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#----------------------------------------------------------------------------- | ||
# rtk::BoellaardScatterCorrectionImageFilter | ||
#----------------------------------------------------------------------------- | ||
itk_wrap_class("rtk::BoellaardScatterCorrectionImageFilter" POINTER) | ||
itk_wrap_image_filter("${WRAP_ITK_REAL}" 1 3+) | ||
itk_end_wrap_class() |
12 changes: 12 additions & 0 deletions
12
wrapping/rtkConjugateGradientConeBeamReconstructionFilter.wrap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#----------------------------------------------------------------------------- | ||
# rtk::ConjugateGradientConeBeamReconstructionFilter | ||
#----------------------------------------------------------------------------- | ||
itk_wrap_class("rtk::ConjugateGradientConeBeamReconstructionFilter" POINTER) | ||
|
||
if(RTK_USE_CUDA) | ||
itk_wrap_template("CIF3" "itk::CudaImage<${ITKT_F}, 3>") | ||
else() | ||
itk_wrap_image_filter("${WRAP_ITK_REAL}" 1 3+) | ||
endif() | ||
|
||
itk_end_wrap_class() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,28 @@ | ||
itk_wrap_include(itkCudaImage.h) | ||
if(RTK_USE_CUDA) | ||
itk_wrap_include(itkCudaImage.h) | ||
endif() | ||
|
||
#----------------------------------------------------------------------------- | ||
# rtk::ConstantImageSource | ||
#----------------------------------------------------------------------------- | ||
itk_wrap_class("rtk::ConstantImageSource" POINTER) | ||
itk_wrap_image_filter("${WRAP_ITK_REAL}" 1) | ||
|
||
foreach(d ${ITK_WRAP_IMAGE_DIMS}) | ||
foreach(t ${WRAP_ITK_REAL}) | ||
itk_wrap_template("CI${ITKM_${t}}${d}" "itk::CudaImage<${ITKT_${t}}, ${d}>") | ||
if(RTK_USE_CUDA) | ||
foreach(d ${ITK_WRAP_IMAGE_DIMS}) | ||
foreach(t ${WRAP_ITK_REAL}) | ||
itk_wrap_template("CI${ITKM_${t}}${d}" "itk::CudaImage<${ITKT_${t}}, ${d}>") | ||
endforeach() | ||
endforeach() | ||
endforeach() | ||
endif() | ||
|
||
itk_end_wrap_class() | ||
|
||
if(RTK_USE_CUDA) | ||
#----------------------------------------------------------------------------- | ||
# Templates to be used with rtk::CudaConstantImageSource | ||
#----------------------------------------------------------------------------- | ||
itk_wrap_class("itk::CudaImageToImageFilter" POINTER) | ||
itk_wrap_template("CIF3CIF3CteISrcCIF3" "itk::CudaImage<${ITKT_F}, 3>, itk::CudaImage<${ITKT_F}, 3>, rtk::ConstantImageSource< itk::CudaImage<${ITKT_F}, 3> >") | ||
itk_end_wrap_class() | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,5 @@ | ||
#----------------------------------------------------------------------------- | ||
#Add unexisting itk::CudaImageToImageFilter templates | ||
#----------------------------------------------------------------------------- | ||
itk_wrap_class("itk::CudaImageToImageFilter" POINTER) | ||
foreach(d ${ITK_WRAP_IMAGE_DIMS}) | ||
foreach(t ${WRAP_ITK_REAL}) | ||
itk_wrap_template("CI${ITKM_${t}}${d}CI${ITKM_${t}}${d}CteISrcCI${ITKM_${t}}${d}" "itk::CudaImage<${ITKT_${t}}, ${d}>, itk::CudaImage<${ITKT_${t}}, ${d}>, rtk::ConstantImageSource< itk::CudaImage<${ITKT_${t}}, ${d}> >") | ||
endforeach() | ||
endforeach() | ||
itk_end_wrap_class() | ||
if(RTK_USE_CUDA) | ||
|
||
#----------------------------------------------------------------------------- | ||
# rtk::CudaConstantVolumeSource | ||
#----------------------------------------------------------------------------- | ||
itk_wrap_simple_class("rtk::CudaConstantVolumeSource" POINTER) | ||
itk_wrap_simple_class("rtk::CudaConstantVolumeSource" POINTER) | ||
|
||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,5 @@ | ||
if(RTK_USE_CUDA) | ||
|
||
#----------------------------------------------------------------------------- | ||
#Add unexisting itk::CudaImageToImageFilter templates | ||
#----------------------------------------------------------------------------- | ||
itk_wrap_class("itk::CudaImageToImageFilter" POINTER) | ||
foreach(d ${ITK_WRAP_IMAGE_DIMS}) | ||
foreach(t ${WRAP_ITK_REAL}) | ||
itk_wrap_template("CI${ITKM_${t}}${d}CI${ITKM_${t}}${d}DiDIFCI${ITKM_${t}}${d}" | ||
"itk::CudaImage<${ITKT_${t}}, ${d}>, itk::CudaImage<${ITKT_${t}}, ${d}>, rtk::DisplacedDetectorImageFilter< itk::CudaImage<${ITKT_${t}}, ${d}> >") | ||
endforeach() | ||
endforeach() | ||
itk_end_wrap_class() | ||
|
||
itk_wrap_class("itk::CudaInPlaceImageFilter" POINTER) | ||
foreach(d ${ITK_WRAP_IMAGE_DIMS}) | ||
foreach(t ${WRAP_ITK_REAL}) | ||
itk_wrap_template("CI${ITKM_${t}}${d}CI${ITKM_${t}}${d}DDIFCI${ITKM_${t}}${d}" "itk::CudaImage<${ITKT_${t}}, ${d}>, itk::CudaImage<${ITKT_${t}}, ${d}>, rtk::DisplacedDetectorImageFilter< itk::CudaImage<${ITKT_${t}}, ${d}> >") | ||
endforeach() | ||
endforeach() | ||
itk_end_wrap_class() | ||
|
||
#----------------------------------------------------------------------------- | ||
# rtk::CudaConstantVolumeSource | ||
#----------------------------------------------------------------------------- | ||
itk_wrap_simple_class("rtk::CudaDisplacedDetectorImageFilter" POINTER) | ||
itk_wrap_simple_class("rtk::CudaDisplacedDetectorImageFilter" POINTER) | ||
|
||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,32 @@ | ||
itk_wrap_include(itkCudaImage.h) | ||
if(RTK_USE_CUDA) | ||
itk_wrap_include(itkCudaImage.h) | ||
endif() | ||
|
||
#----------------------------------------------------------------------------- | ||
# rtk::DisplacedDetectorImageFilter | ||
#----------------------------------------------------------------------------- | ||
itk_wrap_class("rtk::DisplacedDetectorImageFilter" POINTER) | ||
itk_wrap_image_filter("${WRAP_ITK_REAL}" 1) | ||
|
||
foreach(d ${ITK_WRAP_IMAGE_DIMS}) | ||
foreach(t ${WRAP_ITK_REAL}) | ||
itk_wrap_template("CI${ITKM_${t}}${d}" "itk::CudaImage<${ITKT_${t}}, ${d}>") | ||
if(RTK_USE_CUDA) | ||
foreach(d ${ITK_WRAP_IMAGE_DIMS}) | ||
foreach(t ${WRAP_ITK_REAL}) | ||
itk_wrap_template("CI${ITKM_${t}}${d}" "itk::CudaImage<${ITKT_${t}}, ${d}>") | ||
endforeach() | ||
endforeach() | ||
endforeach() | ||
endif() | ||
|
||
itk_end_wrap_class() | ||
|
||
if(RTK_USE_CUDA) | ||
#----------------------------------------------------------------------------- | ||
# Templates to be used with rtk::CudaDisplacedDetectorImageFilter | ||
#----------------------------------------------------------------------------- | ||
itk_wrap_class("itk::CudaImageToImageFilter" POINTER) | ||
itk_wrap_template("CIF3CIF3DDCIF3" "itk::CudaImage<${ITKT_F}, 3>, itk::CudaImage<${ITKT_F}, 3>, rtk::DisplacedDetectorImageFilter< itk::CudaImage<${ITKT_F}, 3> >") | ||
itk_end_wrap_class() | ||
|
||
itk_wrap_class("itk::CudaInPlaceImageFilter" POINTER) | ||
itk_wrap_template("CIF3CIF3DDCIF3" "itk::CudaImage<${ITKT_F}, 3>, itk::CudaImage<${ITKT_F}, 3>, rtk::DisplacedDetectorImageFilter< itk::CudaImage<${ITKT_F}, 3> >") | ||
itk_end_wrap_class() | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
itk_wrap_class("rtk::FFTConvolutionImageFilter" POINTER) | ||
set(IMAGE_DIMS 3) #Only wrap for 3D images because of rtkFDKConeBeamReconstructionFilter dimension restriction | ||
foreach(d ${IMAGE_DIMS}) | ||
foreach(t ${WRAP_ITK_REAL}) | ||
itk_wrap_template("I${ITKM_${t}}${d}I${ITKM_${t}}${d}${ITKM_D}" "itk::Image<${ITKT_${t}}, ${d}>, itk::Image<${ITKT_${t}}, ${d}>, ${ITKT_D}") | ||
endforeach() | ||
endforeach() | ||
itk_wrap_include( rtkFFTConvolutionImageFilter.h ) | ||
itk_wrap_include( itkImage.h ) | ||
|
||
itk_wrap_named_class("rtk::FFTConvolutionImageFilter" rtkFFTConvolutionImageFilter POINTER) | ||
foreach(t ${WRAP_ITK_REAL}) | ||
itk_wrap_template("I${ITKM_${t}}3I${ITKM_${t}}3${ITKM_D}" | ||
"itk::Image<${ITKT_${t}}, 3>, itk::Image<${ITKT_${t}}, 3>, ${ITKT_D}") | ||
endforeach() | ||
itk_end_wrap_class() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#----------------------------------------------------------------------------- | ||
# rtk::IterativeConeBeamReconstructionFilter | ||
#----------------------------------------------------------------------------- | ||
itk_wrap_class("rtk::IterativeConeBeamReconstructionFilter" POINTER) | ||
|
||
if(RTK_USE_CUDA) | ||
itk_wrap_template("CIF3" "itk::CudaImage<${ITKT_F}, 3>") | ||
else() | ||
itk_wrap_image_filter("${WRAP_ITK_REAL}" 1 3+) | ||
endif() | ||
|
||
itk_end_wrap_class() |