delaunay-watershed-3d


Namedelaunay-watershed-3d JSON
Version 0.3.6 PyPI version JSON
download
home_pagehttps://github.com/VirtualEmbryo/delaunay-watershed
SummaryGeometrical reconstruction of cell assemblies from instance segmentations
upload_time2024-07-12 15:39:53
maintainerMatthieu Perez
docs_urlNone
authorSacha Ichbiah
requires_python>=3.10
licenseCC BY-NC-SA 4.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Delaunay-Watershed 3D

[![CC BY-NC-SA 4.0][cc-by-nc-sa-shield]][cc-by-nc-sa]
[![DOI](https://zenodo.org/badge/634561229.svg)](https://zenodo.org/badge/latestdoi/634561229)

<img src="https://raw.githubusercontent.com/sacha-ichbiah/delaunay_watershed_3d/main/Figures_readme/Figure_logo_white_arrow.png" alt="drawing" width="300"/>


**Delaunay-Watershed-3D** is an algorithm designed to reconstruct *in 3D* a sparse surface mesh representation of the geometry of multicellular structures or nuclei from instance segmentations. It accomplishes this by building multimaterial meshes from segmentation masks. These multimaterial meshes are perfectly suited for **storage, geometrical analysis, sharing** and **visualization of data**. We provide as well visualization tools based on [polyscope](https://polyscope.run) and [napari](https://napari.org).

Delaunay-Watershed was created by Sacha Ichbiah during his PhD in [Turlier Lab](https://www.turlierlab.com), and is improved and maintained by Matthieu Perez and Hervé Turlier. For support, please open an issue.
If you use this library in your work please cite the [paper](https://doi.org/10.1101/2023.04.12.536641). 

If you are interested in 2D images and meshes, please look at the [foambryo-2D](https://github.com/VirtualEmbryo/foambryo2D) package instead.

Introductory notebooks are provided for two examples (cells or nuclei in multicellular aggregates).
The algorithm takes as input 3D segmentation masks and returns multimaterial triangle meshes in 3D.

This method is used as a backend for [foambryo](https://github.com/VirtualEmbryo/foambryo), our 3D tension and pressure inference Python library.



### Installation

We recommend to install delaunay-watershed from the PyPI repository directly, in a virtual environment.

```shell
pip install delaunay-watershed-3d
```

If you want to use our visualization tools, install the package with the `viewing` option:
```shell
pip install "delaunay-watershed-3d[viewing]"
```

For developers, you may also install delaunay-watershed by cloning the source code and installing from the local directory

```shell
git clone https://github.com/VirtualEmbryo/delaunay-watershed.git
pip install pathtopackage/delaunay-watershed
```

### Quick start example 

Load an instance segmentation, construct its multimaterial mesh, save it to a file for later, and visualize it:

```py
from dw3d import get_default_mesh_reconstruction_algorithm
from dw3D.viewing import plot_cells_polyscope

# Get a mesh reconstruction algorithm
mesh_reconstruction_algorithm = get_default_mesh_reconstruction_algorithm()

# Load the segmentation image
import skimage.io as io
segmentation_mask = io.imread("data/Images/1.tif")

# Reconstruct a multimaterial mesh from the mask using the mesh reconstruction algorithm
mesh_reconstruction_algorithm.construct_mesh_from_segmentation_mask(segmentation_mask)

# Save the last constructed mesh
mesh_reconstruction_algorithm.save_to_vtk_mesh("mesh_from_segmentation.vtk", binary_mode=True)
# Plot the last constructed mesh
plot_cells_polyscope(mesh_reconstruction_algorithm)
```

Geometry can be analyzed later, in [foambryo](https://pypi.org/project/foambryo/) for example.

For more examples and documentation, see the notebooks:
- [Mesh reconstruction and visualization](./Examples/example_1_mesh_reconstruction_visualisation.ipynb),
- [Mask compression and reconstruction](./Examples/example_2_mask_compression_reconstruction.ipynb).

There is also an advanced notebook if you want to tinkle with the algoritm: [Advanced use](./Examples/example_3_advanced_use.ipynb).


---
### Biological examples

#### Geometrical reconstruction of cell interfaces in the *P. Mammilata* embryo
See the [notebook on mesh reconstruction and visualization](./Examples/example_1_mesh_reconstruction_visualisation.ipynb).

![](https://raw.githubusercontent.com/sacha-ichbiah/delaunay_watershed_3d/main/Figures_readme/DW_3d.png "Mesh reconstruction.")

Segmentation masks from [Guignard et al.](https://www.science.org/doi/10.1126/science.aar5663)


#### Geometrical reconstruction of cell nuclei

See the [notebook on mask compression and reconstruction](./Examples/example_2_mask_compression_reconstruction.ipynb).

![](https://raw.githubusercontent.com/sacha-ichbiah/delaunay_watershed_3d/main/Figures_readme/DW_3d_nuclei.png "Mask reconstruction.")

Segmentation masks from [Stardist](https://github.com/stardist/stardist)


---


### Credits, contact, citations
If you use this tool, please cite the associated paper.
Do not hesitate to contact Matthieu Perez and Hervé Turlier for practical questions and applications. 
We hope that **Delaunay-Watershed** could help biologists and physicists to shed light on the mechanical aspects of early development.

```
@article {Ichbiah2023.04.12.536641,
	author = {Sacha Ichbiah and Fabrice Delbary and Alex McDougall and R{\'e}mi Dumollard and Herv{\'e} Turlier},
	title = {Embryo mechanics cartography: inference of 3D force atlases from fluorescence microscopy},
	elocation-id = {2023.04.12.536641},
	year = {2023},
	doi = {10.1101/2023.04.12.536641},
	publisher = {Cold Spring Harbor Laboratory},
	abstract = {The morphogenesis of tissues and embryos results from a tight interplay between gene expression, biochemical signaling and mechanics. Although sequencing methods allow the generation of cell-resolved spatio-temporal maps of gene expression in developing tissues, creating similar maps of cell mechanics in 3D has remained a real challenge. Exploiting the foam-like geometry of cells in embryos, we propose a robust end-to-end computational method to infer spatiotemporal atlases of cellular forces from fluorescence microscopy images of cell membranes. Our method generates precise 3D meshes of cell geometry and successively predicts relative cell surface tensions and pressures in the tissue. We validate it with 3D active foam simulations, study its noise sensitivity, and prove its biological relevance in mouse, ascidian and C. elegans embryos. 3D inference allows us to recover mechanical features identified previously, but also predicts new ones, unveiling potential new insights on the spatiotemporal regulation of cell mechanics in early embryos. Our code is freely available and paves the way for unraveling the unknown mechanochemical feedbacks that control embryo and tissue morphogenesis.Competing Interest StatementThe authors have declared no competing interest.},
	URL = {https://www.biorxiv.org/content/early/2023/04/13/2023.04.12.536641},
	eprint = {https://www.biorxiv.org/content/early/2023/04/13/2023.04.12.536641.full.pdf},
	journal = {bioRxiv}
}
```

### License

This work is licensed under a
[Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License][cc-by-nc-sa].

[![CC BY-NC-SA 4.0][cc-by-nc-sa-image]][cc-by-nc-sa]

[cc-by-nc-sa]: http://creativecommons.org/licenses/by-nc-sa/4.0/
[cc-by-nc-sa-image]: https://licensebuttons.net/l/by-nc-sa/4.0/88x31.png
[cc-by-nc-sa-shield]: https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-lightgrey.svg

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/VirtualEmbryo/delaunay-watershed",
    "name": "delaunay-watershed-3d",
    "maintainer": "Matthieu Perez",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "matthieu.perez@college-de-france.fr",
    "keywords": null,
    "author": "Sacha Ichbiah",
    "author_email": "sacha.ichbiah@college-de-france.fr",
    "download_url": "https://files.pythonhosted.org/packages/70/e3/3b16f4ebf76498710133423845423556d52fe8c6835fc76cc8e74d0b127f/delaunay_watershed_3d-0.3.6.tar.gz",
    "platform": null,
    "description": "# Delaunay-Watershed 3D\n\n[![CC BY-NC-SA 4.0][cc-by-nc-sa-shield]][cc-by-nc-sa]\n[![DOI](https://zenodo.org/badge/634561229.svg)](https://zenodo.org/badge/latestdoi/634561229)\n\n<img src=\"https://raw.githubusercontent.com/sacha-ichbiah/delaunay_watershed_3d/main/Figures_readme/Figure_logo_white_arrow.png\" alt=\"drawing\" width=\"300\"/>\n\n\n**Delaunay-Watershed-3D** is an algorithm designed to reconstruct *in 3D* a sparse surface mesh representation of the geometry of multicellular structures or nuclei from instance segmentations. It accomplishes this by building multimaterial meshes from segmentation masks. These multimaterial meshes are perfectly suited for **storage, geometrical analysis, sharing** and **visualization of data**. We provide as well visualization tools based on [polyscope](https://polyscope.run) and [napari](https://napari.org).\n\nDelaunay-Watershed was created by Sacha Ichbiah during his PhD in [Turlier Lab](https://www.turlierlab.com), and is improved and maintained by Matthieu Perez and Herv\u00e9 Turlier. For support, please open an issue.\nIf you use this library in your work please cite the [paper](https://doi.org/10.1101/2023.04.12.536641). \n\nIf you are interested in 2D images and meshes, please look at the [foambryo-2D](https://github.com/VirtualEmbryo/foambryo2D) package instead.\n\nIntroductory notebooks are provided for two examples (cells or nuclei in multicellular aggregates).\nThe algorithm takes as input 3D segmentation masks and returns multimaterial triangle meshes in 3D.\n\nThis method is used as a backend for [foambryo](https://github.com/VirtualEmbryo/foambryo), our 3D tension and pressure inference Python library.\n\n\n\n### Installation\n\nWe recommend to install delaunay-watershed from the PyPI repository directly, in a virtual environment.\n\n```shell\npip install delaunay-watershed-3d\n```\n\nIf you want to use our visualization tools, install the package with the `viewing` option:\n```shell\npip install \"delaunay-watershed-3d[viewing]\"\n```\n\nFor developers, you may also install delaunay-watershed by cloning the source code and installing from the local directory\n\n```shell\ngit clone https://github.com/VirtualEmbryo/delaunay-watershed.git\npip install pathtopackage/delaunay-watershed\n```\n\n### Quick start example \n\nLoad an instance segmentation, construct its multimaterial mesh, save it to a file for later, and visualize it:\n\n```py\nfrom dw3d import get_default_mesh_reconstruction_algorithm\nfrom dw3D.viewing import plot_cells_polyscope\n\n# Get a mesh reconstruction algorithm\nmesh_reconstruction_algorithm = get_default_mesh_reconstruction_algorithm()\n\n# Load the segmentation image\nimport skimage.io as io\nsegmentation_mask = io.imread(\"data/Images/1.tif\")\n\n# Reconstruct a multimaterial mesh from the mask using the mesh reconstruction algorithm\nmesh_reconstruction_algorithm.construct_mesh_from_segmentation_mask(segmentation_mask)\n\n# Save the last constructed mesh\nmesh_reconstruction_algorithm.save_to_vtk_mesh(\"mesh_from_segmentation.vtk\", binary_mode=True)\n# Plot the last constructed mesh\nplot_cells_polyscope(mesh_reconstruction_algorithm)\n```\n\nGeometry can be analyzed later, in [foambryo](https://pypi.org/project/foambryo/) for example.\n\nFor more examples and documentation, see the notebooks:\n- [Mesh reconstruction and visualization](./Examples/example_1_mesh_reconstruction_visualisation.ipynb),\n- [Mask compression and reconstruction](./Examples/example_2_mask_compression_reconstruction.ipynb).\n\nThere is also an advanced notebook if you want to tinkle with the algoritm: [Advanced use](./Examples/example_3_advanced_use.ipynb).\n\n\n---\n### Biological examples\n\n#### Geometrical reconstruction of cell interfaces in the *P. Mammilata* embryo\nSee the [notebook on mesh reconstruction and visualization](./Examples/example_1_mesh_reconstruction_visualisation.ipynb).\n\n![](https://raw.githubusercontent.com/sacha-ichbiah/delaunay_watershed_3d/main/Figures_readme/DW_3d.png \"Mesh reconstruction.\")\n\nSegmentation masks from [Guignard et al.](https://www.science.org/doi/10.1126/science.aar5663)\n\n\n#### Geometrical reconstruction of cell nuclei\n\nSee the [notebook on mask compression and reconstruction](./Examples/example_2_mask_compression_reconstruction.ipynb).\n\n![](https://raw.githubusercontent.com/sacha-ichbiah/delaunay_watershed_3d/main/Figures_readme/DW_3d_nuclei.png \"Mask reconstruction.\")\n\nSegmentation masks from [Stardist](https://github.com/stardist/stardist)\n\n\n---\n\n\n### Credits, contact, citations\nIf you use this tool, please cite the associated paper.\nDo not hesitate to contact Matthieu Perez and Herv\u00e9 Turlier for practical questions and applications. \nWe hope that **Delaunay-Watershed** could help biologists and physicists to shed light on the mechanical aspects of early development.\n\n```\n@article {Ichbiah2023.04.12.536641,\n\tauthor = {Sacha Ichbiah and Fabrice Delbary and Alex McDougall and R{\\'e}mi Dumollard and Herv{\\'e} Turlier},\n\ttitle = {Embryo mechanics cartography: inference of 3D force atlases from fluorescence microscopy},\n\telocation-id = {2023.04.12.536641},\n\tyear = {2023},\n\tdoi = {10.1101/2023.04.12.536641},\n\tpublisher = {Cold Spring Harbor Laboratory},\n\tabstract = {The morphogenesis of tissues and embryos results from a tight interplay between gene expression, biochemical signaling and mechanics. Although sequencing methods allow the generation of cell-resolved spatio-temporal maps of gene expression in developing tissues, creating similar maps of cell mechanics in 3D has remained a real challenge. Exploiting the foam-like geometry of cells in embryos, we propose a robust end-to-end computational method to infer spatiotemporal atlases of cellular forces from fluorescence microscopy images of cell membranes. Our method generates precise 3D meshes of cell geometry and successively predicts relative cell surface tensions and pressures in the tissue. We validate it with 3D active foam simulations, study its noise sensitivity, and prove its biological relevance in mouse, ascidian and C. elegans embryos. 3D inference allows us to recover mechanical features identified previously, but also predicts new ones, unveiling potential new insights on the spatiotemporal regulation of cell mechanics in early embryos. Our code is freely available and paves the way for unraveling the unknown mechanochemical feedbacks that control embryo and tissue morphogenesis.Competing Interest StatementThe authors have declared no competing interest.},\n\tURL = {https://www.biorxiv.org/content/early/2023/04/13/2023.04.12.536641},\n\teprint = {https://www.biorxiv.org/content/early/2023/04/13/2023.04.12.536641.full.pdf},\n\tjournal = {bioRxiv}\n}\n```\n\n### License\n\nThis work is licensed under a\n[Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License][cc-by-nc-sa].\n\n[![CC BY-NC-SA 4.0][cc-by-nc-sa-image]][cc-by-nc-sa]\n\n[cc-by-nc-sa]: http://creativecommons.org/licenses/by-nc-sa/4.0/\n[cc-by-nc-sa-image]: https://licensebuttons.net/l/by-nc-sa/4.0/88x31.png\n[cc-by-nc-sa-shield]: https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-lightgrey.svg\n",
    "bugtrack_url": null,
    "license": "CC BY-NC-SA 4.0",
    "summary": "Geometrical reconstruction of cell assemblies from instance segmentations",
    "version": "0.3.6",
    "project_urls": {
        "Homepage": "https://github.com/VirtualEmbryo/delaunay-watershed",
        "Team website": "https://www.turlierlab.com/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f894594627063962975529c38a82875f5b9bc30f0a916e896df2a7e730ac62e3",
                "md5": "d5b10c8e20ae88e4da1d5c928cbdb0d2",
                "sha256": "52b44fb1348a0a5cadd4794b792ed4e9318931d6b1d55975720aab8ba4bdb6b0"
            },
            "downloads": -1,
            "filename": "delaunay_watershed_3d-0.3.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d5b10c8e20ae88e4da1d5c928cbdb0d2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 32797,
            "upload_time": "2024-07-12T15:39:51",
            "upload_time_iso_8601": "2024-07-12T15:39:51.473493Z",
            "url": "https://files.pythonhosted.org/packages/f8/94/594627063962975529c38a82875f5b9bc30f0a916e896df2a7e730ac62e3/delaunay_watershed_3d-0.3.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "70e33b16f4ebf76498710133423845423556d52fe8c6835fc76cc8e74d0b127f",
                "md5": "5f3a18ebb1d3ffc886aafc0c4b919612",
                "sha256": "bf7b317f79a1023a3e3b88037e1b155535696668bf9c2db05fd962abdc000924"
            },
            "downloads": -1,
            "filename": "delaunay_watershed_3d-0.3.6.tar.gz",
            "has_sig": false,
            "md5_digest": "5f3a18ebb1d3ffc886aafc0c4b919612",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 27181,
            "upload_time": "2024-07-12T15:39:53",
            "upload_time_iso_8601": "2024-07-12T15:39:53.406212Z",
            "url": "https://files.pythonhosted.org/packages/70/e3/3b16f4ebf76498710133423845423556d52fe8c6835fc76cc8e74d0b127f/delaunay_watershed_3d-0.3.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-12 15:39:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "VirtualEmbryo",
    "github_project": "delaunay-watershed",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "delaunay-watershed-3d"
}
        
Elapsed time: 0.56294s