.
This commit is contained in:
+1
-1
@@ -457,7 +457,7 @@ class RapidImage(models.Model):
|
|||||||
if self.image:
|
if self.image:
|
||||||
# Try and read the file as a dicom
|
# Try and read the file as a dicom
|
||||||
try:
|
try:
|
||||||
hash = ",".join(pydicom.dcmread(self.image).pixel_array.to())
|
hash = ",".join(pydicom.dcmread(self.image.path).pixel_array.to())
|
||||||
self.is_dicom = True
|
self.is_dicom = True
|
||||||
except pydicom.errors.InvalidDicomError:
|
except pydicom.errors.InvalidDicomError:
|
||||||
with self.image.open("r") as f:
|
with self.image.open("r") as f:
|
||||||
|
|||||||
Reference in New Issue
Block a user