pub fn from_reader_with_dict<S>(src: S, dict: D) -> Result<Self>
    where
        S: Read,
    {
        let mut file = BufReader::new(src);

        // read metadata header
        let meta = FileMetaTable::from_reader(&mut file)?;

        // read rest of data according to metadata, feed it to object
        let ts = get_registry()
            .get(&meta.transfer_syntax)
            .ok_or(Error::UnsupportedTransferSyntax)?;
        let cs = SpecificCharacterSet::Default;
        let mut dataset = DataSetReader::new_with_dictionary(file, dict.clone(), ts, cs)?;
        Ok(RootDicomObject {
            meta,
            obj: InMemDicomObject::build_object(&mut dataset, dict, false, Length::UNDEFINED)?,
        })
    }
/// Create a DICOM object by reading from a byte source.
///
/// This function assumes the standard file encoding structure without the
/// preamble: file meta group, followed by the rest of the data set.
Create a DICOM object by reading from a byte source.
This function assumes the standard file encoding structure without the
preamble: file meta group, followed by the rest of the data set.
Create a DICOM object by reading from a byte source . This function assumes the standard file encoding structure without the preamble : file meta group followed by the rest of the data set .
pub fn from_reader_with_dict<S>(src: S, dict: D) -> Result<Self>
    where
        S: Read,
    {
        let mut file = BufReader::new(src);
        // read metadata header
        let meta = FileMetaTable::from_reader(&mut file)?;
        // read rest of data according to metadata, feed it to object
        let ts = get_registry()
            .get(&meta.transfer_syntax)
            .ok_or(Error::UnsupportedTransferSyntax)?;
        let cs = SpecificCharacterSet::Default;
        let mut dataset = DataSetReader::new_with_dictionary(file, dict.clone(), ts, cs)?;
        Ok(RootDicomObject {
            meta,
            obj: InMemDicomObject::build_object(&mut dataset, dict, false, Length::UNDEFINED)?,
        })
    }
pub fn from_reader_with_dict < S > ( src : S , dict : D ) -> Result < Self > where S : Read , { let mut file = BufReader :: new ( src ) ; // read metadata header let meta = FileMetaTable :: from_reader ( & mut file ) ? ; // read rest of data according to metadata, feed it to object let ts = get_registry ( ) . get ( & meta . transfer_syntax ) . ok_or ( Error :: UnsupportedTransferSyntax ) ? ; let cs = SpecificCharacterSet :: Default ; let mut dataset = DataSetReader :: new_with_dictionary ( file , dict . clone ( ) , ts , cs ) ? ; Ok ( RootDicomObject { meta , obj : InMemDicomObject :: build_object ( & mut dataset , dict , false , Length :: UNDEFINED ) ? , } ) }
Create a DICOM object by reading from a byte source.
Create a DICOM object by reading from a byte source .
src
S
dict
D
src
S
dict
D