improve dicom uploading
This commit is contained in:
+4
-2
@@ -155,8 +155,10 @@ def print_dicom(dataset, indent=0):
|
||||
repr_value))
|
||||
return "\n<br/>".join(l)
|
||||
|
||||
def get_image_dicom_hash(img) -> (str, bool):
|
||||
dataset = pydicom.dcmread(img)
|
||||
def get_image_dicom_hash(img, dataset=None) -> (str, bool):
|
||||
if dataset is None:
|
||||
dataset = pydicom.dcmread(img)
|
||||
|
||||
md5 = hashlib.md5()
|
||||
first = True
|
||||
for i in dataset.pixel_array.astype(str).flatten():
|
||||
|
||||
Reference in New Issue
Block a user