Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 15 additions & 11 deletions wrapping/itkCudaImageToImageFilterRTK.wrap
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,23 @@ if(RTK_USE_CUDA)

itk_wrap_class("itk::CudaImageToImageFilter" POINTER)

foreach(d ${ITK_WRAP_IMAGE_DIMS})
itk_wrap_template("CI${ITKM_F}${d}CI${ITKM_F}${d}"
"itk::CudaImage<${ITKT_F}, ${d}>, itk::CudaImage<${ITKT_F}, ${d}>")
set(imageDimensions 2 3 4)
foreach(d ${imageDimensions})
list(FIND ITK_WRAP_IMAGE_DIMS "${d}" _index)
if (${_index} EQUAL -1)
itk_wrap_template("CI${ITKM_F}${d}CI${ITKM_F}${d}" "itk::CudaImage<${ITKT_F}, ${d}>, itk::CudaImage<${ITKT_F}, ${d}>")
endif()
endforeach()

# Force VECTOR_COMPONENTS to "2;3;4;5"
UNIQUE(imageDimensions "${ITK_WRAP_IMAGE_DIMS};2;3;4")
UNIQUE(vectorComponents "${ITK_WRAP_VECTOR_COMPONENTS};2;3;4;5")
foreach(component ${vectorComponents})
foreach(d ${imageDimensions})
itk_wrap_template("CI${ITKM_VF${component}}${d}CI${ITKM_VF${component}}${d}"
"itk::CudaImage<${ITKT_VF${component}}, ${d}>, itk::CudaImage<${ITKT_VF${component}}, ${d}>")
endforeach()
set(vectorComponents 2 3 4 5)
foreach(c ${vectorComponents})
list(FIND ITK_WRAP_VECTOR_COMPONENTS "${c}" _index)
if(${_index} EQUAL -1)
UNIQUE(imageDimensions "${ITK_WRAP_IMAGE_DIMS};2;3;4")
foreach(d ${imageDimensions})
itk_wrap_template("CI${ITKM_VF${c}}${d}CI${ITKM_VF${c}}${d}" "itk::CudaImage<${ITKT_VF${c}}, ${d}>, itk::CudaImage<${ITKT_VF${c}}, ${d}>")
endforeach()
endif()
endforeach()

itk_wrap_template("CIF3CIF3RFCIF3CIF3F"
Expand Down
58 changes: 35 additions & 23 deletions wrapping/itkCudaInPlaceImageFilterRTK.wrap
Original file line number Diff line number Diff line change
@@ -1,45 +1,57 @@
if(RTK_USE_CUDA)
itk_wrap_include(rtkParkerShortScanImageFilter.h)

itk_wrap_class("itk::CudaInPlaceImageFilter" POINTER)

#itk_wrap_image_filter_combinations("${WRAP_ITK_REAL}" "${WRAP_ITK_REAL}")
foreach(d ${ITK_WRAP_IMAGE_DIMS})
itk_wrap_template("CI${ITKM_F}${d}CI${ITKM_F}${d}"
"itk::CudaImage<${ITKT_F}, ${d}>, itk::CudaImage<${ITKT_F}, ${d}>")
itk_wrap_include(rtkParkerShortScanImageFilter.h)

set(imageDimensions 2 3 4)
foreach(d ${imageDimensions})
list(FIND ITK_WRAP_IMAGE_DIMS "${d}" _index)
if(${_index} EQUAL -1)
itk_wrap_template("CI${ITKM_F}${d}CI${ITKM_F}${d}" "itk::CudaImage<${ITKT_F}, ${d}>, itk::CudaImage<${ITKT_F}, ${d}>")
endif()
endforeach()

# Force VECTOR_COMPONENTS to "2;3;4;5"
UNIQUE(vectorComponents "${ITK_WRAP_VECTOR_COMPONENTS};2;3;4;5")
foreach(component ${vectorComponents})
foreach(d ${ITK_WRAP_IMAGE_DIMS})
itk_wrap_template("CI${ITKM_V${ITKM_F}${component}}${d}CI${ITKM_V${ITKM_F}${component}}${d}"
"itk::CudaImage<itk::Vector<${ITKT_F},${component}>, ${d}>, itk::CudaImage<itk::Vector<${ITKT_F},${component}>, ${d}>")
endforeach()
set(vectorComponents 2 3 4 5)
foreach(c ${vectorComponents})
list(FIND ITK_WRAP_VECTOR_COMPONENTS "${c}" _index)
if(${_index} EQUAL -1)
UNIQUE(imageDimensions "${ITK_WRAP_IMAGE_DIMS};2;3;4")
foreach(d ${imageDimensions})
itk_wrap_template("CI${ITKM_VF${c}}${d}CI${ITKM_VF${c}}${d}" "itk::CudaImage<${ITKT_VF${c}}, ${d}>, itk::CudaImage<${ITKT_VF${c}}, ${d}>")
endforeach()
endif()
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)
foreach(d ${ITK_WRAP_IMAGE_DIMS})
itk_wrap_template("CI${ITKM_F}${d}CI${ITKM_F}${d}IPIFCI${ITKM_F}${d}" "itk::CudaImage<${ITKT_F}, ${d}>, itk::CudaImage<${ITKT_F}, ${d}>, itk::InPlaceImageFilter< itk::CudaImage<${ITKT_F}, ${d}> >")

set(imageDimensions 2 3 4)
foreach(d ${imageDimensions})
list(FIND ITK_WRAP_IMAGE_DIMS "${d}" _index)
if(${_index} EQUAL -1)
itk_wrap_template("CI${ITKM_F}${d}CI${ITKM_F}${d}CIPIFCI${ITKM_F}${d}"
"itk::CudaImage<${ITKT_F}, ${d}>, itk::CudaImage<${ITKT_F}, ${d}>, itk::InPlaceImageFilter< itk::CudaImage<${ITKT_F}, ${d}>, itk::CudaImage<${ITKT_F}, ${d}> >")
endif()
endforeach()

# Force VECTOR_COMPONENTS to "2;3;4;5"
# Force ITK_WRAP_IMAGE_DIMS to "2;3;4"
UNIQUE(imageDimensions "${ITK_WRAP_IMAGE_DIMS};2;3;4")
UNIQUE(vectorComponents "${ITK_WRAP_VECTOR_COMPONENTS};2;3;4;5")
foreach(component ${vectorComponents})
foreach(d ${imageDimensions})
itk_wrap_template("CI${ITKM_VF${component}}${d}CI${ITKM_VF${component}}${d}IPIFCI${ITKM_VF${component}}${d}"
"itk::CudaImage<${ITKT_VF${component}}, ${d}>, itk::CudaImage<${ITKT_VF${component}}, ${d}>, itk::InPlaceImageFilter< itk::CudaImage<${ITKT_VF${component}}, ${d}> >")
endforeach()
set(vectorComponents 2 3 4 5)
foreach(c ${vectorComponents})
list(FIND ITK_WRAP_VECTOR_COMPONENTS "${c}" _index)
if(${_index} EQUAL -1)
UNIQUE(imageDimensions "${ITK_WRAP_IMAGE_DIMS};2;3;4")
foreach(d ${imageDimensions})
itk_wrap_template("CI${ITKM_VF${c}}${d}CI${ITKM_VF${c}}${d}CIPIFCI${ITKM_VF${c}}${d}" "itk::CudaImage<${ITKT_VF${c}}, ${d}>, itk::CudaImage<${ITKT_VF${c}}, ${d}>, itk::InPlaceImageFilter< itk::CudaImage<${ITKT_VF${c}}, ${d}>, itk::CudaImage<${ITKT_VF${c}}, ${d}> >")
endforeach()
endif()
endforeach()

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

itk_end_wrap_class()

endif()
19 changes: 8 additions & 11 deletions wrapping/itkImageToImageFilterRTK.wrap
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,15 @@ itk_wrap_class("itk::ImageToImageFilter" POINTER)
itk_wrap_template("CIUS3CIF3"
"itk::CudaImage<${ITKT_US}, 3>, itk::CudaImage<${ITKT_F}, 3>")

# Force VECTOR_COMPONENTS to "2;3;4;5"
UNIQUE(imageDimensions "${ITK_WRAP_IMAGE_DIMS};2;3;4")
UNIQUE(vectorComponents "${ITK_WRAP_VECTOR_COMPONENTS};2;3;4;5")
set(vectorComponents 2 3 4 5)
foreach(c ${vectorComponents})
foreach(d ${imageDimensions})
list(FIND ITK_WRAP_IMAGE_DIMS "${d}" _indexd)
list(FIND ITK_WRAP_VECTOR_COMPONENTS "${c}" _indexc)
if (${_indexd} EQUAL -1 OR ${_indexc} EQUAL -1)
itk_wrap_template("CI${ITKM_VF${c}}${d}CI${ITKM_VF${c}}${d}"
"itk::CudaImage<${ITKT_VF${c}}, ${d}>, itk::CudaImage<${ITKT_VF${c}}, ${d}>")
endif()
endforeach()
list(FIND ITK_WRAP_VECTOR_COMPONENTS "${c}" _index)
if(${_index} EQUAL -1)
UNIQUE(imageDimensions "${ITK_WRAP_IMAGE_DIMS};2;3;4")
foreach(d ${imageDimensions})
itk_wrap_template("CI${ITKM_VF${c}}${d}CI${ITKM_VF${c}}${d}" "itk::CudaImage<${ITKT_VF${c}}, ${d}>, itk::CudaImage<${ITKT_VF${c}}, ${d}>")
endforeach()
endif()
endforeach()

endif()
Expand Down
25 changes: 10 additions & 15 deletions wrapping/itkInPlaceImageFilterRTK.wrap
Original file line number Diff line number Diff line change
Expand Up @@ -51,25 +51,20 @@ itk_wrap_class("itk::InPlaceImageFilter" POINTER)

itk_wrap_include(itkCudaImage.h)

foreach(d ${ITK_WRAP_IMAGE_DIMS})
itk_wrap_template("CI${ITKM_F}${d}" "itk::CudaImage<${ITKT_F}, ${d}>")
endforeach()

# Wrap ITK dimension 4 CUDA missing types
list(FIND ITK_WRAP_IMAGE_DIMS "4" _index)
if (${_index} EQUAL -1)
itk_wrap_template("CIF4CIF4" "itk::CudaImage<${ITKT_F}, 4>, itk::CudaImage<${ITKT_F}, 4>")
itk_wrap_template("CI${ITKM_F}4CI${ITKM_F}4" "itk::CudaImage<${ITKT_F}, 4>, itk::CudaImage<${ITKT_F}, 4>")
endif()

# Force VECTOR_COMPONENTS to "2;3;4;5"
UNIQUE(imageDimensions "${ITK_WRAP_IMAGE_DIMS};2;3;4")
UNIQUE(vectorComponents "${ITK_WRAP_VECTOR_COMPONENTS};2;3;4;5")
foreach(component ${vectorComponents})
foreach(d ${imageDimensions})
itk_wrap_template("CI${ITKM_VF${component}}${d}" "itk::CudaImage<${ITKT_VF${component}}, ${d}>")
itk_wrap_template("CI${ITKM_VF${component}}${d}CI${ITKM_VF${component}}${d}"
"itk::CudaImage<${ITKT_VF${component}}, ${d}>, itk::CudaImage<${ITKT_VF${component}}, ${d}>")
endforeach()
set(vectorComponents 2 3 4 5)
foreach(c ${vectorComponents})
list(FIND ITK_WRAP_VECTOR_COMPONENTS "${c}" _index)
if(${_index} EQUAL -1)
UNIQUE(imageDimensions "${ITK_WRAP_IMAGE_DIMS};2;3;4")
foreach(d ${imageDimensions})
itk_wrap_template("CI${ITKM_VF${c}}${d}CI${ITKM_VF${c}}${d}" "itk::CudaImage<${ITKT_VF${c}}, ${d}>, itk::CudaImage<${ITKT_VF${c}}, ${d}>")
endforeach()
endif()
endforeach()

endif()
Expand Down
2 changes: 1 addition & 1 deletion wrapping/rtkDenoisingBPDQImageFilter.wrap
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ itk_wrap_class("rtk::DenoisingBPDQImageFilter" POINTER)
endforeach()
endforeach()
# Explicit float instantiation with gradient length (d-1) needed by TotalNuclearVariationDenoisingBPDQ
if(d GREATER 1)
if(d GREATER 2)
math(EXPR gradDim "${d}-1")
itk_wrap_template("IF${d}ICVF${gradDim}${d}"
"itk::Image<float, ${d}>, itk::Image<itk::CovariantVector< float,${gradDim} >, ${d}>")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
itk_wrap_class("rtk::TotalNuclearVariationDenoisingBPDQImageFilter" POINTER)
foreach(d ${ITK_WRAP_IMAGE_DIMS})
if(d GREATER 1)
if(d GREATER 2)
math(EXPR gradDim "${d}-1")
itk_wrap_template("I${ITKM_F}${d}ICVF${gradDim}${d}"
"itk::Image<${ITKT_F}, ${d}>, itk::Image<itk::CovariantVector< ${ITKT_F}, ${gradDim} >, ${d}>")
Expand Down
Loading