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.
Trait Implementations§
Source§impl From<DataElementHeader> for DataToken
impl From<DataElementHeader> for DataToken
Source§fn from(header: DataElementHeader) -> Self
fn from(header: DataElementHeader) -> Self
Auto Trait Implementations§
impl Freeze for DataToken
impl RefUnwindSafe for DataToken
impl Send for DataToken
impl Sync for DataToken
impl Unpin for DataToken
impl UnwindSafe for DataToken
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more