Repository navigation
fix: classify only 0x0010-0x00FF odd-group elements as private creators - #559
Merged
awatson1978 merged 1 commit intoSep 30, 2026
Merged
Conversation
Tag.isPrivateCreator accepted any odd-group element from 0x0001 to 0x00FF, but PS3.5 7.8.1 places private creator data elements in (gggg,0010-00FF) only and reserves (gggg,0001-000F) — they "shall not be used". On the implicit-VR read path isPrivateCreator() promotes unknown tags to VR LO, so a reserved-range element decoded as a text creator label instead of reading as UN with its bytes intact. Ports the range check from the v2 line, unskips the KNOWN GAP test in the issue-356 suite, and flips the catalog entry to green. Closes review finding 26 of the PR #512 review map. Co-Authored-By: Claude Fable 5 <[email protected]>
awatson1978
added a commit
that referenced
this pull request
Sep 30, 2026
Finding 26 landed as PR #559 and finding 33 as PR #562 (which ported the v2 uid() rather than documenting only). Master hotfixes are deferred per today's decision; finding 2's documentation pre-landed in docs/INTENTIONAL_CHANGES.md ahead of the anonymizer port. Co-Authored-By: Claude Fable 5 <[email protected]>
|
🎉 This PR is included in version 1.0.0-beta.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
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.
This narrows
Tag.isPrivateCreatorto the element range the standard actually assigns to private creators, and unskips the issue-356 regression test that pins it.Some background. DICOM reserves odd-numbered groups for vendor-private data, and a vendor claims a block of an odd group by writing a private creator element — a short text label like
"ACME 1.0"that says who owns the block. The standard (PS3.5 section 7.8.1) puts those creator elements at element numbers 0x0010 through 0x00FF of the odd group, and it explicitly reserves 0x0001 through 0x000F: they "shall not be used". So an element like (0009,0001) is not a creator label, and nothing in the standard says its bytes are text.The check on this branch accepted the whole 0x0001–0x00FF range. That matters on the implicit-VR read path, where files don't carry type codes inline and
isPrivateCreator()is what promotes an unknown odd-group tag to LO (a text type). A reserved-range element was being decoded as a text label when the standard gives no basis for that. With the narrowed check it reads as UN — unknown, raw bytes intact — which is the honest answer:The change is ported from the v2 line, where it landed with the PS3.5 citation in a comment. The issue-356 suite (
test/issues/issue356-private-creator-range.test.js) already pinned the five conformant cases and carried the reserved-range case as a skipped KNOWN GAP; I verified the skipped test fails against the old check, applied the fix, and unskipped it. The catalog entry for #356 flips gap → green.This is review finding 26 of the PR #512 review map. The map's verdict calls it an improvement to keep, not a regression to revert: the new behavior is exactly conformant, and the parse stays lossless (the raw bytes survive in the UN element, so a downstream filter can re-decode them as text if someone needs the old reading). One thing worth saying plainly:
masteris more permissive here — it accepts 0x0001 and up as creators — so this is a documented, intentional behavior difference, not a bug fix to backport.🤖 Generated with Claude Code