在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:Slicer/SlicerJupyter开源软件地址:https://github.com/Slicer/SlicerJupyter开源编程语言:Python 40.1%开源软件介绍:SlicerJupyterExtension for 3D Slicer that allows the application to be used from Jupyter notebook Demo video: https://youtu.be/oZ3_cRXX2QM UsageOption 1. Run using BinderYou can use this option for a quick start. No installation or setup is needed, just click the link below and start using Slicer via Jupyter notebook in your web browser. When you click on the link, Binder launches 3D Slicer with SlicerJupyter extension on their cloud servers. Binder is a free service and server resources are quite limited. Also, there is no interactive access to the graphical user interface. Therefore, this option is only recommended for testing, demos, or simple computations or visualizations. Option 2. Run on your own computer
Run classic notebook interfaceFollow all the installation steps above (start Jupyter server once with the default JupyterLab user interface), then restart Slicer. After this, a classic notebook server can be started by typing this into the Python console in Slicer:
Using external Jupyter serverSlicer's Python kernel can be used in Jupyter servers in external Python environments. Kernel specification installation command is displayed in You need to install and set up these Python packages: Option 3. Run using docker on your computerUsing Slicer from a notebook
NotesUpgrading pipYou may see warning messages about upgrading pip, such as this:
In general, it is not necessary to upgrade pip, so you can ignore this warning. If you do want to upgrade it then you need to use the Slicer's "Python launcher" (instead of python-real). Slicer's Python launcher is called Script not on PATHYou may get warning about installing scripts in folder that is not on PATH:
This warning is displayed to warn you that the installed script will not run by simply typing its name anywhere in a terminal. This can be safely ignored. Shutdown all Slicer Jupyter kernelsIf a Jupyter server is kept running then it will automatically restart all kernel instances (Slicer applications) that it manages. If the browser window is accidentally closed before shutting down the server, then you can get the address of all running servers by typing the following into any Slicer Python console:
Open the address in a web browser and click "Quit" button to shutdown the server. ExamplesYou can get started by looking at example Slicer notebooks here. For developersBuild instructions
Install kernel manuallyExample:
Launch a kernel manuallyType this into Slicer's Python console to manually start a kernel that a notebook can connect to: connection_file=r'C:\Users\andra\AppData\Roaming\jupyter\runtime\kernel-3100f53f-3433-40f9-8978-c72ed8f88515.json'
print('Jupyter connection file: ['+connection_file+']')
slicer.modules.jupyterkernel.startKernel(connection_file) Path of Special commandsThese commands must be the last commands in a cell.
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论