Enum dicom_parser::dataset::DataToken[][src]

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.

Tuple Fields of ElementHeader

0: DataElementHeader
SequenceStart

The beginning of a sequence element.

Fields of SequenceStart

tag: Taglen: Length
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.

Fields of ItemStart

len: Length
ItemEnd

The ending delimiter of an item.

PrimitiveValue(PrimitiveValue)

A primitive data element value.

Tuple Fields of PrimitiveValue

0: PrimitiveValue
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.

Tuple Fields of ItemValue

0: Vec<u8>
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.

Tuple Fields of OffsetTable

0: Vec<u32>

Implementations

Check whether this token represents the start of a sequence of nested data sets.

Check whether this token represents the end of a sequence or the end of an encapsulated element.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

This implementation treats undefined lengths as equal.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.