InsightSoftwareConsortium / itkwidgets

An elegant Python interface for visualization on the web platform to interactively generate insights into multidimensional images, point sets, and geometry.
https://itkwidgets.readthedocs.io/
Apache License 2.0
579 stars 83 forks source link

Viewer widget not visible in Jupyter Notebook on CodeOcean #650

Open tbirdso opened 1 year ago

tbirdso commented 1 year ago

Overview

itkwidgets.view produces output but does not show the expected 3D image.

Steps to reproduce

  1. In a clean environment, pip install itk itkwidgets[notebook]==1.0a23
  2. Run Hello3DWorld.ipynb

Expected Behavior

itkwidgets.view depicts 3D volume rendering

Observed Behavior

itkwidgets-no-view-codeocean

Environment

Python 3.8.5 ITK v5.3.0 itkwidgets 1.0a23 Ubuntu 20.04

Docker image: registry.codeocean.allenneuraldynamics.org/codeocean/jupyterlab:3.0.9-miniconda4.9.2-python3.8-ubuntu20.04

Other Notes

Behavior is observed in a clean environment run via CodeOcean reproducible platform.

Is this maybe an environment issue, and if so what are some things that could be going wrong or some possible steps to resolve? I think I've observed this issue in my local setup before but am uncertain what steps I took to resolve it. Once a resolution is identified, could it be added to an FAQ section in documentation?

EDIT: Note that the ImJoy extension seems to load successfully

imjoy-loaded

The local browser console shows the errors below. The "refused to execute script" error appears regardless of whether itkwidgets is installed when the notebook launches.

console-errors

tbirdso commented 1 year ago

cc @bnmajor @thewtex