From 281023e9a741247de202319dbb06797ea2893a4d Mon Sep 17 00:00:00 2001 From: Ross Date: Sun, 21 Nov 2021 19:54:09 +0000 Subject: [PATCH] . --- rapids/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rapids/models.py b/rapids/models.py index 1457cf96..015370c1 100644 --- a/rapids/models.py +++ b/rapids/models.py @@ -459,7 +459,10 @@ class RapidImage(models.Model): try: # and generate a hash from the pixel data dataset = pydicom.dcmread(self.image) - hash = hashlib.md5(",".join([str(i) for i in list(dataset.pixel_array.flatten())]).encode()).hexdigest() + print(dataset) + pre_join = [str(i) for i in list(dataset.pixel_array.flatten())] + print(pre_join) + hash = hashlib.md5(",".join(pre_join).encode()).hexdigest() self.is_dicom = True except pydicom.errors.InvalidDicomError: