Skip to content

Commit

Permalink
fix: force load DICOM file to handle non-standard files
Browse files Browse the repository at this point in the history
  • Loading branch information
ziqiangxu authored Jun 19, 2024
1 parent 39dc8a7 commit e97e664
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dicomweb_client/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -1016,10 +1016,10 @@ def _http_get_multipart_application_dicom(
'"application/dicom"'
)
warn(warning_message, category=UserWarning)
part = pydicom.dcmread(BytesIO(response.content))
part = pydicom.dcmread(BytesIO(response.content), force=True)
return iter([part])
return (
pydicom.dcmread(BytesIO(part))
pydicom.dcmread(BytesIO(part), force=True)
for part in self._decode_multipart_message(response, stream=stream)
)

Expand Down

0 comments on commit e97e664

Please sign in to comment.