[−][src]Trait dicom_encoding::decode::Decode
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 transfer syntax.
Associated Types
Loading content...Required methods
fn decode_header(&self, source: &mut Self::Source) -> 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.
- Decoding an item or sequence delimiter is considered valid, and so should be properly handled
- by the decoder. The value representation in this case should be
UN
.
fn decode_item_header(
&self,
source: &mut Self::Source
) -> Result<SequenceItemHeader>
&self,
source: &mut Self::Source
) -> Result<SequenceItemHeader>
Fetch and decode the next sequence item head from the given source. It is a separate method
- because value representation is always implicit when reading item headers and delimiters.
- 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 decode_tag(&self, source: &mut Self::Source) -> Result<Tag>
Decode a DICOM attribute tag from the given source.
Implementations on Foreign Types
impl<T: ?Sized> Decode for Box<T> where
T: Decode,
[src]
T: Decode,
type Source = <T as Decode>::Source
fn decode_header(&self, source: &mut Self::Source) -> Result<DataElementHeader>
[src]
fn decode_item_header(
&self,
source: &mut Self::Source
) -> Result<SequenceItemHeader>
[src]
&self,
source: &mut Self::Source
) -> Result<SequenceItemHeader>
fn decode_tag(&self, source: &mut Self::Source) -> Result<Tag>
[src]
impl<'a, T: ?Sized> Decode for &'a T where
T: Decode,
[src]
T: Decode,
type Source = <T as Decode>::Source
fn decode_header(&self, source: &mut Self::Source) -> Result<DataElementHeader>
[src]
fn decode_item_header(
&self,
source: &mut Self::Source
) -> Result<SequenceItemHeader>
[src]
&self,
source: &mut Self::Source
) -> Result<SequenceItemHeader>
fn decode_tag(&self, source: &mut Self::Source) -> Result<Tag>
[src]
Implementors
impl<'d, S: ?Sized, D> Decode for ImplicitVRLittleEndianDecoder<S, D> where
S: Read,
D: DataDictionary,
[src]
S: Read,
D: DataDictionary,
type Source = S
fn decode_header(&self, source: &mut S) -> Result<DataElementHeader>
[src]
fn decode_item_header(&self, source: &mut S) -> Result<SequenceItemHeader>
[src]
fn decode_tag(&self, source: &mut S) -> Result<Tag>
[src]
impl<S: ?Sized> Decode for ExplicitVRBigEndianDecoder<S> where
S: Read,
[src]
S: Read,
type Source = S
fn decode_header(&self, source: &mut Self::Source) -> Result<DataElementHeader>
[src]
fn decode_item_header(
&self,
source: &mut Self::Source
) -> Result<SequenceItemHeader>
[src]
&self,
source: &mut Self::Source
) -> Result<SequenceItemHeader>
fn decode_tag(&self, source: &mut Self::Source) -> Result<Tag>
[src]
impl<S: ?Sized> Decode for ExplicitVRLittleEndianDecoder<S> where
S: Read,
[src]
S: Read,