[][src]Trait dicom_encoding::decode::erased::Decode

pub trait Decode: BasicDecode {
    fn erased_decode(&self, source: &mut dyn Read) -> Result<DataElementHeader>;

    fn erased_decode_item(
        &self,
        source: &mut dyn Read
    ) -> Result<SequenceItemHeader> { ... }
fn erased_decode_tag(&self, source: &mut dyn Read) -> Result<Tag> { ... } }

Type trait for reading and decoding DICOM data elements.

  • The specific behaviour of decoding, even when abstracted from the original source,
  • may depend on the given transfer syntax.
  • This is the type-erased version of super::Decode, where the data source type is not
  • known in compile time. Users of this library should not need to rely on this level
  • directly, as the given implementations provide support for converting a generic decoder
  • to a type-erased decoder.

Required methods

fn erased_decode(&self, source: &mut dyn Read) -> Result<DataElementHeader>

Fetch and decode the next data element header from the given source.

  • This method returns only the header of the element. At the end of this operation, the source
  • will be pointing at the element's value data, which should be read or skipped as necessary.
Loading content...

Provided methods

fn erased_decode_item(
    &self,
    source: &mut dyn Read
) -> Result<SequenceItemHeader>

Fetch and decode the next sequence item head from the given source.

  • This method returns only the header of the item. At the end of this operation, the source
  • will be pointing at the beginning of the item's data, which should be traversed if necessary.

fn erased_decode_tag(&self, source: &mut dyn Read) -> Result<Tag>

Decode a DICOM attribute tag from the given source.

Loading content...

Implementors

Loading content...