dcmjs-org / dcmjs

Javascript implementation of DICOM manipulation
https://dcmjs.netlify.com/
MIT License
299 stars 112 forks source link

Added untilTag and includeUntilTagValue as an option for DICOM file reading #195

Closed whatwilliam closed 3 years ago

whatwilliam commented 3 years ago

This pull request adds untilTag as a parameter for the read, readTag, and readFile functions so that the user can choose to ignore the rest of a DICOM file. A boolean flag includeUntilTagValue has also been added that returns the values of the given untilTag before ignoring the rest of the DICOM file.

PR has successfully run npm test and npm run build.

Related PR/Issues:

134

149

181

whatwilliam commented 3 years ago

@pieper

pieper commented 3 years ago

This looks reasonable. 👍 Would you be able to add a test? You can reuse existing data and just confirm that you get the expected subsets of data for the different flag combinations.

whatwilliam commented 3 years ago

The file in the test folder test_untilTag.js shows execution time and outputs on the data.

When ignoring the untilTag by setting the includeUntilTagValue to false, having vr and values to null did not let the data be turned into a naturalized dataset because some operations could not be done on a null value, so vr and values are returned simply as 0 when the user wants to not include the untilTag.

whatwilliam commented 3 years ago

@pieper Will these changes work?

ohif-bot commented 3 years ago

:tada: This PR is included in version 0.18.4 :tada:

The release is available on:

Your semantic-release bot :package::rocket: