Interactive surface analysis in napari for measuring mechanical stresses in biological tissues

    View project data

    License PyPI Python Version tests codecov pre-commit PyPI - Downloads napari hub DOI

    This plugin provides tools for the analysis of surfaces in Napari, such as utilities to determine and refine the surface-representation of objects using a ray-casting approach and calculate the curvature of surfaces. It re-implements code in Napari that was written for Gross et al. (2021): STRESS, an automated geometrical characterization of deformable particles for in vivo measurements of cell and tissue mechanical stresses and has been made open source in this repository.


    Functionality in this repository is divided in two groups: Workflows and functions.


    This section describes common workflows for processing images, points and surface data step-by-step.

    Confocal data (.tif), 3D+t: Interactive tutorial on how to extract surfaces from intensity image data
    Confocal data (.tif), 3D+t: Interactive tutorial on how to extract curvature from surfaces
    Confocal data (.tif), 3D+t: Jupyter notebook for processing single channel data and extracting gaussian curvature.


    All functions in napari-stress are documented separately for interactive usage from the napari viewer as well as Jupyter notebooks.

    Fit spherical harmonics: Interactive Code
    Surface tracing: Code
    Reconstruct surface: Code
    Fit ellipsoid: Interactive Code
    Analyze spherical harmonics: Code


    Data to be used for this plugin is typically of the form [TZYX] (e.g., 3D + time). Napari-stress offers convenient ways to use functions from other repositories (which are often made for 3D data) on timelapse data with the frame_by_frame function and the TimelapseConverter class. Both are described in more detail in this notebook.


    Create a new conda environment with the following command. If you have never used conda before, please read this guide first.

    conda create -n napari-stress Python=3.9 napari jupyterlab -c conda-forge
    conda activate napari-stress

    You can then install napari-stress using pip:

    pip install napari-stress


    To report bugs, request new features or get in touch, please open an issue or tag @EL_Pollo_Diablo on

    See also

    There are other napari plugins with similar / overlapping functionality


    Contributions are very welcome. Tests can be run with pytest, 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-stress" is free and open source software


    This project was supported by the Deutsche Forschungsgemeinschaft under Germany’s Excellence Strategy – EXC2068 - Cluster of Excellence "Physics of Life" of TU Dresden.


    • 0.0.21

    Release date:

    • 26 September 2022

    First released:

    • 02 June 2022


    • BSD-3-Clause

    Supported data:

    • Information not submitted

    GitHub activity:

    • Stars: 8
    • Forks: 0
    • Issues + PRs: 23

    Python versions supported:

    Operating system:


    • numpy
    • vedo
    • napari (<=0.4.15)
    • vispy (<=0.9.6)
    • matplotlib
    • tqdm
    • scipy
    • pandas
    • scikit-image
    • napari-tools-menu (>=0.1.15)
    • napari-process-points-and-surfaces (>=0.2.0)
    • aicsimageio
    • napari-segment-blobs-and-things-with-membranes
    • mpmath
    • pyshtools (<=4.10.0)
    • napari-matplotlib

    Sign up to receive updates