diff --git a/generic/models.py b/generic/models.py index 05aac5a7..6bcca0f0 100644 --- a/generic/models.py +++ b/generic/models.py @@ -241,6 +241,7 @@ class SeriesImageBase(models.Model): def save(self, *args, **kwargs): """Override save method to add image hash""" if self.image: + print(self.pk, self.image) if not self.image_md5_hash: image_hash, is_dicom = get_image_hash(self.image, hash_type="md5", direct_pixel_data=False) diff --git a/helpers/images.py b/helpers/images.py index df21e232..216f11f4 100644 --- a/helpers/images.py +++ b/helpers/images.py @@ -192,7 +192,7 @@ def get_image_hash(img, hash_type="blake3", direct_pixel_data=True) -> (str, boo # ---- except pydicom.errors.InvalidDicomError as e: - print("dicom error") + print("dicom error", img) try: # This is horrible (but needed for current unit tests) # (we use a temporary file that breaks here) img.file.open()