Skip to content

Add ability to parse untilTag and to stopAfterTag with namified or Group,Element syntax - #149

Closed
jmhmd wants to merge 2 commits into
dcmjs-org:masterfrom
jmhmd:feat/until-stop-after-tag
Closed

jmhmd wants to merge 2 commits into
dcmjs-org:masterfrom
jmhmd:feat/until-stop-after-tag

Conversation

@jmhmd

@jmhmd jmhmd commented Sep 7, 2020

Copy link
Copy Markdown
Contributor

Adds DicomMessage.readFile() options untilTag and stopAfterTag that terminate parsing and return the so far parsed data either up to or including the given tag. Adds normalization of namified or group,element type tags.

Use:

dicomData = dcmjs.data.DicomMessage.readFile(part10Buffer, {
    untilTag: 'StudyInstanceUID', // OR
    untilTag: '(0020,000D)', // OR
    stopAfterTag: 'PatientName', // OR
    stopAfterTag: 'x00100010', // etc...
});

Group,Element formats parsed:

(0028,7017)
[0028,7017]
0028,7017
00287017
x00287017

…r Group,Element syntax

# Conflicts:
#	src/DicomMessage.js
#	test/test_data.js
…r Group,Element syntax

# Conflicts:
#	src/Tag.js
#	test/test_data.js

@pieper pieper left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks great 👍

Just needs to rebased after earlier PR was merged.

@wayfarer3130

Copy link
Copy Markdown
Contributor

@jmhmd, Thank you for this contribution. DicomMessage.readFile() now has the untilTag and includeUntilTagValue options (#490). This PR is no longer necessary, so I close it.

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.

3 participants