Closed mike-kfed closed 2 years ago
Thank you for reporting. Indeed, I managed to reproduce these issues just now. Will try to build a patch soon.
It's also true that to_ndarray
should document its default behavior, this was probably overlooked (although this is mentioned in a few other places).
wow, thanks for the fast response! looking forward to the new release
Hi, I just found that calling
DecodedPixelData::to_vec()
doesn't give me real u16 values when the resolution is 16bit. The reason is that a LUT is applied by default, and this LUT seems to be done for 8bit only even though there is a separate 16bit match-arm:https://docs.rs/dicom-pixeldata/0.1.0/src/dicom_pixeldata/lib.rs.html#1174
since
to_ndarray()
callsto_vec()
same problem applies. plus the docs of to_ndarray() do not mention that the LUT is applied by default.my current workaround: use options to disable the LUT, pseudocode: