pub struct StatefulDecoder<D, S, BD = BasicDecoder, TC = SpecificCharacterSet> { /* private fields */ }
Expand description

A stateful abstraction for the full DICOM content reading process. This type encapsulates the necessary codecs in order to be as autonomous as possible in the DICOM content reading process. S is the generic parameter type for the original source, D is the parameter type that the decoder interprets as, whereas DB is the parameter type for the basic decoder. TC defines the text codec used underneath.

Implementations§

Create a new DICOM parser for the given transfer syntax, character set, and assumed position of the reader source.

Create a new DICOM parser for the given transfer syntax and assumed position of the reader source.

The default character set is assumed until a Specific Character Set attribute is found.

Create a new DICOM stateful decoder for reading the file meta header, which is always in Explicit VR Little Endian.

Create a new DICOM stateful decoder from its parts.

Create a new DICOM stateful decoder from its parts, while assuming a base reading position.

position should be calculatd with care. Decoding or parsing errors may occur if this position does not match the real position of the reader.

Create a new DICOM stateful decoder from its parts, while determining the data source’s current position via seek.

Trait Implementations§

Formats the value using the given formatter. Read more
Same as Decode::decode_header over the bound source.
Same as Decode::decode_item_header over the bound source.
Eagerly read the following data in the source as a primitive data value. When reading values in text form, a conversion to a more maleable type is attempted. Namely, numbers in text form (IS, DS) are converted to the corresponding binary number types, and date/time instances are decoded into binary date/time objects of types defined in the chrono crate. To avoid this conversion, see read_value_preserved. Read more
Eagerly read the following data in the source as a primitive data value. Unlike read_value, this method will preserve the DICOM value’s original format: numbers saved as text, as well as dates and times, are read as strings. Read more
Eagerly read the following data in the source as a primitive data value as bytes, regardless of its value representation. Read more
Retrieve the known position of the inner reader source. If the stateful decoder was constructed at the beginning of the reader, this equals to the number of bytes read so far. Read more
Read the following number of bytes into a vector.
Read the following number of bytes as a sequence of unsigned 32 bit integers into a vector. Read more
Read the following number of bytes into a generic writer.
Skip the following bytes into a vector, counting them as if they were read. Read more
Reposition the reader so that it starts reading at the reader’s given position. Read more

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

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. 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.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more