fix(dicom): pad engine-path edge frames; add cross-tool QA toolkit#21
Merged
Conversation
Add scripts/qa/ — a manual QA harness for exercising wsitools across formats
and confirming outputs in real viewers before a release:
- run-matrix.sh: generate a broad matrix of conversions/transforms/edits +
a manifest (containers, codecs, --factor/--rect/--tile-size, downsample,
crop ±lossless, transcode, cross-format → svs, → dicom, associated edits).
- check-openslide.sh: auto-validate openslide-readable outputs (open, render
deepest level — catches the edge-tile "dimensional mismatch" — level count,
associated images).
- check-bioformats.sh: auto-validate via Bio-Formats showinf (QuPath proxy),
optional pixel-decode crop.
- MANUAL-TEST-PLAN.md: rubric (the real-viewer failure modes) + per-viewer
checklists (ImageScope/QuPath/Hamamatsu/OpenSeadragon/Iris validator) +
known N/A gaps.
The toolkit immediately found a real bug: convert --to dicom --factor (the
retile-engine DICOM path) emitted partial edge frames at truncated size, but
DICOM TILED_FULL requires every frame to be exactly Rows×Columns — OpenSlide's
DICOM reader rejected it ("Dimensional mismatch reading JPEG, expected 256x256,
got 180x129"). Same class as the v0.24.1 TIFF edge-tile fix, which only covered
codecTileEncoder. dicomFrameEncoder now edge-replicates partial frames up to the
full frame size too (reusing padRGBTileReplicate). Regression test:
TestDICOMEdgeFramesAreFullSize. Verified clean against OpenSlide.
Known interop gap surfaced (not fixed; experimental): OpenSlide's Ventana reader
rejects our synthesized BIF TileJointInfo Direction="LEFT"/"UP" ("Bad direction
attribute"); Bio-Formats/QuPath/opentile read our BIF fine. Documented in the
manual plan.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
scripts/qa/):run-matrix.sh(broad conversion/transform/edit matrix + manifest),check-openslide.shandcheck-bioformats.sh(auto-validators),MANUAL-TEST-PLAN.md(failure-mode rubric + per-viewer checklist for ImageScope/QuPath/Hamamatsu/OpenSeadragon/Iris).convert --to dicom --factor/downsample/cropto DICOM (the retile-engine path) emitted partial edge frames at truncated size. DICOM TILED_FULL requires uniformRows×Columnsframes; OpenSlide's DICOM reader rejected them (Dimensional mismatch reading JPEG). Same class as the v0.24.1 TIFF fix, which only coveredcodecTileEncoder—dicomFrameEncodernow pads frames too (padRGBTileReplicate). Verbatim DICOM-source copy unaffected.Tests
TestDICOMEdgeFramesAreFullSize(deepest + edge frames decode to full frame size).Known gap (documented, not fixed)
OpenSlide's Ventana reader rejects our synthesized BIF
TileJointInfo Direction="LEFT"/"UP". Bio-Formats/QuPath/opentile read our BIF fine;--to bifis experimental. Noted in MANUAL-TEST-PLAN.md §4.Test Plan
🤖 Generated with Claude Code