-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access CZI "attachments" (i.e. slide label image, slide / tissue preview, etc.) #38
Comments
Hi all, currently the functionality of redaing attachments & timestamps is not supported from pylibCZIrw. The typical workaround is to use other existing libraries like czifile or aicspylibczito read the attachments. Example (use at your own risk) can be found here: https://github.com/sebi06/czitools/blob/main/demo/scripts/read_attachment_images.py (very similar appaoch to what @alexbaras posted above) https://github.com/sebi06/czitools/blob/main/demo/notebooks/read_czi_metadata.ipynb But I will add you feature request to our backlog. |
Thank you @sebi06 . |
From my perspective the pylibczirw module is one of the only modules that allows for writing czi files. As such, I think it would be important to enable both reading and writing of czi files to include various associated images like slide label and slide / tissue preview.
For now I use czifile for access to the "attachments". I've posted that code example below. I suspect this example and the czifile module code base could be put together to achieve the desired effect.
-Alex
get czi attachments
with czifile.CziFile(czi_files[i_file]) as czi:
# get attachment objects
attachments = {a.attachment_entry.name: {'obj': a} for a in czi.attachments()}
The text was updated successfully, but these errors were encountered: