Feature #1014
closedSilently remove illegal zero pad bytes when dcmEnableAutomaticInputDataCorrection is activated​
100%
Description
The DICOM parser in dcmdata has a global setting named "dcmEnableAutomaticInputDataCorrection" that enables a few silent data corrections when reading DICOM files, such as replacing incorrect space paddings at the end of a UID, or removing padding characters from other text fields. The parser does not, however, silently fix illegal zero bytes used as pad bytes, as can be seen in the attached (anonymized) example file.
It should be trivial for all classes derived from DcmByteString to silently remove such trailing zero bytes, just as if they were space characters.
Things would be more complicated for DcmCharString, where trailing zero bytes might actually be part of a multi-byte character when a multi-byte character set other than UTF-8 is active.
In any case, it would be desirable to provide an automatic data correction of illegal zero bytes when dcmEnableAutomaticInputDataCorrection is on.
Files