COMP: Update vendored DCMTK to 3.7.0#6363
Conversation
3c8cf93 to
63f9121
Compare
Bump the DCMTK ExternalProject pin from the 2024-03-11 3.6.x snapshot to the DCMTK-3.7.0 patch branch maintained on the InsightSoftwareConsortium/DCMTK fork (20260524_DCMTK-3.7.0_PATCHES_FOR_ITK-wasm-3). The ITK-specific patch stack (ITK PNG/codec sharing, WASI/Emscripten fixes, GSPS/CSPS and plastimatch support) is carried on top of the upstream DCMTK-3.7.0 release tag and recorded in the patch list.
63f9121 to
8d7835e
Compare
|
| Filename | Overview |
|---|---|
| Modules/ThirdParty/DCMTK/DCMTKGitTag.cmake | Core pin update: replaces 3.6.x 20240311 commit hash with DCMTK-3.7.0 patched-branch commit; patch list updated to reflect expanded set (Matt McCormick 1→7, Shreeraj Jadhav 1→9); one patch carries a WIP: prefix |
| Modules/ThirdParty/DCMTK/CMakeLists.txt | Removes dcmwlm and dcmrt from _ITKDCMTK_LIB_NAMES; no ITK source code references these libraries, so the removal is clean and consistent with DCMTK 3.7.0 restructuring |
| Modules/IO/DCMTK/test/CMakeLists.txt | Mirrors the ThirdParty change: drops dcmwlm and dcmrt from the per-library include-path construction list used only for the test driver |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[ITK CMake configure] --> B{ITK_USE_SYSTEM_DCMTK?}
B -- YES --> C[find_package DCMTK]
B -- NO --> D[DCMTKGitTag.cmake pin: 1158255a DCMTK-3.7.0 patched]
D --> E[ExternalProject_Add ITKDCMTK_ExtProject]
E --> F[Build DCMTK 3.7.0 + ITK patch stack]
F --> G[DCMTK libs built: dcmdata, dcmpstat, dcmsr, dcmqrdb, dcmimgle, dcmimage, dcmjpeg, dcmjpls, dcmnet, dcmiod, dcmfg, dcmseg, dcmpmap, ijg8/12/16, oflog, ofstd, oficonv]
F --> H[Removed from 3.7.0: dcmwlm, dcmrt]
G --> I[ITKIODCMTK test driver]
I --> J[24/24 tests pass macOS arm64]
style H fill:#f9d5d3,stroke:#c00
style D fill:#d5f9d5,stroke:#060
Reviews (1): Last reviewed commit: "COMP: Update vendored DCMTK to 3.7.0" | Re-trigger Greptile
| #COMP: Update __cxa_allocate_exception for WASI-SDK 22 | ||
| #COMP: Do not try to make mmap calls with wasi | ||
| #COMP: Add WASI exception shim | ||
| #WIP: Do not use non-type template argument -1 in variadic template |
There was a problem hiding this comment.
WIP-tagged patch in the pinned stack
The patch list includes WIP: Do not use non-type template argument -1 in variadic template (Matt McCormick). Using a non-type template argument of -1 in a variadic template is UB-adjacent in pre-C++20 and can trigger hard errors with strict MSVC /permissive- or Clang -Wtemplate-arg-local-addr. On the tested macOS/arm64/Clang configuration this may be silently tolerated, but the same code could fail to compile on Windows/MSVC or with stricter -std=c++20 flags. Could you confirm whether this is intentional (i.e. the patch is known to be incomplete and the WIP label is just a historical artifact of the commit message) or if there is a follow-up planned?
Update the vendored DCMTK ExternalProject pin from the 2024-03-11 3.6.x snapshot to the DCMTK-3.7.0 patch branch on the InsightSoftwareConsortium/DCMTK fork. Single-file change to
DCMTKGitTag.cmake; the ITK-specific patch stack (ITK codec sharing, WASI/Emscripten, GSPS/CSPS, plastimatch) rides on top of the upstreamDCMTK-3.7.0release tag.Built and tested locally — all DCMTK and GDCM tests pass (details below).
Local build & test results (macOS arm64, Release, Clang)
Built in a worktree with
Module_ITKIODCMTK=ON,ITK_USE_SYSTEM_DCMTK=OFF(all unrelated Remote modules disabled):ITKDCMTK+ITKIODCMTK: built, 0 errors, 0 ITK-side warnings.ITKIODCMTKtest label: 24/24 passed.GDCMtests (shares JPEG/PNG/TIFF/ZLIB): 65/65 passed — confirms codec libraries are undisturbed.The DCMTK 3.7.0 EP resolved its image codecs to ITK's own libraries (verified in the EP
CMakeCache.txt):Not exercised locally: Linux, Windows/MSVC, and the WASI/Emscripten path. Several of the carried 3.7.0 patches are WASM-specific and rely on CI for first execution.
Relationship to #5537
PR #5537 (draft,
DCMTK_USE_FIND_PACKAGE=ON) attempted to make DCMTK consume ITK's PNG/ZLIB/TIFF via standardfind_package. On the 3.6.x pin that approach failed at configure time (its own build log showsFindJPEG.cmakechoking on the:::-mangled include paths ITK passes).With this 3.7.0 update, DCMTK already links ITK's codec libraries through the carried patch stack (verified above), so the goal of #5537 — DCMTK using ITK's bundled codecs — is achieved. This may invalidate the need for #5537; it is left to the maintainers / a follow-up to evaluate whether #5537 should be closed as superseded, or re-scoped to retire the carried codec patches in favor of upstream 3.7.0's improved
find_packagesupport. This PR intentionally does not touch that mechanism.PR Checklist