一个Jupyterlab VTK查看器扩展。
项目描述
jupyterview
JupyterLab的VTK数据可视化扩展
jupyterview 是一个扩展,它为JupyterLab添加了 VTK
数据可视化功能。
由Kitware的 vtk.js
和 itk-wasm
库提供支持,jupyterview 是一个纯前端扩展,它不需要任何内核即可运行,并完全支持JupyterLab的实时协作功能。
jupyterview 与 jupyterlite
完全兼容,您可以在jupyterview演示链接在线查看。
功能
- 可视化结构化和非结构化数据(
.vtu
、.vtp
、.vtk
文件)。
- 可视化和动画
.pvd
文件。
- 使用
meshio
库可视化网格。支持的格式完整列表可在 https://github.com/nschloe/meshio 查找。要打开med
文件,需要安装h5py
。
https://user-images.githubusercontent.com/4451292/173418573-1839d689-763f-42ba-add3-4eaac4c87d7e.mp4
- 多种显示模式:
表面
、带边缘的表面
、线框
和点
- 颜色刻度和等颜色效果。
- 通过标量效果进行扭曲。
需求
- JupyterLab >= 3.0
安装
要安装扩展,请执行
pip install jupyterview
或使用 mamba/conda
conda install -c conda-forge jupyterview
贡献
开发安装
注意:构建扩展包需要 NodeJS。
jlpm
命令是 JupyterLab 随附的 yarn 版本,它是与 JupyterLab 一起安装的。您可以使用 yarn
或 npm
代替下面的 jlpm
。
# Clone the repo to your local environment
# Change directory to the jupyterview directory
# Install package in development mode
pip install -e .
# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
# Rebuild extension Typescript source after making changes
jlpm run build
您可以在不同的终端中同时监视源目录并运行 JupyterLab,以监视扩展源中的更改并自动重新构建扩展。
# Watch the source directory in one terminal, automatically rebuilding when needed
jlpm run watch
# Run JupyterLab in another terminal
jupyter lab
当监视命令运行时,每次保存的更改都将立即在本地构建并可供您的运行的 JupyterLab 使用。刷新 JupyterLab 以在浏览器中加载更改(您可能需要等待几秒钟以重新构建扩展)。
默认情况下,jlpm run build
命令为该扩展生成源映射,以便更容易使用浏览器开发工具进行调试。要为 JupyterLab 核心扩展也生成源映射,可以运行以下命令
jupyter lab build --minimize=False
开发卸载
pip uninstall jupyterview
在开发模式下,您还需要删除 jupyter labextension develop
命令创建的符号链接。要找到其位置,可以运行 jupyter labextension list
以确定 labextensions
文件夹的位置。然后您可以从该文件夹中删除名为 jupyterview
的符号链接。
打包扩展
参见 RELEASE
感谢
以下库/开源项目在 jupyterview 的开发中被使用或受到启发:
项目详情
下载文件
下载适用于您的平台的文件。如果您不确定要选择哪个,请了解更多关于 安装软件包 的信息。
源分布
构建分布
jupyterview-0.7.0.tar.gz 的哈希
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 0e887e129838fba3fcdfd81f19f9fe2c8c56c2f51900617467973fe76f7115c4 |
|
MD5 | 66f41c938414c18786f37b08ddd9fbc5 |
|
BLAKE2b-256 | 56947c3a4bb8689d5a52109f062cc722c093302473f9dda839cb4a91411da09a |
jupyterview-0.7.0-py3-none-any.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 703c5e60ba15bfe7a4c8e96f29b0158c18a2318820c93013dab2b6bc26b91c32 |
|
MD5 | 941a516bce63ad8a8c0af1c2e7ded38b |
|
BLAKE2b-256 | 22d064064e93888b8587ac0f64454cda7a11c80a3cee86b9fceb0e9970d0a3bc |