COMP: Find PyBuffer templates in an installed ITK - #1001
Open
hjmjohnson wants to merge 1 commit into
Open
hjmjohnson wants to merge 1 commit into
hjmjohnson wants to merge 1 commit into
Conversation
An installed ITK has no <include>/../wrapping directory. With
ITK_INSTALL_WRAPPING_DEVELOPMENT_FILES=ON it installs each module's
SWIG templates under ${WRAP_ITK_CMAKE_DIR}/Modules/<Module>/, so look
there first and keep the source-tree path as the fallback.
axel-grc
marked this pull request as ready for review
October 1, 2026 09:16
SimonRit
approved these changes
Oct 1, 2026
Collaborator
|
Can you confirm @hjmjohnson it's ready to be merged? |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Look for
ITKBridgeNumPy'sPyBuffer.i.initandPyBuffer.i.inunder${WRAP_ITK_CMAKE_DIR}/Modules/ITKBridgeNumPy/first, falling back to the source-tree<include>/../wrappingpath. An installed ITK has no such directory; with InsightSoftwareConsortium/ITK#6891 andITK_INSTALL_WRAPPING_DEVELOPMENT_FILES=ONit installs each module's SWIG templates under the wrapping package directory instead.Against an ITK build tree nothing changes: the installed path does not exist there, so the existing lookup is used.
Verification
Linux x86-64, conda gcc 14.3, CUDA 13.3 (
CMAKE_CUDA_ARCHITECTURES=89), ITK at InsightSoftwareConsortium/ITK#6891 head5e059e1installed to a prefix with Python wrapping (F/D, dims 2/3/4) andITK_INSTALL_WRAPPING_DEVELOPMENT_FILES=ON; ITKCudaCommoncf8eb2cbuilt and installed into the same prefix.RTK
6eaffccwith this change,RTK_USE_CUDA=ON,ITK_WRAP_PYTHON=ON: configure, build (915 steps,itkPyBufferRTKwrapped), and install succeed. From the installed package,rtk.CudaFDKConeBeamReconstructionFilter.New()anditk.array_from_imageon a 3D image work.Without this change the same configure fails with
File .../include/wrapping/PyBuffer.i.in does not exist, as reported by @axel-grc on the ITK PR.