Enet4 / dicom-rs

Rust implementation of the DICOM standard
https://dicom-rs.github.io
Apache License 2.0
416 stars 81 forks source link

[Fix] BOT generation for encapsulated data #399

Closed dougyau closed 1 year ago

dougyau commented 1 year ago

The BOT of the pixel data should point to the beginning of each frame. The original implementation was adding 1 extra index which was wrong as the last entry pointed to the end of the file.

dougyau commented 1 year ago

The issue was kind of tricky to spot, the generated files could be open with Weasis, Aliza, etc. DCMTK did not show any issues nor GDCM. It was cornerstone dicom-parser which failed due to this issue.

Enet4 commented 1 year ago

The issue was kind of tricky to spot, the generated files could be open with Weasis, Aliza, etc. DCMTK did not show any issues nor GDCM. It was cornerstone dicom-parser which failed due to this issue.

That is interesting. Indeed, any parser relying uniquely on the basic offset table to identify the number of frames of an image could choke on this.

In any case, thank you very much @dougyau. I will try to push a patch release soon.