This commit is contained in:
Ross
2021-11-21 11:16:55 +00:00
parent 5397e3a453
commit 3ebe6a8b99
+1 -1
View File
@@ -459,7 +459,7 @@ class RapidImage(models.Model):
try:
# and generate a hash from the pixel data
dataset = pydicom.dcmread(self.image)
hash = hashlib.md5(",".join(dataset.pixel_array.tostring())).hexdigest()
hash = hashlib.md5(",".join(str(dataset.pixel_array.tostring()))).hexdigest()
self.is_dicom = True
except pydicom.errors.InvalidDicomError:
self.image.file.open()