Enum dicom_parser::dataset::DataToken
source · pub enum DataToken {
ElementHeader(DataElementHeader),
SequenceStart {
tag: Tag,
len: Length,
},
PixelSequenceStart,
SequenceEnd,
ItemStart {
len: Length,
},
ItemEnd,
PrimitiveValue(PrimitiveValue),
ItemValue(Vec<u8>),
OffsetTable(Vec<u32>),
}Expand description
A token of a DICOM data set stream. This is part of the interpretation of a data set as a stream of symbols, which may either represent data headers or actual value data.
Variants§
ElementHeader(DataElementHeader)
A data header of a primitive value.
SequenceStart
The beginning of a sequence element.
PixelSequenceStart
The beginning of an encapsulated pixel data element.
SequenceEnd
The ending delimiter of a sequence or encapsulated pixel data.
ItemStart
The beginning of a new item in the sequence.
ItemEnd
The ending delimiter of an item.
PrimitiveValue(PrimitiveValue)
A primitive data element value.
ItemValue(Vec<u8>)
An owned piece of raw data representing an item’s value.
This variant is used to represent the value of an encoded fragment. It should not be used to represent nested data sets.
OffsetTable(Vec<u32>)
An owned sequence of unsigned 32 bit integers representing a pixel data offset table.
This variant is used to represent the byte offsets to the first byte of the Item tag of the first fragment for each frame in the sequence of items, as per PS 3.5, Section A.4.
Implementations§
source§impl DataToken
impl DataToken
sourcepub fn is_sequence_start(&self) -> bool
pub fn is_sequence_start(&self) -> bool
Check whether this token represents the start of a sequence of nested data sets.
sourcepub fn is_sequence_end(&self) -> bool
pub fn is_sequence_end(&self) -> bool
Check whether this token represents the end of a sequence or the end of an encapsulated element.