Skip to content

Export associated images - #335

Open
cooperlab wants to merge 23 commits into
DigitalSlideArchive:mainfrom
cooperlab:main
Open

Export associated images#335
cooperlab wants to merge 23 commits into
DigitalSlideArchive:mainfrom
cooperlab:main

Conversation

@cooperlab

Copy link
Copy Markdown

This adds the option to export associated images (label, macro, and thumbnail) to the cli and api. Core facilities that offer deidentification services may require the provenance provided by the label images, and may need to review thumbnails to confirm no PHI leakage into the image pyramid. The thumbnails are also helpful to the receiver of the data to organize and sort the deidentified images.

Refactoring was done to the utilities so that associated images can be accessed from within redact.py and to eliminate other circular imports.

To discuss:
The associated images are currently deposited in an "associated" subfolder within the output folder. There is risk of PHI disclosure if these are transferred to the recipient. May need a different location, or to more clearly label which folders do/not presumably contain PHI.

@cooperlab

Copy link
Copy Markdown
Author

Typing error are being raised for the IFD argument below. I'm not clear how the original code was handling this so I was hesitant to try to fix. Everything else is passing.

imagedephi/redact/redact.py:156: error: Argument 1 to "get_image_bytes_from_ifd" has incompatible type "IFD | None"; expected "IFD" [arg-type] imagedephi/redact/redact.py:172: error: Argument 1 to "get_image_bytes_from_ifd" has incompatible type "IFD | None"; expected "IFD" [arg-type]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant