fangq / iso2mesh

Iso2Mesh - a 3D surface and volumetric mesh generator for MATLAB/Octave
http://iso2mesh.sf.net
Other
181 stars 73 forks source link

CGAL Surface_mesher and Mesh_3 may miss isolated inclusions #7

Open fangq opened 9 years ago

fangq commented 9 years ago

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 commented 9 years ago

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

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,

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 commented 9 years ago

A workaround is provided in FAQ#9.

fangq commented 5 years ago

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.

lrineau commented 5 years ago

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