Skip to content

Improve type declaration - #278

Open
Ragnar-Oock wants to merge 4 commits into
cornerstonejs:masterfrom
Ragnar-Oock:feat/improved-declaration
Open

Improve type declaration#278
Ragnar-Oock wants to merge 4 commits into
cornerstonejs:masterfrom
Ragnar-Oock:feat/improved-declaration

Conversation

@Ragnar-Oock

Copy link
Copy Markdown

Replaces PR #258

I had to rename the branch in my fork to avoid issues with multiple parallel PR.

Ragnar-Oock and others added 4 commits August 3, 2023 23:33
- split Element in the various types that actually exist are run time
- improve type for VR and tag parameters
- type Type Guard functions as such
make breaking change of Tag type retro compatible with old interface
@Ragnar-Oock

Copy link
Copy Markdown
Author

The Firefox download link used by the install script is not valid anymore, this makes the CI fail.

MichaelLeeHobbs added a commit to MichaelLeeHobbs/dicomParser that referenced this pull request Jul 23, 2026
…pixel data

Phase 1 PR 3/5. Adds the discriminated-union element model
(value | sequence | encapsulated | unknown, upstream cornerstonejs#257/cornerstonejs#278), a frame-stack
tokenizer with no recursion and bounded loops (mission-critical standard;
maxDepth guard), structural delimiter consumption (cornerstonejs#244/cornerstonejs#143) with
delimitation items always treated as zero-length (cornerstonejs#266), CP-246 UN
undefined-length sequences, cornerstonejs#114 private implicit policy (never peek
private defined-length elements), stopAt with >= semantics (cornerstonejs#104/cornerstonejs#268/#52),
typed errors with partial-result salvage (#46/cornerstonejs#203/cornerstonejs#277), and the
encapsulated pixel-data scanner (BOT + fragments).

Ports readSequenceItemsExplicit/Implicit tests and the sequence/UN halves
of readDicomElementExplicit/Implicit tests; adds delimiter-pathology,
stopAt, truncation-salvage and depth-bound coverage.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DSSLWZvjSRByQP3KsghQcJ
MichaelLeeHobbs added a commit to MichaelLeeHobbs/dicomParser that referenced this pull request Jul 23, 2026
…pixel data (#5)

Phase 1 PR 3/5. Adds the discriminated-union element model
(value | sequence | encapsulated | unknown, upstream cornerstonejs#257/cornerstonejs#278), a frame-stack
tokenizer with no recursion and bounded loops (mission-critical standard;
maxDepth guard), structural delimiter consumption (cornerstonejs#244/cornerstonejs#143) with
delimitation items always treated as zero-length (cornerstonejs#266), CP-246 UN
undefined-length sequences, cornerstonejs#114 private implicit policy (never peek
private defined-length elements), stopAt with >= semantics (cornerstonejs#104/cornerstonejs#268/#52),
typed errors with partial-result salvage (#46/cornerstonejs#203/cornerstonejs#277), and the
encapsulated pixel-data scanner (BOT + fragments).

Ports readSequenceItemsExplicit/Implicit tests and the sequence/UN halves
of readDicomElementExplicit/Implicit tests; adds delimiter-pathology,
stopAt, truncation-salvage and depth-bound coverage.


Claude-Session: https://claude.ai/code/session_01DSSLWZvjSRByQP3KsghQcJ

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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