From 39b9706856c3f95ecbbac0bdaaca52517480b369 Mon Sep 17 00:00:00 2001 From: Ross Date: Sun, 21 Nov 2021 11:14:43 +0000 Subject: [PATCH] . --- rapids/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rapids/models.py b/rapids/models.py index 438eb433..b8873759 100644 --- a/rapids/models.py +++ b/rapids/models.py @@ -458,7 +458,7 @@ class RapidImage(models.Model): # Try and read the file as a dicom try: # and generate a hash from the pixel data - hash = ",".join(pydicom.dcmread(self.image.path).pixel_array.tostring()) + hash = hashlib.md5(",".join(pydicom.dcmread(self.image.path).pixel_array.tostring())).hexdigest() self.is_dicom = True except pydicom.errors.InvalidDicomError: self.image.file.open()