Closed richard-viney closed 2 years ago
This looks good, but also maybe has some edge conditions that should be tested. @Punzo would you be able to test this one too with Slim or OHIF?
@richard-viney yes, the data files should not be in the commit, but added to the data repo.
tested over OHIF and Slim on a couple of studies, no regression found
Thank you for testing @Punzo 👍
@richard-viney can you adapt the tests and force-push without the big files?
Thanks, I've switched to downloading the files in the tests. I think the URLs are right but can't confirm until the data files are available in the other repo. The two data files can be downloaded here:
https://drive.google.com/file/d/1tQFRfY9PBtOeDPuAB1ZCb9TNLlWuV8Zx/view?usp=sharing
The data is now in a release asset here: https://github.com/dcmjs-org/data/releases/tag/binary-parsing-stessors
I think you do need to tweak the URLs a bit.
URLs updated and tests pass. I think there's a typo though, "stessors" should be "stressors".
@richard-viney we seem to be modifying the same files, shall I include your changes on top of #279 or vice versa?
@Ouwen I think it's up to the maintainers, though you're right we have fixed at least one of the same bugs to do with incorrect stream offsets! I'm keen to get this PR in because it fixes failures parsing valid DICOM files, and adds more tests to that end. Do the tests added in this PR pass when run on your branch?
After looking at rebasing this after the merge of #279 a few things came up.
Please see my comment there for details: https://github.com/dcmjs-org/dcmjs/pull/279#issuecomment-1159866553
This PR now:
I've updated the PR and put the additional binary file here: https://drive.google.com/file/d/1DXM5ChyzPwf1co3gTChbk0QcP55FfqBc/view?usp=sharing
@richard-viney thanks for going through the trouble of rebasing. The tests pass for me once the binary file is placed into my test folder.
I made a minor commit which puts the start/stop as an kwarg instead of arg. This way future options like Uint8 view only can live easy without cluttering the public API.
https://github.com/HeartLab/dcmjs/pull/2/commits/aea9c6fb312558d008b414a848b10395e51143f4
@Ouwen Thanks I've put that change onto this PR, and also done some other refactoring in BinaryRepresentation.readBytes()
to simplify the code a bit further.
Tests are all passing (once the binary-tag.dcm file is in the data repo)
I think we're OK to merge then?
@richard-viney if possible could we keep the .map
for frame/fragment parsing? The reason is that there are some advantages to treating frame parsing as a parallel map operation vs explicit for-loop.
For these new changes, would you kindly separate out the new commit changes on top of your previous PR commit for easier review? Referencing the previous commit history here: https://github.com/ouwen/dcmjs/tree/heart
Sure thing, I'll submit those further changes on a separate PR and we can discuss there. Have updated this PR accordingly. Thanks.
@richard-viney many thanks for going through the trouble. This looks good to me for merge
URLs updated and tests pass. I think there's a typo though, "stessors" should be "stressors".
Thanks, I fixed the typo, they are now here: https://github.com/dcmjs-org/data/releases/tag/binary-parsing-stessors
This release is also ready now.
https://github.com/dcmjs-org/data/releases/tag/binary-tag
@richard-viney I think if you just update the stessor/stressor url it should be good to go. It looks like I don't have permission to edit your PR code.
I've updated this PR to fix the stessors typo, but the correct release link to the data isn't working, i.e. the URL still needs the typo in it to work, not sure renaming the release was sufficient?
Good catch - I had renamed the release but it turns out I also needed to rename the tags. Can you try again?
Tests passed 🎉
:tada: This PR is included in version 0.24.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Have run into a few bugs in the binary tag parsing on some DICOMs, and this PR contains fixes and test cases for those issues.
The two included DCM files are 13MB and 3MB - should these be hosted on GitHub releases like the other data is?
Details: