Skip to content

Commit ef35591

Browse files
committed
adds stop_before_pixels when reading DICOM metadata
1 parent d4ba3c1 commit ef35591

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

extras/fileformats/extras/application/medical.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ def dicom_read_metadata(
2626
metadata_keys: ty.Optional[TagListType] = None,
2727
**kwargs: ty.Any,
2828
) -> ty.Mapping[str, ty.Any]:
29-
dcm = pydicom.dcmread(dicom.fspath, specific_tags=metadata_keys)
29+
dcm = pydicom.dcmread(
30+
dicom.fspath, specific_tags=metadata_keys, stop_before_pixels=True
31+
)
3032
return Dicom.pydicom_to_dict(dcm)
3133

3234

0 commit comments

Comments
 (0)