aicspylibczi icon indicating copy to clipboard operation
aicspylibczi copied to clipboard

Support for CZI attachments

Open ChiliJohnson opened this issue 4 years ago • 3 comments

Is there any planned support for retrieving CZI attachments / is it within the scope of this library to provide access to CZI attachments?

Just being able to retrieve raw attachment bytes would be very helpful. After a cursory glance it appears libczi supports reading raw attachment bytes

ChiliJohnson avatar Apr 29 '20 17:04 ChiliJohnson

@heeler Would have more insight. I would assume it's probably in the scope of this package personally but wait for his response.

evamaxfield avatar Apr 30 '20 04:04 evamaxfield

I'm aware of attachments in the subblocks but I'm not entirely sure what is in them. I believe I could implement something much like the subblock metadata access and pull out attachments. I haven't seen any attachment examples in our institute. Can you explain the use case and do you have an example file you'd be willing to share? Thanks!

heeler avatar Apr 30 '20 18:04 heeler

Of course! I have some CZI slide scans produced with a Zeiss Axio Scan.Z1 which, in addition to the pixels stored in the body of the CZI, also attaches two additional images: one "preview" image of the entire slide, and one "label" image of the slide label area (where we attach barcodes). Both of these (but the preview image most of all) are useful in determining the identity of the samples which were imaged.

It appears that these attachments live in the ZISRAWATTACH segments, with the names SlidePreview, and Label, and are CZI images themselves. Here's an example image which contains both of these attachments.

I should note that this image contains other attachments in various formats that might be useful to others, but the two that I mentioned are just the two I care about for my use case.

Let me know if you'd like any more context, I'd be happy to discuss!

ChiliJohnson avatar May 02 '20 22:05 ChiliJohnson