Skip to content

Commit

Permalink
ENH: Simpler support for passing ImageList as a Python list
Browse files Browse the repository at this point in the history
  • Loading branch information
dzenanz committed Apr 2, 2024
1 parent 5de5aa1 commit 9272ac2
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions wrapping/itkANTsGroupwiseRegistration.wrap
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
# Needed for passing a list of images via a setter, see commit message here:
# https://github.com/InsightSoftwareConsortium/ITK/pull/526/commits/d6354b9d06457b740d8497595572c908461b5c1c
set(import_text "%include ${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/python/itkImage_ext.i\n")
string(FIND ${ITK_WRAP_PYTHON_SWIG_EXT} ${import_text} pos)
if(${pos} EQUAL -1)
string(PREPEND ITK_WRAP_PYTHON_SWIG_EXT "${import_text}")
endif()
unset(import_text)
# the rest of the file is normal wrapping specification

itk_wrap_class("itk::ANTsGroupwiseRegistration" POINTER)
foreach(d ${ITK_WRAP_IMAGE_DIMS})
foreach(t ${WRAP_ITK_SCALAR})
string(APPEND ITK_WRAP_PYTHON_SWIG_EXT "DECL_PYTHON_STD_VEC_RAW_TO_SMARTPTR_TYPEMAP(itkImage${ITKM_${t}}${d}, itkImage${ITKM_${t}}${d}_Pointer)\n")
itk_wrap_template("F${ITKM_I${ITKM_${t}}${d}}" "${ITKT_I${ITKM_${t}}${d}}, ${ITKT_I${ITKM_F}${d}}, float")
itk_wrap_template("D${ITKM_I${ITKM_${t}}${d}}" "${ITKT_I${ITKM_${t}}${d}}, ${ITKT_I${ITKM_F}${d}}, double")
endforeach()
Expand Down

0 comments on commit 9272ac2

Please sign in to comment.