improve dicom uploading

This commit is contained in:
Ross
2023-10-23 13:36:41 +01:00
parent c786019af1
commit 0f3bc68de6
28 changed files with 464 additions and 172 deletions
+4 -2
View File
@@ -155,8 +155,10 @@ def print_dicom(dataset, indent=0):
repr_value))
return "\n<br/>".join(l)
def get_image_dicom_hash(img) -> (str, bool):
dataset = pydicom.dcmread(img)
def get_image_dicom_hash(img, dataset=None) -> (str, bool):
if dataset is None:
dataset = pydicom.dcmread(img)
md5 = hashlib.md5()
first = True
for i in dataset.pixel_array.astype(str).flatten():