.
This commit is contained in:
@@ -460,7 +460,6 @@ class RapidImage(models.Model):
|
|||||||
# and generate a hash from the pixel data
|
# and generate a hash from the pixel data
|
||||||
# TODO: improve?
|
# TODO: improve?
|
||||||
dataset = pydicom.dcmread(self.image)
|
dataset = pydicom.dcmread(self.image)
|
||||||
print(dataset)
|
|
||||||
#flatten = dataset.pixel_array.astype(str).flatten()
|
#flatten = dataset.pixel_array.astype(str).flatten()
|
||||||
#print("flatteded")
|
#print("flatteded")
|
||||||
#pre_join = ",".join(flatten)
|
#pre_join = ",".join(flatten)
|
||||||
@@ -475,12 +474,10 @@ class RapidImage(models.Model):
|
|||||||
md5.update(f"{i}".encode())
|
md5.update(f"{i}".encode())
|
||||||
else:
|
else:
|
||||||
md5.update(f",{i}".encode())
|
md5.update(f",{i}".encode())
|
||||||
print(0)
|
|
||||||
|
|
||||||
hash = md5.hexdigest()
|
hash = md5.hexdigest()
|
||||||
#----
|
#----
|
||||||
|
|
||||||
print(1)
|
|
||||||
|
|
||||||
self.is_dicom = True
|
self.is_dicom = True
|
||||||
except pydicom.errors.InvalidDicomError:
|
except pydicom.errors.InvalidDicomError:
|
||||||
|
|||||||
Reference in New Issue
Block a user