kirbyju / TCIA_Notebooks

Notebooks for working with The Cancer Imaging Archive datasets. Have you written one? Submit a PR!
https://cancerimagingarchive.net
Apache License 2.0
91 stars 23 forks source link

TCIA_Image_Visualization_with_itkWidgets.ipynb #30

Closed kirbyju closed 1 month ago

kirbyju commented 1 month ago

Hi @thewtex @bnmajor ,

In https://github.com/kirbyju/TCIA_Notebooks/blob/main/TCIA_Image_Visualization_with_itkWidgets.ipynb, once reaching this step in Google Colab:

from itkwidgets import view

The following error occurs:

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
[<ipython-input-10-7ede38f9bd2c>](https://localhost:8080/#) in <cell line: 4>()
      2 #   The view() function opens an interactive viewer for 2D and 3D
      3 #   data in a variety of formats.
----> 4 from itkwidgets import view

4 frames
[/usr/local/lib/python3.10/dist-packages/ngff_zarr/from_ngff_zarr.py](https://localhost:8080/#) in <module>
      5 import dask.array
      6 import zarr
----> 7 from zarr.storage import BaseStore
      8 
      9 from .ngff_image import NgffImage

ModuleNotFoundError: No module named 'zarr.storage'
kirbyju commented 1 month ago

Same issue in https://github.com/kirbyju/TCIA_Notebooks/blob/main/TCIA_MONAI_Model_Zoo.ipynb. I'm a bit conflicted about whether to keep maintaining this one in my repo. There is a nearly identical notebook at https://github.com/Project-MONAI/tutorials/blob/main/model_zoo/TCIA_PROSTATEx_Prostate_MRI_Anatomy_Model.ipynb. Perhaps it's better to just update that one and delete mine to reduce maintenance and potential confusion? I could cross link to the MONAI notebook from https://github.com/kirbyju/TCIA_Notebooks/blob/main/README.md to ensure people coming here would still find it if you all think that makes sense.

cc: @aylward

kirbyju commented 1 month ago

It appears that reinstalling the zarr and ngff_zarr fixes the issue in both notebooks:

!pip uninstall -y zarr ngff_zarr
!pip install zarr ngff_zarr

Leaving this open until things are fixed within itkWidgets. Filed issue https://github.com/InsightSoftwareConsortium/itkwidgets/issues/763 to track it.

thewtex commented 1 month ago

@kirbyju a PR to address this is here: https://github.com/kirbyju/TCIA_Notebooks/pull/31

thewtex commented 1 month ago

Colab with #31:

image

thewtex commented 1 month ago

Resolved via #31