Allow signed as synonym for metadata isSigned
This commit is contained in:
parent
f09376c06e
commit
1af98b893c
@ -1,5 +1,5 @@
|
||||
# ev-to-dicom
|
||||
# Copyright © 2023–2024 Lee Yingtong Li
|
||||
# Copyright © 2023–2025 Lee Yingtong Li
|
||||
#
|
||||
# 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
|
||||
@ -86,7 +86,10 @@ def ev_files_to_dcm_file(study_uid, series_uid, series_number, image_number, inp
|
||||
ds.InstitutionName = metadata['metadata']['institutionName']
|
||||
ds.PatientAge = metadata['metadata']['patientAge']
|
||||
ds.SamplesPerPixel = 3 if metadata['color'] else 1
|
||||
ds.PixelRepresentation = 1 if metadata['isSigned'] else 0
|
||||
if 'isSigned' in metadata:
|
||||
ds.PixelRepresentation = 1 if metadata['isSigned'] else 0
|
||||
else:
|
||||
ds.PixelRepresentation = 1 if metadata['signed'] else 0
|
||||
#ds.BitsAllocated = metadata['bytesPerSample'] * 8 # Incorrect value!
|
||||
#ds.BitsStored = metadata['bytesPerSample'] * 8
|
||||
ds.Columns = metadata['columns']
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user