[−][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.
Required methods
fn decode_header<S: ?Sized>(
&self,
source: &mut S
) -> Result<(DataElementHeader, usize)> where
S: Read,
&self,
source: &mut S
) -> Result<(DataElementHeader, usize)> where
S: Read,
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
. - Returns the expected header and the exact number of bytes read from the source.
fn decode_item_header<S: ?Sized>(
&self,
source: &mut S
) -> Result<SequenceItemHeader> where
S: Read,
&self,
source: &mut S
) -> Result<SequenceItemHeader> where
S: Read,
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<S: ?Sized>(&self, source: &mut S) -> Result<Tag> where
S: Read,
S: Read,
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,
fn decode_header<S: ?Sized>(
&self,
source: &mut S
) -> Result<(DataElementHeader, usize)> where
S: Read,
[src]
&self,
source: &mut S
) -> Result<(DataElementHeader, usize)> where
S: Read,
fn decode_item_header<S: ?Sized>(
&self,
source: &mut S
) -> Result<SequenceItemHeader> where
S: Read,
[src]
&self,
source: &mut S
) -> Result<SequenceItemHeader> where
S: Read,
fn decode_tag<S: ?Sized>(&self, source: &mut S) -> Result<Tag> where
S: Read,
[src]
S: Read,
impl<'a, T: ?Sized> Decode for &'a T where
T: Decode,
[src]
T: Decode,
fn decode_header<S: ?Sized>(
&self,
source: &mut S
) -> Result<(DataElementHeader, usize)> where
S: Read,
[src]
&self,
source: &mut S
) -> Result<(DataElementHeader, usize)> where
S: Read,
fn decode_item_header<S: ?Sized>(
&self,
source: &mut S
) -> Result<SequenceItemHeader> where
S: Read,
[src]
&self,
source: &mut S
) -> Result<SequenceItemHeader> where
S: Read,
fn decode_tag<S: ?Sized>(&self, source: &mut S) -> Result<Tag> where
S: Read,
[src]
S: Read,
Implementors
impl Decode for ExplicitVRBigEndianDecoder
[src]
fn decode_header<S: ?Sized>(
&self,
source: &mut S
) -> Result<(DataElementHeader, usize)> where
S: Read,
[src]
&self,
source: &mut S
) -> Result<(DataElementHeader, usize)> where
S: Read,
fn decode_item_header<S: ?Sized>(
&self,
source: &mut S
) -> Result<SequenceItemHeader> where
S: Read,
[src]
&self,
source: &mut S
) -> Result<SequenceItemHeader> where
S: Read,
fn decode_tag<S: ?Sized>(&self, source: &mut S) -> Result<Tag> where
S: Read,
[src]
S: Read,
impl Decode for ExplicitVRLittleEndianDecoder
[src]
fn decode_header<S: ?Sized>(
&self,
source: &mut S
) -> Result<(DataElementHeader, usize)> where
S: Read,
[src]
&self,
source: &mut S
) -> Result<(DataElementHeader, usize)> where
S: Read,
fn decode_item_header<S: ?Sized>(
&self,
source: &mut S
) -> Result<SequenceItemHeader> where
S: Read,
[src]
&self,
source: &mut S
) -> Result<SequenceItemHeader> where
S: Read,
fn decode_tag<S: ?Sized>(&self, source: &mut S) -> Result<Tag> where
S: Read,
[src]
S: Read,
impl<D> Decode for ImplicitVRLittleEndianDecoder<D> where
D: DataDictionary,
[src]
D: DataDictionary,
fn decode_header<S: ?Sized>(
&self,
source: &mut S
) -> Result<(DataElementHeader, usize)> where
S: Read,
[src]
&self,
source: &mut S
) -> Result<(DataElementHeader, usize)> where
S: Read,
fn decode_item_header<S: ?Sized>(
&self,
source: &mut S
) -> Result<SequenceItemHeader> where
S: Read,
[src]
&self,
source: &mut S
) -> Result<SequenceItemHeader> where
S: Read,
fn decode_tag<S: ?Sized>(&self, source: &mut S) -> Result<Tag> where
S: Read,
[src]
S: Read,