Skip to content

Commit

Permalink
ENH: Support nearest neighbor interpolator for montaging label maps
Browse files Browse the repository at this point in the history
  • Loading branch information
dzenanz committed May 7, 2024
1 parent 79c8195 commit bd3399d
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions wrapping/itkTileMergeImageFilter.wrap
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
itk_wrap_include("itkLinearInterpolateImageFunction.h")
itk_wrap_include("itkNearestNeighborInterpolateImageFunction.h")
itk_wrap_class("itk::TileMergeImageFilter" POINTER)
foreach(d ${ITK_WRAP_IMAGE_DIMS})
foreach(t ${WRAP_ITK_SCALAR})
itk_wrap_template("${ITKM_I${t}${d}}" "${ITKT_I${t}${d}}, double")
endforeach()
foreach(t ${WRAP_ITK_RGB})
itk_wrap_template("${ITKM_I${t}${d}}" "${ITKT_I${t}${d}}, itk::RGBPixel<float>")
endforeach()
foreach(t ${WRAP_ITK_RGBA})
itk_wrap_template("${ITKM_I${t}${d}}" "${ITKT_I${t}${d}}, itk::RGBAPixel<float>")
foreach(iif "LinearInterpolateImageFunction;NearestNeighborInterpolateImageFunction")
if (${iif} STREQUAL "LinearInterpolateImageFunction")
set(abbr "L") # abbreviation to use in Python wrapping type name
else()
set(abbr "NN")
endif()
foreach(d ${ITK_WRAP_IMAGE_DIMS})
foreach(t ${WRAP_ITK_SCALAR})
itk_wrap_template("${ITKM_I${t}${d}}${abbr}" "${ITKT_I${t}${d}}, double, ${iif}")
endforeach()
foreach(t ${WRAP_ITK_RGB})
itk_wrap_template("${ITKM_I${t}${d}}${abbr}" "${ITKT_I${t}${d}}, itk::RGBPixel<float>, ${iif}")
endforeach()
foreach(t ${WRAP_ITK_RGBA})
itk_wrap_template("${ITKM_I${t}${d}}${abbr}" "${ITKT_I${t}${d}}, itk::RGBAPixel<float>, ${iif}")
endforeach()
endforeach()
endforeach()
itk_end_wrap_class()

0 comments on commit bd3399d

Please sign in to comment.