Support PX modality

This commit is contained in:
RunasSudo 2024-06-01 18:19:57 +10:00
parent a5282c0aa5
commit 2f76ace0b7
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A

View File

@ -1,5 +1,5 @@
# ev-to-dicom # ev-to-dicom
# Copyright © 2023 Lee Yingtong Li # Copyright © 2023–2024 Lee Yingtong Li
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by # it under the terms of the GNU Affero General Public License as published by
@ -45,6 +45,8 @@ def ev_files_to_dcm_file(study_uid, series_uid, series_number, image_number, inp
file_meta.MediaStorageSOPClassUID = '1.2.840.10008.5.1.4.1.1.6.1' # Ultrasound Image Storage file_meta.MediaStorageSOPClassUID = '1.2.840.10008.5.1.4.1.1.6.1' # Ultrasound Image Storage
else: else:
file_meta.MediaStorageSOPClassUID = '1.2.840.10008.5.1.4.1.1.3.1' # Ultrasound Multi-frame Image Storage file_meta.MediaStorageSOPClassUID = '1.2.840.10008.5.1.4.1.1.3.1' # Ultrasound Multi-frame Image Storage
elif metadata['metadata']['modality'] == 'PX':
file_meta.MediaStorageSOPClassUID = '1.2.840.10008.5.1.4.1.1.1.1' # Digital X-Ray Image Storage - For Presentation
else: else:
raise Exception('Unknown modality {}'.format(metadata['metadata']['modality'])) raise Exception('Unknown modality {}'.format(metadata['metadata']['modality']))