Enet4 / dicom-rs

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

Change LUT to discard high bits of pixel data sample inputs #347

Closed Enet4 closed 1 year ago

Enet4 commented 1 year ago

This PR changes the behavior of Lut::get to discard any bits in the input which go beyond the LUT's allocated capacity (via bits_stored), thus making it no longer panic and seamlessly enabling pixeldata to convert 9-bit to 15-bit images filling in the highest bits of pixel data sample values.

Resolves #346.