跳转到主要内容

一个Jupyterlab VTK查看器扩展。

项目描述

jupyterview

Github Actions Status Lite Binder GitHub license PyPI version Conda Version

JupyterLab的VTK数据可视化扩展

jupyterview 是一个扩展,它为JupyterLab添加了 VTK 数据可视化功能。

由Kitware的 vtk.jsitk-wasm 库提供支持,jupyterview 是一个纯前端扩展,它不需要任何内核即可运行,并完全支持JupyterLab的实时协作功能。

jupyterviewjupyterlite 完全兼容,您可以在jupyterview演示链接在线查看。

功能

  • 可视化结构化和非结构化数据(.vtu.vtp.vtk文件)。

vtu

  • 可视化和动画.pvd文件。

pvd

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 一起安装的。您可以使用 yarnnpm 代替下面的 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 (18.5 MB 查看哈希)

上传时间

构建分布

jupyterview-0.7.0-py3-none-any.whl (12.9 MB 查看哈希)

上传时间 Python 3

由以下支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面