Merge MetaIO 2026-07-22 (8c41a1d9): fix #6575 B64/B65/B66 - #6692
Conversation
Code extracted from:
https://github.com/Kitware/MetaIO.git
at commit 8c41a1d91be82efab6fae3524aa929af76cf339b (master).
# Conflicts: # Modules/ThirdParty/MetaIO/src/MetaIO/src/tests/testMeta13ImageList.cxx # Modules/ThirdParty/MetaIO/src/MetaIO/src/tests/testMeta14ImageCompressed.cxx
|
| Filename | Overview |
|---|---|
| Modules/ThirdParty/MetaIO/src/MetaIO/src/metaUtils.cxx | Adds output-byte accounting but still permits decompression success without reaching the end of the compressed stream. |
| Modules/ThirdParty/MetaIO/src/MetaIO/src/metaImage.cxx | Fixes LIST bounds and completeness checks, corrects LOCAL compressed-data positioning, and propagates decompression failure. |
| Modules/ThirdParty/MetaIO/src/MetaIO/src/metaArray.cxx | Corrects inferred compressed-data positioning and propagates decompression failure. |
| Modules/ThirdParty/MetaIO/src/MetaIO/src/CMakeLists.txt | Aligns the VTK physical target name and shared-library export symbol with VTK's MetaIO integration. |
| Modules/ThirdParty/MetaIO/src/MetaIO/src/tests/testMeta13ImageList.cxx | Adds regression coverage for valid, incomplete, and out-of-range LIST inputs. |
| Modules/ThirdParty/MetaIO/src/MetaIO/src/tests/testMeta14ImageCompressed.cxx | Adds compressed LOCAL and truncation regression coverage, but does not exercise an exact-size stream missing a valid trailer. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[MetaImage or MetaArray read] --> B[Determine compressed input size]
B --> C[MET_PerformUncompression]
C --> D{inflate reached Z_STREAM_END?}
D -->|Yes| E{Produced expected bytes?}
D -->|No| F[Return failure]
E -->|Yes| G[Read succeeds]
E -->|No| F
Reviews (1): Last reviewed commit: "Merge branch 'upstream-MetaIO' into upda..." | Re-trigger Greptile
|
Fixed the ARMBUILD-arm / ITK.Linux failure ( Repointed the content link to a valid re-encoded blob (InsightSoftwareConsortium/ITKTestingData#78, merged) in commit 571c7d9. Verified locally against the mirror-fetched blob: reads exit 0 under this PR's MetaIO build; |
The prior fixture's compressed stream was truncated (decompressed to 119 bytes while its header declares 31 MET_FLOAT channels = 124 bytes). The MetaIO 8c41a1d9 uncompression-result fix in this branch correctly rejects it, breaking itkImageFileReaderManyComponentVectorTest. Point the content link at the valid re-encoded blob published in InsightSoftwareConsortium/ITKTestingData#78.
571c7d9 to
1491f01
Compare
|
Upstream fix for the greptile response at Kitware/MetaIO#145. Will need to rebase once that is in place. Merging this as is for now. The upstream is real, but out of scope for clearing the problems identified in 6675. |
0025f9c
into
InsightSoftwareConsortium:main
Updates the vendored MetaIO to upstream Kitware/MetaIO
8c41a1d9(2026-07-22), landing the fixes for #6575 items B64, B65, and B66. Standard two-parent ThirdParty vendor merge; the diff is MetaIO-only.Upstream fixes (both merged): Kitware/MetaIO#141 (B64) and Kitware/MetaIO#142 (B65, B66).
Bugs fixed
metaImageElementDataFile = LIST: out-of-range file dimension (LIST -1,LIST NDims) and short slice lists falsely reported successM_ReadElements: a compressed image with noCompressedDataSizemeasured from the start of the file, so aLOCALimage inflated its own ASCII headerMET_PerformUncompressionunconditionally returnedtrue;dest_posaccounting skipped the finalinflate, so no byte-count check was possible — both fixed, and both call sites now honour the resultUpstream added two regression tests, vendored here:
testMeta13ImageList.cxx(B64) andtestMeta14ImageCompressed.cxx(B65/B66).Local verification
8c41a1d9MetaIO snapshot intomain; diff vsmainis MetaIO-only (9 files).pre-commit run --all-filesclean.testMeta13ImageListandtestMeta14ImageCompressed.