Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] impressions from the new multi-domain mesher

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] impressions from the new multi-domain mesher


Chronological Thread 
  • From: Stephane Tayeb <>
  • To:
  • Subject: Re: [cgal-discuss] impressions from the new multi-domain mesher
  • Date: Thu, 27 Aug 2009 16:43:19 +0200

Hi,

Dominik Szczerba wrote:
Hi Stephane,


1) on the provided mesh_3D_image example of the liver: changing size and approximation criteria has no effect on the output mesh

Could you give more details please ? For example can you see any difference between
Facet_criteria(30,6,1) and Facet_criteria(30,6,4) ?

I see almost not difference between e.g. Facet_criteria(30,6,4) and Facet_criteria(30,6,10). But ineed, if I experiment more also with the other parameters I seem to be getting the rules.

Sometimes some parameters are stronger than others. It may be the case here. Perhaps size criterion (which is set to 6) is more restrictive than approximation criterion for values > 4.


2) in the liver example, the boundaries are very noisy; the difference to just interpolating the labels onto a non-conformally generated mesh is not striking.

The edges are noisy (they are not handled by Mesh_3, for now). Surfaces should be ok, if you don't try to over approximate them. The image grid will be visible if the mesh resolution is too high.

True, with smaller resolution the surface is smoother, thanks for a hint. However, I start losing features then. A curvature/proximity refinement rules would be good to have here. But I guess this is just a feature of this method for now.

I'm not sure to understand. The approximation error is a curvature refinement rule. It is a bound on the distance between the center of the surface facet (i.e. center of the circumcenter of the triangle) and intersection point between the voronoi edge of this facet and the surface.

3) the labels in the output seem shuffled: they do not seem to correspond properly to the image label information. It means I can not identify my domains from the original label tags.

This is right. Subdomain (int) and surface indices (std::pair<int,int>) are mapped to int when writing the output. For example, if subdomains are {1,7,12} and surfaces are {<1,7>, <7,12>, <0,12>} (0 is the outside), medit writer may remap as follows :
1 -> 1
12 -> 2
7 -> 3
<1,7> -> 4
<7,12> -> 5
<0,12> -> 6

There is a flag (CGAL_MESH_3_IO_VERBOSE) which makes medit writer verbose. This may help you.

Thanks, but I would actually like to 1) preserve my original IDs (I maintain a global map integer<->string) and 2) bypass the stony medit format and save my mesh directly into hdf5 or at least compressed XML VTK (I have detailed whole body models here and can't afford any ASCII). Could you please point me to an example how I can retrieve the mesh AND the ORIGINAL labels? As I can see from the mailing list archives I do not seem to be the only person puzzled by this seemingly simple task... :)

c3t3 object describes the mesh and allows to get the mesh and the original labels. Actually, original labels are stored into c3t3 as subdomain indices of cells (note that they may be cast from unsigned char to int). And surface indices of facets are a pair of two original labels (e.g. if facet is between subdomain 1 and 2, it stores <1,2> as surface index).

You can find in MeshComplex_3InTriangulation3 documentation page how to access these indices. Or you can take a look in CGAL/IO/File_medit.h to see how it is done to write in medit format.

Regards,

--
Stephane Tayeb
Software engineer - INRIA Sophia Antipolis
Geometrica Project-Team




Archive powered by MHonArc 2.6.16.

Top of Page