Release notes — 0.8.0, 26 November 2026¶
delaunay-watershed 0.8.0 is one repository, one version and one changelog for two packages: dw3d (3-D masks, as before) and dw2d (2-D masks, until now its own repository). It ships together with foambryo 0.8.0 and napari-foambryo 0.2.0. This is what changes for you and what can mislead you; CHANGELOG.md has the full list, and foambryo's RELEASE_NOTES.md covers the inference side. Install with:
pip install --upgrade delaunay-watershed foambryo
pip install delaunay-watershed installs both packages. delaunay-watershed-3d (which carries dw3d) and delaunay-watershed-2d (which carries dw2d) are still installable on their own; delaunay-watershed-3d requires delaunay-watershed-2d at the same version, so it installs both too. The imports are unchanged: from dw3d import ..., from dw2d import .... Python 3.12 or later.
What changes for you¶
- dw2d moves into this repository and its distribution keeps its name.
delaunay-watershed-2d0.1.5 was the last release from dw2d's former repository; 0.8.0 is built from here. Upgrading fromdelaunay-watershed-3d0.7.1 ordelaunay-watershed-2d0.1.5 needs nothing special: no installed file changes owner, and pip, uv and an upgrade of foambryo replace the old release in place (measured on 24 fresh environments). dw2d is now licensed GPL-3.0-or-later, like dw3d, with the agreement of its authors; 0.1.5 and earlier keep the licence they were published under. - The same calls mesh a 2-D or a 3-D mask: the input decides the dimension. dw3d's
construct_mesh_from_segmentation_maskandconstruct_mesh_in_physical_unitshand a 2-D label image to dw2d and return(points (n, 2), segments (m, 2), labels (m, 2)); dw2d offers dw3d's names (get_default_mesh_reconstruction_algorithm,MeshReconstructionAlgorithmFactory, the reports and warnings,save_to_rec_mesh, the compressed segmentation).min_distancedefaults to 3 voxels in 3D, as before, and 4 pixels in 2D. dw2d 0.1.5'sgeometry_reconstruction_2dand its other top-level names still work through 0.8.x, with aDeprecationWarningnaming the replacement, and are removed in 0.9. - 2-D meshes change, and were wrong in places before. The new defaults: the same mesh on every machine (
set_canonical_triangle_order, the deprecated call'sdeterministic=True), junctions moved onto the mask's own junctions (relocate_junctions=True), pinch vertices and label fragments repaired (repair_pinch_vertices=True), and the vertices on the image border marked and never moved. Against dw2d 0.1.5 on synthetic equilibrium foams with known tensions (53 held-out tissues, 661 images), the relocation moves the junctions from 0.65 to 0.42 px of the true ones and lowers the junction-angle error by 0.85° (95 % interval 0.75–0.95°).geometry_reconstruction_2d(..., deterministic=False, relocate_junctions=False, repair_pinch_vertices=False, relabel_near_tie_slivers=False)reproduces dw2d 0.1.5's meshes. - dw2d's lengths and curvatures were wrong on most interfaces: recompute them.
DCEL_Data.compute_lengthsandcompute_curvaturescut each interface one edge short of its junctions where the half-edge structure had reversed a boundary loop; on dw2d's shipped masks the former lengths were off by a median 7.4 %, and by more than a factor 2 on 50 short interfaces. Any length, curvature or quantity derived from them by 0.1.5 should be computed again. The mesh itself,compute_anglesandcompute_area_faceswere right. - One orientation rule in 2D and 3D: every dw2d edge is stored the other way round. Each mesh element is now the positively oriented boundary of its first label in the mask's index frame: a triangle's right-hand normal in
(z, y, x)points out of its first label (dw3d, unchanged), and an edge's first label lies on its left in(row, column)(dw2d, reversed in 0.8.0). Only the order of the two vertices in each edge changes; no vertex, edge or label does. Code that reads an edge's direction must follow the rule; foambryo 0.8.0 reads files of either orientation to the same tensions and pressures. - A cell a few voxels or pixels from the image box no longer takes the medium between them. Before, at
min_distance3 a 12-voxel cube 4 voxels from every face of the box meshed to 2.98 times its voxel count. Now the faces no cell reaches whose margin is thinner than2 * min_distance + 2voxels are padded with medium before meshing (pad_thin_medium_margins=True, the default;Falsegives the previous meshes), andThinMediumMarginWarningnames a cell left on a face it does not reach. On the 684 masks of the lab's tests and benchmarks, 18 meshes change (13 coarse resolution-sweep masks and 5 over-segmented embryo frames); the 47 benchmark masks and the test images are bit for bit unchanged, so every number ofBENCHMARKS.mdstands. On the 11 equilibrium masks of the resolution sweep, the median paired change of the contact-angle error is 0.00°, and every value that gets worse stays within the range the same mask gives over ten seeds of the point placement's dither. dw2d applies the same rule, decided from the mask; none of the 2-D masks in the repository is padded. foambryo's command line chooses it withfoambryo mesh --pad-thin-medium-margins/--no-pad-thin-medium-margins, and napari-foambryo with its Reconstruct dock's Pad thin medium margins row. reconstruct_mask_from_dictrebuilds the mask exactly from the mesh, and trimesh is no longer a dependency. Agreement with the mask rises from 98.44–99.32 % to 99.19–99.73 % on the 51 test and benchmark masks, the rebuild takes 0.3–1.1 s instead of 5–10 s, and the result no longer depends on the installed trimesh.- Every label the finished mesh lacks is named, whatever the cause.
UnresolvedCellWarningis emitted once, after the mesh is finished, and eachUnresolvedRegiongives itscause("no tetrahedron in its voxels","removed by mesh surgery","no watershed seed"or"no triangle in the mesh"). The mesh does not change. On the default meshes of two real embryo series, 26 absent cells were named before only byCellVolumeDisagreementWarning. - The
.recformat is read and written by iorec 1.4.1.dw3d.iokeeps its names and signatures, and every file the tests and benchmarks write reads back to the same arrays and typed values. The appendix written is version 1 on purpose (0.7.1's readers lose every key of a version-2 appendix); it recordsdimension(2 or 3). dw2d's readers and writers aredw2d.io.load_recanddw2d.io.save_rec; text files now hold every coordinate exactly.
New¶
- dw3d's Polyscope viewer draws a 2-D mesh (
plot_cells_polyscope): each cell's boundary as a curve, the image under it (image=), shown as napari and matplotlib show the image (row 0 at the top), never its mirror image. Theviewingextra needs Polyscope 2.5.0 or later. dw3d.io.rec_dimension(filename)tells a 2-D.recfile from a 3-D one.- Empty meshes are returned, not raised: a mask whose mesh has no triangle (or, in 2D, no edge) gives an empty mesh and
UnresolvedCellWarningnames its cells. - dw2d's reports and warnings have dw3d's names:
JunctionRelocationReport,InterfaceProjectionReport,EnclosedMediumWarning,UnresolvedCellWarning,ThinMediumMarginWarning. They are dw2d's own classes.
What can mislead you¶
- A padded cell's surface may pass the image box, on a face that no cell reaches, by at most that face's padding: measured at up to 7 voxels on a 16-voxel cube 1 voxel from every face, 1 to 4 voxels on foambryo's test masks, and 0 to 2 voxels on the lab's real data. A face a cell reaches is a crop, is never padded, and no vertex passes it.
- dw3d and dw2d decide the padding differently: dw2d from the mask, dw3d from the first mesh's vertices (Known issues, 3).
- A mask with voxels longer along one axis is not padded by default when
construct_mesh_in_physical_unitsresamples it (Known issues, 2);ThinMediumMarginWarningnames its cells that lie on a face they do not reach. - Between machines, 3-D meshes may still differ at exactly cospherical points; on one machine a reconstruction is reproducible. 2-D meshes are the same on every machine by default.
- The points of 0.7.1's list still hold.
Known issues¶
- The seeded watershed can lose a cell, often a cell cut by the image box, and the crop report then names the wrong cell. On a test mask of four cells filling a ball cut by the image box, at the default
min_distance3 without padding, cell 1 is absent and cell 2 comes out at 1.37 times its voxels; on the same ball at 36 positions andmin_distance2 to 5, 16 cells are absent in 144 reconstructions. Since 0.8.0 the absent cell is named. The padding does not cure it: padded, cell 1 remains as a fragment of 0.010 of its voxel volume. - On a resampled mask the padding would make the watershed lose cells more often: on a four-cell ball with z twice as long as x and y, a cell kept less than half its volume on 20 of 100 dither seeds padded against 3 of 100 unpadded (McNemar exact p = 1.5e-5); on cubic voxels, 13 against 10 (p = 0.51). The cause was not found. Such masks are therefore not padded by default, and keep 0.7's thin-margin meshes;
pad_thin_medium_margins=Truepads anyway. On the two real anisotropic stacks tested, a 110-cell and a 1 866-cell tissue (z/xy = 5/3), the default (no padding on a resampled mask) lost or inflated no cell near an image face. On the 1 866-cell tissue, whose z faces have thin margins (2 and 3 resampled voxels), the 9 cells within 8 voxels of a face kept a mesh volume of 0.88 to 1.05 times their voxel volume over 5 dither seeds, within the range of its interior cells (0.84 to 1.05);ThinMediumMarginWarningnamed 3 to 6 of them, depending on the seed, although their volumes were normal. Padding (pad_thin_medium_margins=True) lost no further cell on that tissue over the same seeds, and lowered the volume of the four cells nearest a face by 0.01 to 0.09 of their voxel volume; which of the two is closer to the true volume is not known. Two stacks give no rate over stacks, and five seeds bound a per-seed loss rate only to 0.52 or less (95 %). - dw3d decides the padding from the first mesh's vertices, which misses a cell that collapses without reaching the image box: 25 of 1 200 synthetic cubes of 6 to 12 voxels collapsed to 0.00–0.49 of their voxels unpadded (0.58–0.80 padded).
- Mesh files keep the mask's column order:
(z, y, x)in 3D,(row, column)in 2D. Programs that read the columns as(x, y, z)or(x, y)show the mirror image of the tissue unless they exchange the columns.
Citation¶
If you use Delaunay-Watershed, in 3D or in 2D, please cite both articles: Ichbiah S., Delbary F., McDougall A., Dumollard R., Turlier H. Embryo mechanics cartography: inference of 3D force atlases from fluorescence microscopy. Nature Methods 20(12), 1989–1999 (2023), doi:10.1038/s41592-023-02084-7; and Yamamoto K., Ichbiah S., Perez M., Borrego-Pinto J., Delbary F., Goehring N. W., Northrop P., Turlier H., Charras G. Spatiotemporal mapping of the contractile and adhesive forces sculpting early C. elegans embryos. Developmental Cell 61(6), 1273–1288.e4 (2026), doi:10.1016/j.devcel.2026.04.013. dw2d's own reference is the Developmental Cell 2026 article.
Credits¶
dw2d was written by Sacha Ichbiah, and is maintained with Matthieu Perez and Hervé Turlier.
Recent work on dw3d and foambryo is part of a collaboration with Alejandro Aguilera Castrejon (Janelia Research Campus, Howard Hughes Medical Institute). We thank him and his Janelia colleagues Adam L. Taylor, Wenhong Li and Francesco Roncato. Adam L. Taylor found the border-triangle winding defect fixed in 0.6.0 and pointed us to the seed-extraction and dense tension-solve bottlenecks on large tissues.
Development of this release was supported by Anthropic's AI for Science program; parts of the code were written with Claude and reviewed by the developers.
Release notes — 0.7.1, 26 October 2026¶
delaunay-watershed-3d (this repository) and foambryo ship together as 0.7.1. This is what changes for you and what can mislead you; CHANGELOG.md has the full list, and foambryo's RELEASE_NOTES.md covers the inference side. Install with pip install --upgrade delaunay-watershed-3d foambryo.
What changes for you¶
- Meshes change slightly: they no longer depend on Qhull's row order. The watershed's tie-break between faces of exactly equal score, the seed lookup and mesh surgery read the order in which Qhull returned the tetrahedra, which changes when the same points come in another order. Every reconstruction now sorts the tetrahedra first. On the 47 benchmark masks (default configuration) 9 row orders gave 9 different meshes in the median case and now give one; against 0.7.0, 45 of the 47 meshes change by a few faces (median 13 of a few thousand), and foambryo's median relative tension error (
YoungDupre) goes from 0.0777 to 0.0763. Setcanonical_tetrahedron_order = Falseto reproduce 0.7.0's meshes on the same machine. - Masks with a lumen, a medium cut in two by the image, or a region too small for the tesselation are meshed differently, and were wrong before. An enclosed pocket of medium lined by two or more cells and at least
min_distance + 1voxels deep is now its own region, recorded as a medium (label_enclosed_media = Falsekeeps 0.7.0's behaviour); every piece of exterior gets its own seed; a seed that fell in a neighbouring region moves into its own, and a region with no tetrahedron of its own is absent from the mesh and named instead of growing as a phantom inside a neighbour. On a public 697-cell embryo with a lumen, one lining cell had 2.40 times its voxel volume; now every cell is within 0.903 to 1.024 times. Of 543 default meshes (the benchmark, two real embryo series, the test images) 533 are bit for bit unchanged. - Mesh surgery no longer leaves abnormal non-manifold edges by undoing its own repairs; none of the default route's 47 benchmark meshes changes; 4 of the 282 anisotropic benchmark meshes change by a few triangles, and 31 of the 84 meshes of simulated tissues at a real cell size change.
- The junction-protected configurations no longer depend on how SciPy breaks exact ties, so they place the same points on every machine; on macOS some of their meshes change by a point or a few.
- The Polyscope viewer drew the mirror image of the tissue, and now draws it the right way round. Only the picture changes: the mesh, its files and every number are unchanged. Screenshots taken with 0.7.0's viewer show the mirror image.
New¶
- Reports and warnings:
enclosed_medium_report,medium_labels,dw3d.find_enclosed_media;EnclosedMediumWarning(pockets left to the cells),UnresolvedCellWarning(regions absent from the mesh),AbnormalEdgeWarning(abnormal edges left in a finished mesh). The.recappendix records the media and the unresolved regions; foambryo 0.7.1 reads them. - Cross-machine checks: the golden master no longer depends on Qhull, and the test suites run on Linux x86-64 CI with the newest and the lowest supported dependencies.
What can mislead you¶
- Between machines, meshes may still differ at exactly cospherical points (five or more lattice points on one sphere), where Qhull's choice of tetrahedralisation itself differs; on one machine a reconstruction is reproducible.
- A small pocket of medium stays with the cells: below the size bound, or lined by a single cell (a hole in that cell's segmentation).
EnclosedMediumWarninglists them. - The points of 0.7.0's list still hold.
Known issues¶
- A cell cut by the image box can be absent from the mesh, and the crop report then names another cell (corrected on 4 November 2026: the first wording said the crop report missed the cell and that cell 1 gets a pressure). On a small test mask of four cells in a ball cut by the image box, the cells with voxels on the box are 1, 3 and 4. At the default
min_distance3 on cubic voxels, the watershed leaves cell 1 only its seed tetrahedron, mesh surgery removes it, and cell 1 is absent from the mesh, named only byCellVolumeDisagreementWarning; foambryo gives it no pressure.cut_cellsreports 2, 3 and 4, because cell 2 took most of cell 1. Checkcell_volume_reportfor cells listed as absent, andcut_cellsagainst the mask's own border labels. reconstruct_mask_from_dictdepends on the installed trimesh: the same mesh is subdivided into 1 901 565 vertices with trimesh 4.12.2 and 1 319 748 with 5.1.1, and the rebuilt masks differ by 509 to 819 voxels per test image. The mesh does not depend on trimesh.- dw3d 0.7.0 reads the new
.reckeys as strings: a file with media or unresolved regions written by 0.7.1 loads in 0.7.0, but itsmediaandunresolved_regionsare text. A file with neither is unchanged. - Mesh files keep the mask's column order,
(z, y, x). ParaView, MeshLab and other programs that read the columns as(x, y, z)show the mirror image of the tissue unless they exchange columns 0 and 2; so does napari in its default 3-D orientation.
Credits¶
Recent work on dw3d and foambryo is part of a collaboration with Alejandro Aguilera Castrejon (Janelia Research Campus, Howard Hughes Medical Institute). We thank him and his Janelia colleagues Adam L. Taylor, Wenhong Li and Francesco Roncato. Adam L. Taylor found the border-triangle winding defect fixed in 0.6.0 and pointed us to the seed-extraction and dense tension-solve bottlenecks on large tissues.
Release notes — 0.7.0, 17 October 2026¶
delaunay-watershed-3d (this repository) and foambryo ship together as 0.7.0, the first release on PyPI since 0.5.1. 0.6.0 was prepared but not published; its changes are part of 0.7.0 and are included below. This is what changes for you and what can mislead you; CHANGELOG.md has the full list, and foambryo's RELEASE_NOTES.md covers the inference side. Install with pip install --upgrade delaunay-watershed-3d foambryo.
What changes for you¶
set_pixel_sizescaled the wrong axes; results change when the xy and z sizes differ. dw3d's mesh points are in the mask's index order,(z, y, x)for a microscope stack, so column 0 is z.set_pixel_size(the function indw3d.mesh_utilities, the reconstruction method anddw3d.set_points_pixel_size) now scales column 0 by the z size and columns 1 and 2 by the xy size. Before, z was multiplied by the xy size and x by the z size. Re-run any analysis that called it with different xy and z sizes; with equal sizes nothing changes. A mask stored as(x, y, z)was scaled correctly before and is not now: transpose it to(z, y, x)before meshing.- Meshes of cells that touch the image border change, and were wrong before. The triangles that close a cell along the image border were wound the wrong way, so such a cell read too small a volume, often a negative one, and any tension or pressure computed from its mesh was wrong. On ten benchmark masks cut through their middle, 38 of the 54 cells on the cut had a negative volume before the fix and none after; the tensions foambryo infers from those meshes changed by up to 199 %, and every cell pressure by 37–139 %. Reconstruct again any mesh whose cells touch the image border, above all tissue cropped through its cells. Only the vertex order of the border triangles changes, and meshes whose cells stay clear of the border are unchanged (542 of 543 uncut masks bit-for-bit; the exception has two border triangles on one cell).
- A few triangles lying on flat tetrahedra change orientation (10 triangles in 8 cells on the 47 benchmark masks), so that every cell's volume now equals that of the tetrahedra it is made of.
- Junction relocation can no longer turn a very small cell inside out. Its guard now also refuses a move that would leave a cell it touches with a volume of zero or less;
relocation_reportcounts these refusals and names the cells. No mesh of the 47 benchmark masks, the resolution sweep, the cut masks or 484 embryo timepoints changes. - New warning,
CellVolumeDisagreementWarning. After every reconstruction, the cells whose mesh volume is outside 0.5–1.5 times their voxel count, non-positive, or missing are listed incell_volume_report. The interfaces of a listed cell are missing or misplaced, and a pressure inferred for it is not a measurement. Expect it on masks that hold many very small labels. - Faster on large tissues, with the same meshes. Seed extraction, the relocation guard and the trijunction-curve detection were rewritten; every mesh measured is bit-for-bit identical. On a 1 866-cell tissue meshed on its native grid, from mask to tensions with foambryo's sparse tension solve: 9.5 min instead of 47.5 min with 0.5.1, and a peak memory of 30.9 GiB instead of 54.7 GiB (one machine, nothing else running). The peak is now relocation's whole-mesh self-intersection check. The same tissue resampled to cubic voxels first (
construct_mesh_in_physical_units) costs more: its reconstruction takes about 13.5 min and 38 GiB. - No lock files.
uv.lockandlocked-requirements.txtare gone; the supported dependency ranges are those inpyproject.toml. - Viewing a mesh no longer rescales it.
plot_cells_polyscope(..., anisotropy_factor=...)with a factor other than 1 multiplied the reconstruction's own z column, so a mesh saved after viewing was scaled: reconstruct and save it again. Also:load_meshio_meshrefuses a file without labels with aValueError(it raisedKeyError), a binary.recfile always stores its points as float64, and a reconstruction no longer prints a SciPy deprecation warning. Reconstructions are unchanged, bit for bit (CHANGELOG.md). - Three deprecated names are removed.
get_offset_included_mesh_reconstruction_algorithm,get_offset_excluded_mesh_reconstruction_algorithmandget_cubic_score_mesh_reconstruction_algorithm(and the factory's methods of the same names), deprecated since 0.5.0, are gone. Callget_junction_protected_mesh_reconstruction_algorithm(), the same withexclude_offsets_from_surface=True, or the same withspline_order=3: the meshes are identical, bit for bit. - Higher minimum versions: numpy 2.0.0, scipy 1.13.0, scikit-image 0.23.1, edt 2.4.1, meshio 5.3.5 (polyscope 2.2.0 and matplotlib 3.8.4 for viewing), the oldest with which the test suite passes. Older numpy releases give slightly different meshes.
New¶
- Masks with voxels longer along z:
algorithm.construct_mesh_in_physical_units(mask, spacing)resamples the mask to cubic voxels of the shortest spacing by shape-based interpolation, meshes it, and returns the mesh in the unit ofspacing;save_to_rec_meshrecords the frame, the spacing and the resampling. Measured on 12 simulated tissues of 90 and 165 cells voxelised at a real cell size and down-sampled along z, against the same tissues meshed at full resolution: +0.83, +0.71 and +1.17 degrees of contact-angle error at z/xy ratios of 5/3, 2 and 3, against +1.38, +1.97 and +4.10 for meshing the native grid and scaling the mesh. - Crop faces and cut cells:
algorithm.crop_faces,algorithm.cut_cells,algorithm.crop_face_report,physical_image_faces;.recand.vtkfiles keep them. The mesh is unchanged, bit for bit. - A lighter distance transform and a faster tesselation graph; the meshes are bit for bit the same. The distance transform builds its masks in
uint8and its field infloat32(still returned asfloat64), and the tesselation graph is built without Python loops. Measured on one machine, on a 1 866-cell tissue: the distance transform's peak memory goes from 21.0 to 14.9 GiB (38.1 to 28.1 GiB when the mask is first resampled to cubic voxels), the face table and pairing from 7.8 to 1.8 s, the graph from 5.5 to 3.0 s; on a 2 000-cell synthetic foam the whole reconstruction goes from 200 to 186 s. The meshes, crop faces and cut cells of 481 masks and of two large tissues are bitwise identical before and after. Contributed by Wenhong Li and Adam L. Taylor.
What can mislead you¶
- Above a z/xy ratio of 3 nothing was measured:
UnmeasuredAnisotropyWarning, and the mesh is built anyway. min_distancecounts voxels of the resampled, cubic grid inconstruct_mesh_in_physical_units: the mesh, its time and its memory are those of a mask acquired at the short spacing, so they grow with the ratio.- A crop face is not contact with the medium. A program that does not read the crop-face key of a
.recfile reads a valid mesh in which the crop faces look like medium contact. - The limitations listed for 0.5.0 below still hold, except 7, which concerns foambryo and is fixed in its 0.7.0, and the end of 8: the faster neighbour search planned for 0.5.1 is in 0.7.0 (item 6 above), and on a 1 866-cell tissue the relocation guard takes 45 s instead of 6.6 min, with the same meshes (
CHANGELOG.md).
Credits¶
Recent work on dw3d and foambryo is part of a collaboration with Alejandro Aguilera Castrejon (Janelia Research Campus, Howard Hughes Medical Institute). We thank him and his Janelia colleagues Adam L. Taylor, Wenhong Li and Francesco Roncato. Adam L. Taylor found the border-triangle winding defect fixed in 0.6.0 and pointed us to the seed-extraction and dense tension-solve bottlenecks on large tissues.
Release notes — 0.5.1¶
0.5.1 is the final 0.5.0 (as on GitHub's master since 27 September), published again. The 0.5.0 wheel and source archive on PyPI were built from an earlier snapshot of the release: their licence metadata says CC BY-NC-SA 4.0 instead of GPL-3.0-or-later, the viewing extra still installs napari, and dw3d.viewing still has the napari viewer. GitHub's v0.5.0 tag points at that earlier snapshot too. Install 0.5.1 (pip install --upgrade delaunay-watershed-3d); 0.5.0 is withdrawn from PyPI (yanked). Reconstruction is unchanged: a mesh from 0.5.1 is the mesh the final 0.5.0 gives. The 0.5.0 notes below apply to 0.5.1 as they are.
Release notes — 0.5.0¶
delaunay-watershed-3d (this repository) and foambryo ship together as 0.5.0; foambryo 0.5.0 requires delaunay-watershed-3d>=0.5.0. This is what changes for you and what can mislead you; CHANGELOG.md has the full list, and foambryo's RELEASE_NOTES.md covers the inference side.
0.5.0 is the first release on PyPI since 0.3.6; CHANGELOG.md also lists the changes of 0.4.0–0.4.2, which were never published there.
Licence¶
From 0.5.0 delaunay-watershed-3d is licensed under the GNU General Public License, version 3 or (at your option) any later version (SPDX GPL-3.0-or-later), replacing CC BY-NC-SA 4.0: commercial use is allowed, under the GPL's conditions. Earlier releases keep the licence they were published under.
The one change that affects every mesh¶
Junction relocation is on by default, in every reconstruction configuration. After the mesh is built, its trijunction vertices are moved onto the trijunction curves the segmentation mask itself gives, under a guard that cannot create a self-intersection anywhere in the mesh. Triangles and material labels are unchanged; vertex positions on trijunction lines are not. Measured over 40 equilibrium benchmark cases, four spacings and four point samplers: junction-line position, tangent and curvature errors all improve with their confidence intervals clear of zero, and no mesh-validity number changes.
To get the 0.4 meshes back exactly:
algorithm = get_default_mesh_reconstruction_algorithm()
algorithm.relocate_junctions = False
or MeshReconstructionAlgorithmFactory().set_junction_relocation(False), or MeshReconstructionAlgorithm(..., relocate_junctions=False). Whether relocation ran on your mesh is in algorithm.relocation_provenance.
At min_distance >= 5 you will see CoarseSpacingRelocationWarning, once per reconstruction: at that spacing the check on surface-tangent contact angles showed a small drift within its own noise, and larger spacings are unmeasured; facet-based angles improve. If tangent-based angles matter for your analysis, compare with relocate_junctions=False.
Names removed and deprecated¶
Removed: get_v0_3_algorithm, get_a1b_algorithm, get_a3_a5_algorithm (use get_dithered_algorithm, get_deterministic_algorithm, get_junction_protected_algorithm). Removed without a deprecation period: dw3d.viewing.plot_in_napari, which already failed with napari 0.9.1; napari is no longer part of the viewing extra (Polyscope and matplotlib only). Deprecated, removed in 0.6.0: get_offset_included_algorithm, get_offset_excluded_algorithm, get_cubic_score_algorithm — exact synonyms of keyword calls on get_junction_protected_algorithm, which their warnings name.
Limitations¶
Every item is measured; each is one sentence and its number.
- The benchmark under-rewards tangent-based improvements. Its ground-truth meshes are facet-equilibrated (Surface Evolver), so an improvement in the surface-tangent description of a contact angle is scored against a facet-based truth and can read as no change.
- The second-order angle reader has its own floor, and it cannot resolve junction relocation's effect. On a perfectly smooth analytic surface it reads contact angles with a floor of 0.245°, and at every point spacing measured (0 of 32 spacing-by-variant cells) its check could not resolve the effect of junction relocation on tangent-based angles, in either direction.
- On real embryos, do not use second-order line means at sub-degree scale. The second-order reader covers a median 0.804 of incident trijunction faces on real embryo meshes (minimum 0.454), and its line means move by 1.75° [1.41, 2.17] when uncovered faces are excluded instead of filled by the chord reading.
- Real embryo cells are small in voxels, so every benchmark statement is about one spacing step optimistic for them. Their equivalent radius at trijunctions is a median 17.6 voxels against 38.2 in the benchmark, so real data at
min_distance 3sits where the benchmark sits atmin_distance 4; for cells this small, consider a smallermin_distance. - Folded trijunctions on real meshes are mostly real geometry. Real embryo meshes carry 3.2× the benchmark's fraction of reflex (folded) trijunctional edges, and more than half of them sit where the segmentation mask's own wedge already exceeds 180°.
- The force-balance residual
rho_freealarms on every reconstructed mesh. Its median is 0.578 on reconstructed meshes against 0.0118 on the reference meshes, so a high value on your mesh is expected and is not by itself a sign of a bad segmentation. ForceBalanceMAPis not scale-invariant, contrary to its docstring: rescaling a mesh moves its relative tensions by up to 43 %; plainForceBalanceis exact under rescaling.- Junction relocation, now on by default, has a cost that grows faster than linearly with mesh size. It adds about +0.75 s to a ~5 s benchmark reconstruction (+15 %) and 0.1–1.5 s per timepoint to a ~0.6 s real-embryo reconstruction (median 0.34 s and 0.48 s on two developmental time series, about 65 s per 154-timepoint series); within one real series it grows with triangle count with a fitted exponent of 2.68 over a 2.2-fold range of mesh sizes, which is not a tissue-scale law. A faster neighbour search is planned for 0.5.1, and will leave every relocated mesh bit-for-bit unchanged.