dcmjs-org / dcmjs

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

Encapsulated pixel data of odd-length writes padding byte in incorrect location #293

Closed richard-viney closed 2 years ago

richard-viney commented 2 years ago

A padding byte for odd-length encapsulated binary data is currently being written at the end of writing the OB tag, but padding bytes need to be written for each frame, not the whole tag. That is, the last fragment for each frame should get a padding byte if that frame's data is of uneven length. This is the behaviour of pydicom.

Will open a PR containing a fix and test shortly.

richard-viney commented 2 years ago

A PR has been opened that fixes this issue and adds a unit test for the OB tag writing.

github-actions[bot] commented 2 years ago

:tada: This issue has been resolved in version 0.24.6 :tada:

The release is available on:

Your semantic-release bot :package::rocket: