Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Meshing a 3D labelled image for visualisation purposes/exuding TIME_LIMIT_REACHED without setting a time limit

Subject: CGAL users discussion list

List archive

[cgal-discuss] Meshing a 3D labelled image for visualisation purposes/exuding TIME_LIMIT_REACHED without setting a time limit


Chronological Thread 
  • From: Nicolas Cedilnik <>
  • To:
  • Subject: [cgal-discuss] Meshing a 3D labelled image for visualisation purposes/exuding TIME_LIMIT_REACHED without setting a time limit
  • Date: Fri, 26 Mar 2021 07:39:03 +0100
  • Ironport-hdrordr: A9a23:IAEM9KCO4rgURbblHeli55DYdL4zR+YMi2QD/UZ3VBBTb4i8n8ehgPwU2XbP+VUscVsnns2NP7TFfGPE+fdOgbU5EL++UGDd11eAA5pl6eLZqQHIPw3b2qpj2bx7c654YeeQMXFfgdzh6Ae1V/YMqePqzImSie3Tz2hgQGhRAsldxj1kAQWWGFAefmR7LKc+faD22uN6vTa6PVwYYsOnb0NqY9T+

Hi all,

I need to mesh a 3D labelled image for visualisation purposes. My first approach was to use marching cubes for each label, and then apply Laplacian smoothing on the vertices (as available in VTK). This lead to a nice, smooth outer surface of the mesh, but did not preserve the "common interface" between labels, something I expected since the smoothing is done on each "label mesh" individually.

I then attempted to use the following CGAL's `make_mesh_3` to create a tetrahedral mesh from the labelled image. It was particularly useful that I can set up different cell sizes based on the label indices, because the volumes of the different labelled structures are very different. However, I am struggling to get a smooth outer mesh surface (and smooth labels interfaces). Despite playing with the different parameters: it is still possible to "see" the voxels from the labelled image input, something that I specifically need to avoid.

I found similar questions in the mailing list archives [1,2] but the solutions did not seem to have an effect in my case. [1] suggests to increase facet_distance (which did not seem to work for me) and [2] to set a smaller value for "Mesh_domain second parameter". If this is the `relative_error_bound` parameter in `create_labeled_image_mesh_domain` [3]?, I tried setting it from 1e-3 to 1e-6 but again it did not work for me.

I also experience another (unrelated?) issue with the exuding phase. Despite not setting a time limit, it always ends with `TIME_LIMIT_REACHED`, leaving a high number of #cells left. I do not think this would improve smoothness of my mesh, but it still bugs me. Is this a known issue? Return code is reached after a different "total exuding time" depending on the facet sizes I choose, so I don't really understand what is happening here. Example output:

Exuding...
Legend of the following line: (#cells left,#vertices pumped,#vertices ignored)
(937867,42636,500184) (22868.0 vertices/s))
Total exuding time: 21.8727s
Exuding return code: TIME_LIMIT_REACHED

Do you have any advice for me? Should I try to implement a "Laplacian smoothing preserving interfaces between label" or am I misusing make_mesh_3 advanced features? Mesh quality as defined in CGAL is quite different from the quality I need, since my problem is exclusively geared towards visualisation.

I am using libcgal-dev 5.2-3 from debian unstable repository, my labelled image voxel size is 0.8×0.8×0.8 mm and I am targetting cell sizes ranging from 0.25 to 1 depending on the labels (but I could change this target if it results in something better from a visual perspective).

Thanks for reading me, any suggestion/clue/idea will be greatly appreciated!

-- Nicolas

[1] http://cgal-discuss.949826.n4.nabble.com/Surface-Smoothing-after-Mesh-Generation-td4661945.html
[2] http://cgal-discuss.949826.n4.nabble.com/How-to-smooth-surface-mesh-of-volume-mesh-from-3d-image-td4663280.html
[3] https://doc.cgal.org/latest/Mesh_3/classCGAL_1_1Labeled__mesh__domain__3.html#a2d77aff36bbb720190b01e3d36f76a67



  • [cgal-discuss] Meshing a 3D labelled image for visualisation purposes/exuding TIME_LIMIT_REACHED without setting a time limit, Nicolas Cedilnik, 03/26/2021

Archive powered by MHonArc 2.6.19+.

Top of Page