Working on a CZI Zeiss microscopy image stack reader for 3D slicer, any help or advice welcome

EgorZindy
Tue, 25 Jul 2023 01:01:12 +0000
Development

Some general info:

Operating system: Windows 10
Slicer version: 5.3.0 - 2023.06.17
Expected behavior: 3D stack(s) imported from a CZI scene with minimum hassle for the user…
Actual behavior: Work in progress, 3D view requires manual adjustments, not fully integrated with Slicer yet.

Hello,

this is my first post here, I am trying to import a multichannel CZI confocal stack into 3D slicer, and found some Python code on GitHub for a napari reader, which I am repurposing for Slicer.

I’m still very far from having a working reader, but the code I have put together is showing some promise:

As I’m not quite sure what I’m able to attach to my first post, here is the code in its entirety:
Click to expand code (czireader.py) (click for more details)
So, as you can see, I’m still struggling with really basic things such as:

reading colors for each channel in the CZI file, and setting them for each of the imported volumes

maybe some kind of GUI interface for the user to select which scene to import (there may be multiple scenes and timepoints, not sure how to handle those nicely yet)

units: The code I lifted from @jwindhager conveniently provides a pixel size in microns, but they’re set as mm in Slicer (check whether the units are always mm or if it is possible to set the units)

Follow the help provided in the Slicer help to turn the code into a reader plugin

A few manual operations required to actually display the volume, maybe I can set more things in the reader to avoid the manual steps.

How big can the images be? For now I’m not sure…

RGB images? For now I’m only interested in confocal stacks, but maybe histology slides could also be handled through a potential future reader. For now I’m not going to worry too much about this.

And what would be the end goal?

After I finish writing this plugin, the two main image processing tasks I will need to perform are:

3-D registration of multiple acquired stacks using the DAPI nuclei as landmarks

Segmentation of each cell in 3-D if possible (cellpose?)

And in terms of data output:

Size / shape of cells and

Mean intensity in all the different channels (up to 6) for each cell.

That’s it, thank you for reading and any advice you might have will be greatly appreciated!

Kind regards,
Egor

12 posts - 4 participants