iso2mesh icon indicating copy to clipboard operation
iso2mesh copied to clipboard

CGAL Surface_mesher and Mesh_3 may miss isolated inclusions

Open fangq opened this issue 9 years ago • 4 comments

The previous report can be found here:

http://cgal-discuss.949826.n4.nabble.com/missing-objects-when-meshing-a-3D-image-with-multiple-disconnected-inclusions-td3349283.html

Testing image is included in the above report.

Basically, if there are multiple isoloated inclusions (same or differnt label) inside a background volume of index 0, the surface mesher or 3D mesher may return the mesh of a subset of these inclusions in a more or less random manner.

fangq avatar Jun 12 '15 21:06 fangq

the latest CGAL release (4.6) still has trouble processing the test dataset provided in the original bug report (fivespheres.inr.gz).

Here are the steps to reproduce

  • compile CGAL 4.6
  • cd examples/Mesh_3/data, download and save the fivespheres.inr.gz file
  • apply the following patch to mesh_3D_image.cpp
37c37,38
<   image.read("data/liver.inr.gz");
---
> //  image.read("data/liver.inr.gz");
>   image.read("data/fivespheres.inr.gz");
43c50
<   Mesh_criteria criteria(facet_angle=30, facet_size=6, facet_distance=4,
---
>   Mesh_criteria criteria(facet_angle=30, facet_size=0.1, facet_distance=1,
  • make mesh_3D_image
  • run mesh_3D_image
  • load the out.mesh file, it contains only two connected voxel-like object (pointed by arrow in the attached image), and all spheres are not shown.
  • changing facet_size and other criteria subfields did not change the shape of the output.

cgal_4 6_output_compare_to_truth

In the above attached image, the 5 colored spherical objects are expected inclusions; however, none of them are shown in the output mesh (a small cluster pointed by arrow).

fangq avatar Jul 04 '15 20:07 fangq

A workaround is provided in FAQ#9.

fangq avatar Jul 04 '15 20:07 fangq

this issue seemed to have been resolved in CGAL 4.14 and later using the new interface for custom initialization, see

https://doc.cgal.org/latest/Mesh_3/index.html#title26

I would consider this issue resolved, but we need to update the mesh_3d_image using the newly added feature.

fangq avatar Oct 18 '19 21:10 fangq

Let me know if you need any help with that tasks. I am the main maintainer of CGAL mesh packages.

lrineau avatar Oct 19 '19 13:10 lrineau