Enum dicom_parser::dataset::read::ValueReadStrategy
source · pub enum ValueReadStrategy {
Interpreted,
Preserved,
Raw,
}Expand description
The value reading strategy for the data set reader.
It defines how the PrimitiveValues in value tokens are constructed.
Variants§
Interpreted
Textual values will be decoded according to their value representation.
Word-sized binary values are read according to the expected byte order. Dates, times, and date-times (DA, DT, TM) are parsed into their more specific variants, leading to parser failure if they are not valid DICOM. String numbers (IS, FD) are also converted into binary representations. For the case of floats, this may introduce precision errors.
Preserved
Values will be stored without decoding dates or textual numbers.
Word-sized binary values are read according to the expected byte order. Date-time values and numbers are kept in their original string representation as string objects. All text is still decoded into Rust string values, in accordance to the standard, unless its value representation is unknown to the decoder.
Raw
All primitive values are fetched as raw byte buffers, without any form of decoding or interpretation. Not even byte order conversions are made.
This strategy is not recommended, as it makes the retrieval of important textual data more difficult.
Trait Implementations§
source§impl Clone for ValueReadStrategy
impl Clone for ValueReadStrategy
source§fn clone(&self) -> ValueReadStrategy
fn clone(&self) -> ValueReadStrategy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more