Skip to content

fix: preserve empty sequence items when reading - #608

Merged
wayfarer3130 merged 2 commits into
dcmjs-org:masterfrom
vera-rubin:fix/preserve-empty-sequence-items
Nov 24, 2026
Merged

wayfarer3130 merged 2 commits into
dcmjs-org:masterfrom
vera-rubin:fix/preserve-empty-sequence-items

Conversation

@vera-rubin

Copy link
Copy Markdown

We were dropping empty SQ items when reading, which shifted later items out of position.
We now keep an empty dataset for each empty item and cover defined and undefined lengths in both VR modes.
We tested the fix with regression tests, the full test suite, and the issue reproducer.

Fixes #606

— ChipLab

@netlify

netlify Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for dcmjs2 ready!

Name Link
🔨 Latest commit 5482c80
🔍 Latest deploy log https://app.netlify.com/projects/dcmjs2/deploys/6ad14e940cf765287923e551
😎 Deploy Preview https://deploy-preview-608--dcmjs2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for dcmjs2 ready!

Name Link
🔨 Latest commit e268f4e
🔍 Latest deploy log https://app.netlify.com/projects/dcmjs2/deploys/6b05f4884ed242d20bce79f7
😎 Deploy Preview https://deploy-preview-608--dcmjs2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@wayfarer3130
wayfarer3130 merged commit 76bc3be into dcmjs-org:master Nov 24, 2026
8 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 0.53.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

wayfarer3130 added a commit that referenced this pull request Nov 25, 2026
SequenceOfItems.readBytes skipped an item with no bytes, so later items
moved to a lower index. It now pushes {} for an empty item. The async
reader, fromPart10 and fromPart10Stream already kept empty items; a new
test checks all four readers in both VR modes with defined and
undefined lengths.

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SQ reader drops empty sequence items

2 participants