.
This commit is contained in:
+1
-1
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user