Skip to content

Commit

Permalink
ENH: Extend NearestNeighborInterpolateImageFunc wrapping for RGB
Browse files Browse the repository at this point in the history
Adding support for vector, RGB, and RGBA pixel types in wrapping
of itkNearestNeighborInterpolateImageFunction.   This will allow,
for example, the wrapped ResampleImageFilter to be called with
an RGB/RGBA pixel type image and use an nearestneighbor interpolator.
Currently only the linear interpolator had RGB/RGBA wrapping.

No C++ code changes were needed.  Tests already exist in ResampleImage5.
  • Loading branch information
aylward committed Mar 7, 2024
1 parent 4881cee commit bac8adf
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ foreach(d ${ITK_WRAP_IMAGE_DIMS})
foreach(t ${WRAP_ITK_SCALAR})
itk_wrap_template("${ITKM_I${t}${d}}${ITKM_D}" "${ITKT_I${t}${d}},${ITKT_D}")
endforeach()
set(vector_dim ${d}) # Wrap only vector dimensions which are the same as image dimensions
foreach(v ${WRAP_ITK_VECTOR})
itk_wrap_template(
"${ITKM_I${v}${vector_dim}${d}}${ITKM_D}"
"${ITKT_I${v}${vector_dim}${d}},${ITKT_D}")
endforeach()
foreach(v ${WRAP_ITK_COLOR})
itk_wrap_template("${ITKM_I${v}${d}}${ITKM_D}" "${ITKT_I${v}${d}},${ITKT_D}")
endforeach()
endforeach()

set(PA3DSCI_types "F")
Expand Down

0 comments on commit bac8adf

Please sign in to comment.