Skip to content

Add Clara Viz operator. #235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 31, 2022
Merged

Add Clara Viz operator. #235

merged 1 commit into from
Jan 31, 2022

Conversation

AndreasHeumann
Copy link
Collaborator

Signed-off-by: Andreas Heumann aheumann@nvidia.com

@vikashg
Copy link
Collaborator

vikashg commented Jan 11, 2022

Hey @AndreasHeumann, I tried to read a simple MR image (MNI template) using the monai transform and I wanted to display it on the jupyter notebooks but nothing happens. I followed the documentation here.

@AndreasHeumann
Copy link
Collaborator Author

Hi @vikashg. I tried the jupyter notebook you provided and indeed the Python kernel crashes for me as well. But it works if i remove the line print(Renderer(image)). I'm not sure why it crashes when doing the print in that way but print(renderer) for example works. I'll open an issue in Clara Viz on this.
image

@AndreasHeumann AndreasHeumann marked this pull request as draft January 12, 2022 09:12
@dbericat dbericat requested review from hshuaib90 and vikashg January 12, 2022 20:55
@dbericat dbericat added the enhancement New feature or request label Jan 12, 2022
@dbericat dbericat added this to the v0.3.0 milestone Jan 12, 2022
@vikashg
Copy link
Collaborator

vikashg commented Jan 15, 2022

Hi @AndreasHeumann, So I removed the line print(renderer) line but still there is no display on my notebook. Can you share maybe your environment details. I wish I could give more info other than the terminal output

Opening in existing browser session.
[651765:651765:0100/000000.850456:ERROR:angle_platform_impl.cc(44)] Display.cpp:894 (initialize): ANGLE Display::initialize error 12289: Unsupported GLX version (requires at least 1.3).
[651765:651765:0100/000000.850557:ERROR:gl_surface_egl.cc(782)] EGL Driver message (Critical) eglInitialize: Unsupported GLX version (requires at least 1.3).
[651765:651765:0100/000000.850576:ERROR:gl_surface_egl.cc(1382)] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type
[651765:651765:0100/000000.856389:ERROR:angle_platform_impl.cc(44)] Display.cpp:894 (initialize): ANGLE Display::initialize error 12289: Unsupported GLX version (requires at least 1.3).
[651765:651765:0100/000000.856459:ERROR:gl_surface_egl.cc(782)] EGL Driver message (Critical) eglInitialize: Unsupported GLX version (requires at least 1.3).
[651765:651765:0100/000000.856484:ERROR:gl_surface_egl.cc(1382)] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED
[651765:651765:0100/000000.856504:ERROR:gl_ozone_egl.cc(20)] GLSurfaceEGL::InitializeOneOff failed.
[W 19:12:37.813 NotebookApp] Notebook 06_integrating_clara_viz.ipynb is not trusted
[W 19:12:37.841 NotebookApp] 404 GET /nbextensions/clara-viz-widgets/extension.js?v=20220114191109 (127.0.0.1) 20.650000ms referer=http://localhost:8888/notebooks/06_integrating_clara_viz.ipynb
[I 19:12:38.067 NotebookApp] Kernel started: ee55c289-ab1f-42ab-ac14-fb5b2d44256f, name: python3
[W 19:12:38.077 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20220114191109 (127.0.0.1) 2.080000ms referer=http://localhost:8888/notebooks/06_integrating_clara_viz.ipynb
[W 19:13:21.845 NotebookApp] 404 GET /static/clara-viz-widgets.js?v=20220114191109 (127.0.0.1) 6.400000ms referer=http://localhost:8888/notebooks/06_integrating_clara_viz.ipynb
[I 19:14:38.734 NotebookApp] Saving file at /06_integrating_clara_viz.ipynb

@AndreasHeumann
Copy link
Collaborator Author

AndreasHeumann commented Jan 17, 2022

The first few lines come from the browser not being able to initialize OpenGL. Did you run the Jupyter Lab command from a ssh connection? Usually I run it on ssh with jupyter lab --no-browser --ip=* on my LInux desktop and then open the browser on my Windows Laptop and navigate to the IP address of the desktop, e.g. http://192.168.178.44:8888/.
On my desktop I'm using Ubuntu 20.04, I'm using a conda environment with Monai Deploy App SDK, Jupyter Lab and Clara Viz installed.

@vikashg
Copy link
Collaborator

vikashg commented Jan 18, 2022

Hi @AndreasHeumann, So yes it works with jupyter-lab but not with jupyter-notebook

@vikashg vikashg closed this Jan 18, 2022
@AndreasHeumann
Copy link
Collaborator Author

jupyter-lab and jupyter-notebook are using different interfaces for the widgets. Clara Viz should support both, but we had issues with that in the past. I'll check why it does not work with jupyter-notebook.

@AndreasHeumann
Copy link
Collaborator Author

I filed NVIDIA/clara-viz#9 for the bug that the Clara Viz widget is not working in Jupyter Notebook (only in Lab).

@AndreasHeumann
Copy link
Collaborator Author

@vikashg I just released Clara Viz 0.1.2. That version fixes the crash you were seeing with print(Renderer(data)) and now the widget also works in Jupyter Notebook (not just Jupyter Lab).

@vikashg
Copy link
Collaborator

vikashg commented Jan 20, 2022

Thanks @AndreasHeumann I will check it out today/tomorrow.

@AndreasHeumann AndreasHeumann marked this pull request as ready for review January 28, 2022 10:33
Signed-off-by: Andreas Heumann <aheumann@nvidia.com>
Copy link
Collaborator

@MMelQin MMelQin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good to me, and I tested out this operator in the Spleen Seg App.

@AndreasHeumann AndreasHeumann merged commit 9c0bcb4 into main Jan 31, 2022
@AndreasHeumann AndreasHeumann deleted the aheumann/viz branch January 31, 2022 16:43
@dbericat
Copy link
Member

Is it fair to say we already have a good Clara Viz operator? @MMelQin what are the plans to update the Jupyter notebooks with it?

@MMelQin
Copy link
Collaborator

MMelQin commented Jan 31, 2022

In the upcoming v0.3 release, yes.

@vikashg
Copy link
Collaborator

vikashg commented Feb 1, 2022

We have to prepare a jupyter notebook for tutorials and maybe update demos 4 and 5 with some clara-viz operators. to fully integrate it. i was making a tutorial. I will update it with spleen segmentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants