Skip to content

UntilTag should stop on the first tag greater than the requested tag - #268

Open
jpambrun wants to merge 2 commits into
cornerstonejs:masterfrom
jpambrun:jpambrun/stop-greater-than-untiltag
Open

UntilTag should stop on the first tag greater than the requested tag#268
jpambrun wants to merge 2 commits into
cornerstonejs:masterfrom
jpambrun:jpambrun/stop-greater-than-untiltag

Conversation

@jpambrun

Copy link
Copy Markdown
Collaborator

DICOM tags are sorted in order in a dicom file. The expectation with untilTag is that parsing will stop as soon as any tag greater then the requested tag is met. This makes it possbiel to parse file parially, say to omit the group 6000 and pixel data, without knowing the presence of a given tag.

Fixes #104

This was only superficially tested.

@jpambrun
jpambrun requested a review from yagni April 28, 2024 00:56
Comment thread package.json

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there no way to make this PR work without updating tooling? It might impact unexpected parts of the code.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's been a while, but, if I remember correctly, the build was just not working for me.
Otherwise, the tooling changes should not be needed.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commit message "Update webpack so it build on modern node" support my memory.

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.

untilTag breaks if the tag is not in dicom

2 participants