I came across another Write() bug today. Currently with the way VRs are checked, if an element's tag is not known (i.e., it isn't contained in our tag dict), Write() falls back to using 'UN' as the VR for the element:
This causes issues with Private Element encoded with an Explicit Transfer Syntax. Since the Private element's VR's are known, Write() should keep them in-place when re-writing a file. Instead, all Private elements are encoded with 'UN'. Which can also trigger type errors elsewhere. I originally discovered this when I got the following error when encoding Private elements:
error writing DICOM: ValueType does not match the VR required
I'm working for a PR on this that I'll post shortly.
Hello,
I came across another Write() bug today. Currently with the way VRs are checked, if an element's tag is not known (i.e., it isn't contained in our tag dict), Write() falls back to using 'UN' as the VR for the element:
This causes issues with Private Element encoded with an Explicit Transfer Syntax. Since the Private element's VR's are known, Write() should keep them in-place when re-writing a file. Instead, all Private elements are encoded with 'UN'. Which can also trigger type errors elsewhere. I originally discovered this when I got the following error when encoding Private elements:
I'm working for a PR on this that I'll post shortly.