Package: delaunay-watershed-3d
Delaunay-Watershed 3DDelaunay-Watershed-3Dis an algorithm designed to reconstructin 3Da 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 forstorage, geometrical analysis, sharingandvisualization of data. We provide high level APIs to extract geometrical features from the meshes, as well as visualization tools based onpolyscopeandnapari.Delaunay-Watershed was created by Sacha Ichbiah during his PhD inTurlier Lab, and is maintained by Sacha Ichbiah, Matthieu Perez and Hervé Turlier. For support, please open an issue.
If you use this library in your work please cite thepaper.If you are interested in 2D images and meshes, please look at thefoambryo-2Dpackage 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 forfoambryo, our 3D tension and pressure inference Python library.InstallationWe recommend to install delaunay-watershed from the PyPI repository directlypipinstalldelaunay-watershed-3dFor developers, you may also install delaunay-watershed by cloning the source code and installing from the local directorygitclonehttps://github.com/VirtualEmbryo/delaunay-watershed.git
pipinstallpathtopackage/delaunay-watershedQuick start exampleLoad an instance segmentation, construct its multimaterial mesh, and extract geometrical features of cells:fromdw3dimportgeometry_reconstruction_3d## Load the labelsimportskimage.ioasiolabels=io.imread("data/Images/1.tif")## Reconstruct a multimaterial mesh from the labelsDW=geometry_reconstruction_2d(labels,(image,min_dist=5,expansion_labels=0,print_info=True)DW.plot_cells_polyscope()v=DW.plot_in_napari(add_mesh=True)## Use the mesh to analyze the geometry:Mesh=DW.return_dcel()Mesh.compute_curvatures_interfaces()Mesh.compute_areas_interfaces()Mesh.compute_volumes_cells()Mesh.compute_length_trijunctions()Mesh.compute_angles_junctions()API and documentation1 - Creating a multimaterial mesh:The first step is to convert your instance segmentation masks into a multimaterial meshgeometry_reconstruction_3d(labels,min_dist = 5, expansion_labels = 0,original_image = None,print_info = False, mode='torch'):Meshis aDCEL_Dataobject.min_distdefines the minimal distance, in pixels, between two points used for the Delaunay tesselation.expansion_labelscan be used to expand the labels and make them contact each other.original_imagecan be used for visualization purposes in Napari.print_infomeasures time between several checkpoints and gives usefull information about the procedure.modecan betorchorskimage. It is highly recommended to use the mode torch (which requires PyTorch).return DW, an object containing visualization and export utilities.2 - Visualize and export the meshOnce aDWobject is generated, we can use its methods the visualize and export the result:DW:self.plot_cells_polyscope()plot the resulting mesh in polyscope.self.plot_in_napari(add_mesh=True)offers more information about the procedure.self.return_mesh()return(Verts,Faces_multimaterial):Vertsis an V x 3 numpy array of vertex positions, where V is the number of vertices.Faces_multimaterialis a F x 5 numpy array of F faces (triangles) and labels, where at each row the 3 first indices refers to the indices of the three vertices of that triangle and the 2 last refer to a given interface label. An interface label is made of two indices referring to the two materials (e.g. cells) lying on each of its side, 0 being the exterior medium by convention.self.return_dcel()returns aDCEL_Dataobject, i.e. a half-edge data structure implementing the mesh.3 - Analyze the geometryADCEL_Dataobject can be used to analyze the geometry:DCEL_Data:self.compute_angles_junctions()returns a dictionnary with the values of every angles formed by the cells (in rad)self.compute_compute_curvatures(laplacian = "robust",weighted = True)returns a dictionnary with the values of the mean curvature averaged on all the vertices of all the interfaces.laplaciancan be either "cotan" or "robust". Ifweighted, the sum is scaled with vertices areas.`self.compute_length_halfedges(), self.compute_areas_faces(), self.compute_centroids_cells(), self.compute_areas_cells(), self.compute_areas_interfaces(), self.compute_volumes_cells(), compute_length_trijunctions()Biological examplesGeometrical reconstruction of cell interfaces in theP. MammilataembryoSee thePython notebook 1.Segmentation masks fromGuignard et al.Geometrical reconstruction of cell nucleiSee thePython notebook 2.Segmentation masks fromStardistCredits, contact, citationsIf you use this tool, please cite the associated paper.
Do not hesitate to contact Sacha Ichbiah and Hervé Turlier for practical questions and applications.
We hope thatDelaunay-Watershedcould 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}
}LicenseThis work is licensed under aCreative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.