Fix logic error resulting in all ultrasounds being classed as multi-frame

This commit is contained in:
RunasSudo 2023-11-23 21:32:21 +11:00
parent 33e7a64135
commit d24fbd0503
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A

View File

@ -41,7 +41,7 @@ def ev_files_to_dcm_file(study_uid, series_uid, series_number, image_number, inp
file_meta = FileMetaDataset()
if metadata['metadata']['modality'] == 'US':
if len(pixel_datas) == 0:
if len(pixel_datas) == 1:
file_meta.MediaStorageSOPClassUID = '1.2.840.10008.5.1.4.1.1.6.1' # Ultrasound Image Storage
else:
file_meta.MediaStorageSOPClassUID = '1.2.840.10008.5.1.4.1.1.3.1' # Ultrasound Multi-frame Image Storage