Skip to content

fix(dicom): pad engine-path edge frames; add cross-tool QA toolkit#21

Merged
cornish merged 2 commits into
mainfrom
fix/dicom-edge-frames-and-qa-tooling
Jun 28, 2026
Merged

fix(dicom): pad engine-path edge frames; add cross-tool QA toolkit#21
cornish merged 2 commits into
mainfrom
fix/dicom-edge-frames-and-qa-tooling

Conversation

@cornish

@cornish cornish commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Manual QA toolkit (scripts/qa/): run-matrix.sh (broad conversion/transform/edit matrix + manifest), check-openslide.sh and check-bioformats.sh (auto-validators), MANUAL-TEST-PLAN.md (failure-mode rubric + per-viewer checklist for ImageScope/QuPath/Hamamatsu/OpenSeadragon/Iris).
  • DICOM edge-frame fix (found by the toolkit): convert --to dicom --factor / downsample / crop to DICOM (the retile-engine path) emitted partial edge frames at truncated size. DICOM TILED_FULL requires uniform Rows×Columns frames; OpenSlide's DICOM reader rejected them (Dimensional mismatch reading JPEG). Same class as the v0.24.1 TIFF fix, which only covered codecTileEncoderdicomFrameEncoder now pads frames too (padRGBTileReplicate). Verbatim DICOM-source copy unaffected.

Tests

  • New TestDICOMEdgeFramesAreFullSize (deepest + edge frames decode to full frame size).
  • All DICOM unit + integration tests pass locally; verified clean against the OpenSlide DICOM reader.

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 bif is experimental. Noted in MANUAL-TEST-PLAN.md §4.

Test Plan

  • CI green incl. dciodvfy DICOM conformance + IFE validator + the new conformance tests.

🤖 Generated with Claude Code

cornish and others added 2 commits June 28, 2026 14:08
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>
@cornish cornish merged commit c2464e4 into main Jun 28, 2026
2 checks passed
@cornish cornish deleted the fix/dicom-edge-frames-and-qa-tooling branch June 28, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant