Closed delton137 closed 1 year ago
Thanks @delton137 ! I had a quick look and I think this is a simple fix. Can you try the branch in #211 and see whether that fixes the issue?
For now, the best solution is probably to manually specify the voi_lut_transformations
, as you suggest.
Why would these attributes have a multiplicity greater than one?
Why would these attributes have a multiplicity greater than one?
It's not uncommon for an image to have multiple WW/WC values in the header. They could be soft tissue and lung windows for example.
C.11.2.1.2.2, with reference to WindowCenter and WindowWidth:
If multiple values are present, both Attributes shall have the same number of values and shall be considered as pairs. Multiple values indicate that multiple alternative views may be presented.
I just tested @CPBridge's fix (#211) and it works! Yes, it seems multiple window settings may be saved in the DICOM.
When I go to create a GSPS using hd.pr.GrayscaleSoftcopyPresentationState() I get an error for certain DICOM where WindowWidth and WindowCenter are not floats in the reference DICOM.
Here's the error I get:
I fixed it using the following code:
This fix worked for two offending DICOM, but there is one more where I'm still getting the error. To get rid of the error there, I created the GSPS with my own windowing settings (using the argument voi_lut_transformations=[SoftcopyVOILUTObject]).