Enet4 / dicom-rs

Rust implementation of the DICOM standard
https://dicom-rs.github.io
Apache License 2.0
414 stars 82 forks source link

[parser] force encoding DS and IS values as text #314

Closed Enet4 closed 1 year ago

Enet4 commented 1 year ago

This PR changes the logic of value encoding for better DICOM conformance. If the value representation of an element is set to decimal string (DS) or integer string (IS), numeric primitive values are automatically converted into their textual form when writing them to bytes or to a file.

Also extended test for coverage at dicom_object.