Code Monkey home page Code Monkey logo

Comments (9)

lassoan avatar lassoan commented on September 24, 2024 2

I've installed the itkwidgets 0.26.1 for both the kernel and notebook sides and restarted my computer and it works now! Thanks for your help.

from slicerjupyter.

thewtex avatar thewtex commented on September 24, 2024 1

@lassoan the transfer functions can currently only be set via the user interface. We could also add traits to set / get them -- I created an issue to track this here: InsightSoftwareConsortium/itkwidgets#304. We are currently bringing in support for multi-component volumes and label maps, and we will wait until that is in place first (each component has its own transfer function).

from slicerjupyter.

lassoan avatar lassoan commented on September 24, 2024

There seems to be packaging issues (see #38 (comment)).

@thewtex could you please let us know when the problem is fixed and we can start testing itkwidgets? Is there an earlier version that we can pip install?

from slicerjupyter.

thewtex avatar thewtex commented on September 24, 2024

@lassoan yes, will let you know, working on the install issue.

You can try 0.26.1 in the meantime.

from slicerjupyter.

lassoan avatar lassoan commented on September 24, 2024

Thank you! I've tried itkwidgets==0.26.1 and have the same issue (viewer does not appear) in 3DImage.ipynb.

Same with xeus-python and with a standard ipython kernel.
Windows10, Python version: 3.7.6 (default, Jan 8 2020, 20:23:39) [MSC v.1916 64 bit (AMD64)]

from slicerjupyter.

thewtex avatar thewtex commented on September 24, 2024

Windows10, Python version: 3.7.6 (default, Jan 8 2020, 20:23:39)

I just tried with this setup, and both 0.26.1 and 0.27.2 worked for me. Here were the steps:

# Open Command Prompt
cd C:\
C:\Python37-x64\python.exe -m venv ./venv
cd venv
# Forgot 0.26.1 the first time, 0.27.2 also works locally, I am fixing it for Binder
.\Scripts\python.exe -m pip install itkwidgets==0.26.1
# Download 3DImage.ipynb to the current directory
.\Scripts\jupyter.exe notebook 3DImage.ipynb

Does this work on your system? What is different about the setup? Thanks in advance, Andras.

from slicerjupyter.

lassoan avatar lassoan commented on September 24, 2024

Still does not work:

image

image

I used anaconda navigator to create a new Python-3.7 environment, installed jupyter notebook, and entered the cells shown in the screenshots above. Does this help? Do you have any clue about what could go wrong?

from slicerjupyter.

lassoan avatar lassoan commented on September 24, 2024

@thewtex I'm looking at the documentation of the viewer and I'm trying to find where to set volume rendering transfer functions. I see that gradient opacity transfer function can be set directly using gradient_opacity, custom color transfer function can be probably hacked into _custom_cmap, but I can't find where to set a scalar opacity transfer function. Can you advise?

from slicerjupyter.

lassoan avatar lassoan commented on September 24, 2024

itkwidgets are confirmed to work. However, there are some limitations/issues with displaying models larger than a few 100k points, volume rendering cannot be configured yet to properly render medical images, etc.

Since dynamic Slicer views are quite capable (rendering of all 2D and 3D content - multiple images, segmentations, markups, models, regions, transformed volumes, volume rendering, ...), we won't configure display hook to use itkwidgets for rendering MRML nodes in the notebook. However, we'll keep this in mind and revisit later, when more features are added to itkwidgets and/or important use cases emerge that require client-side rendering instead of server-side remote rendering.

from slicerjupyter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.