Closed nlessmann closed 2 years ago
I used this code to convert a few scans for Kicky and got overflow warnings, even though everything worked as expected:
Weirdly enough, the overflow warnings are not always there:
But I figured that we are expecting overflows and that they are fine, so we can better suppress these warnings.
Small fix for a practical issue that Kicky discovered: the pixel values of images with MONOCHROME1 header are now inverted but if they also have window/level headers, the window level also needs to be inverted to match the new pixel values - otherwise it can end up far outside of the range of pixel values and the entire image is white or black in the viewer when using the automatic window/level setting.