What is format preservation, and how can I disable it? #401
-
I see here that some element values are represented as dicom-rs/core/src/value/primitive.rs Lines 226 to 230 in 41e87f3 How can I read a DICOM file without format preservation? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I see that it's related to dicom-rs/parser/src/dataset/read.rs Lines 89 to 124 in 41e87f3 Is there any way I can pass a strategy to |
Beta Was this translation helpful? Give feedback.
-
Yes, "format preservation" refers to the parser's value reading strategy that preserves textual values (numbers and dates) as strings. It is currently only available as an option in the It would be great if you could share the use case for changing the value reading strategy. It is generally sufficient to use one of the various |
Beta Was this translation helpful? Give feedback.
Yes, "format preservation" refers to the parser's value reading strategy that preserves textual values (numbers and dates) as strings. It is currently only available as an option in the
dicom_parser
data set reader API, as the use of any other strategy in the object API could bring other issues in the loading process. Namely, the strategy that reads everything as bytes has never really been tried here, and the strategy to convert textual numbers and dates would often choke on non-compliant or unsupported DICOM data.It would be great if you could share the use case for changing the value reading strategy. It is generally sufficient to use one of the various
to_*
methods in the DICOM value…