itkwidgets
itkwidgets copied to clipboard
itkwidgets on Google CoLab
Hi guys.
Have any of you tried to run itkwidgets on Google Colab?
I got the package installed with !pip
, but the moment I try view(image)
, the thing keeps running forever. Could that be because the free server where I am running the notebook in is just not good enough for 3D view? It is a small image though 32x32x32.
Any thoughts?
Just found this: https://stackoverflow.com/questions/47269168/ipywidgets-with-google-colaboratory
:(
Hey @vianamp ,
Yes, please follow and thumbs up this issue:
https://github.com/googlecolab/colabtools/issues/60
UPDATE: you will be able to use the itk-vtk-viewer
directly inside Google Colab which will be similar to itkwidgets, see https://github.com/Kitware/itk-vtk-viewer/issues/336
@oeway #brilliant!! :heart: :heart_eyes:
Awesome to know that we will have Google Colab support with the itkwidgets / imjoy refactor (WIP)!
This is superb for reproducibility and teaching with deep learning libraries.
@aylward
@thewtex and @oeway This new function is so cool!!!!
I have a question about the using itkwidgets on colab.
Here is a working example I made for testing the viewer : https://github.com/AllenInstitute/aics-segmentation/blob/colab/lookup_table_demo/test_viewer.ipynb
It works well so far. But, i would like to extract the ROI from the ROI selection in the viewer. Previously, I can do this
viewer_bw =view(bw)
print( viewer_bw.roi_slice() )
I am not sure how to extract ROI with the new ImJoy layer
@jxchen01 Thanks!
We don't have ROI widget support in the itk-vtk-viewer yet, it would be nice to have this feature indeed. @thewtex what do you think?
Related to this, I am also interested in having the PaintWidget working in the viewer at some point( e.g. adding a new channel and use the paint widget to do annotation).
@jxchen01 very nice! Yes, the ROI selection feature in itkwidgets will work in Colab as it works in Jupyter as we integrate more of the ImJoy communication backend.
@oeway :+1: Interactive widget support is being added, e.g. the PaintWidget. :paintbrush:
Rebasing on ImJoy magic for CoLab support! :tada:
pip install --upgrade --pre itkwidgets
to test.
CSS issues in the output, currently using the createDialog
over createWindow
in Colab.
@bnmajor maybe the CSS here can be adjusted?
https://github.com/Kitware/itk-vtk-viewer/blob/0aec56c6dd8411e2d47ab98245242fe1db063e79/dist/index.html#L42
CSS issues in the output, currently using the createDialog over createWindow in Colab.
Or, we should be using the w
and h
options for createWindow
?
CoLab support in 1.0aNN :tada: thanks to ImJoy, @bnmajor and @oeway 's efforts.