Ease transition between napari and vedo
BSD-3-CLAUSE License
To be able to use interactive processing of meshes in napari, this plugin provides a bridge to the vedo library. It allows to transfer meshes between napari and vedo and to use the interactive processing capabilities of vedo in napari.
The plugin allows to export and import meshes and point layers. The following are supported:
napari layer type | File Format | Import | Export | Features |
---|---|---|---|---|
Surface | .vtp | ✓ | ✓ | ✓ |
Surface | .vtk | ✓ | ✓ | ✗ |
Surface | .obj | ✓ | ✓ | ✗ |
Surface | .stl | ✓ | ✓ | ✗ |
Surface | .ply | ✓ | ✓ | ✗ |
Points | .vtp | ✓ | ✓ | ✓ |
Points | .vtk | ✓ | ✓ | ✗ |
Points | .ply | ✓ | ✓ | ✗ |
Points | .obj | ✓ | ✓ | ✗ |
To interactively cut meshes in the napari-vedo MeshCutter, install the plugin (see below) and open the plugin it from the napari plugins menu (Plugins > Mesh Cutter (napari-vedo-bridge)
).
To cut meshes you can use the following cutters:
PlaneCutter
: cuts a mesh with a planeSphereCutter
: cuts a mesh with a sphereBoxCutter
: cuts a mesh with a boxTo send and get data into and from the plugin, you can:
Retrieve mesh from napari
) - this imports the currently selected mesh layer from napariLoad mesh
)Send back to napari
) - this creates a new mesh layer in napariThe plugin also provides a set of mesh processing functions that can be used in napari. These functions are wrapped from the vedo library and provide various mesh processing capabilities. The following functions are available:
compute_normals
: Compute normals for the given mesh.shrink
: Shrink the given mesh.join
: Join the given meshes.subdivide
: Subdivide the given mesh.decimate
: Decimate the given mesh.decimate_pro
: Decimate the given mesh using the Pro algorithm.decimate_binned
: Decimate the given mesh using the Binned algorithm.smooth
: Smooth the given mesh.fill_holes
: Fill holes in the given mesh.inside_points
: Get the points inside the given mesh.extrude
: Extrude the given mesh.split
: Split the given mesh into connected components.extract_largest_region
: Extract the largest region from the given mesh.binarize
: Binarize the given mesh.The plugin also provides a set of pointcloud processing functions that can be used in napari. These functions are wrapped from the vedo library and provide various pointcloud processing capabilities. The following functions are available:
smooth_points
: Smooth the given points.decimate_points
: Decimate the given points.cluster_points
: Cluster the given points.remove_outliers
: Remove outliers from the given points.compute_normals_points
: Compute normals for the given points.extract_largest_cluster
: Extract the largest cluster from the given points.This napari plugin was generated with Cookiecutter using @napari's cookiecutter-napari-plugin template.
You can install napari-vedo-bridge
via pip:
pip install napari-vedo-bridge
Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.
Distributed under the terms of the BSD-3 license, "napari-vedo-bridge" is free and open source software
If you encounter any problems, please [file an issue] along with a detailed description.