pydicom.filereader.read_deferred_data_element¶
- pydicom.filereader.read_deferred_data_element(fileobj_type: Any, filename_or_obj: str | bytes | PathLike | BinaryIO, timestamp: float | None, raw_data_elem: RawDataElement) RawDataElement [source]¶
Read the previously deferred value from the file into memory and return a raw data element.
- Parameters:
fileobj_type (type) – The type of the original file object.
filename_or_obj (str or file-like) – The filename of the original file if one exists, or the file-like object where the data element persists.
timestamp (float or None) – The time (as given by stat.st_mtime) the original file has been read, if not a file-like.
raw_data_elem (dataelem.RawDataElement) – The raw data element with no value set.
- Returns:
The data element with the value set.
- Return type:
- Raises:
OSError – If filename_or_obj is
None
.OSError – If filename_or_obj is a filename and the corresponding file does not exist.
ValueError – If the VR or tag of raw_data_elem does not match the read value.