Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Re: failed to read an OFF file

Subject: CGAL users discussion list

List archive

[cgal-discuss] Re: failed to read an OFF file


Chronological Thread 
  • From: Qianqian Fang <>
  • To:
  • Cc:
  • Subject: [cgal-discuss] Re: failed to read an OFF file
  • Date: Fri, 12 Sep 2008 18:28:24 -0400
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=DqGVlI/kRbMzxlUoTtninsRLCGD9itsACg8g18sUi9d2VQBXmFBBcglROpMKw5+8RG 48ZVixYg4PTbCkF/5TO3wDW01jD7oFPJeNo1uH+co4K45o6m4i8sLQqlrJEUYNJuBCDH 5ANnEGY3VWo1tdZk2ZVWkfr76M+JRQ2SroDMY=

thank you Pierre for your prompt reply and help.

I tried your new mesh with the cgal surface mesh simplification code. But
strangely, it exited with the error message "CGAL error: precondition
violation!".

Indeed, I am not really worry about this particular mesh. My real goals are
to understand the deficiency for the mesh produced by matlab's isosurface,
and being able to repair it automatically (for any 3D volume).

To explain it more, I am writing a meshing tool to create 3D tetrahedral
mesh from any binary volumetric image, for example, a thresholded
image from a MRI scan of a human head. So far, I have been coded
a matlab script to do the followings:
1. extract the surfaces from the binary volume image using matlab's isosurface
2. resample the surface calling CGAL's surface mesh simplification code
3. dump the simplified surfaces (must be closed surface, adding the bounding box
cut-out to make it close if necessary) into piecewise linear complexies (see [1])
4. call tetgen [2] externally to produce tetrahedral mesh from the boundaries

tetgen seems to be working fairly robustly. The mesh simplification was mostly causing
problems. In this case, it was matlab's isosurface produced problematic mesh
base on your comments. I am seeking either alternative path to do the above
work-flow, such as completely using CGAL as you suggested, or trying to figure
out what's wrong with matlab's isosurface (this is indeed preferred, as it is already
working for most of my cases, except for one or two as I reported earlier).

Comparing your modified mesh, I saw you added some duplicated nodes,
can you share me with more details on why the original matlab's mesh failed?
and is there a way to fix it automatically?

If using CGAL exclusively for my above workflow, are there examples to produce
surface mesh from a binary volumetric image? If it is not difficult to
deal with this in CGAL, I might consider the alternative path instead.

thank you

Qianqian

[1] http://tetgen.berlios.de/plc.html
[2] http://tetgen.berlios.de/

Pierre Alliez wrote:
apparently the matlab marching cubes is just bad - there exists some better marching cubes which guarantee 2-manifold - the attached mesh is better I think - but my fix was manual.


perhaps you could start considering CGAL surface mesh generator?



Qianqian Fang a écrit :
the modified mesh works ok with the surface mesh simplification program. However, the results after the operation present edges. We are expecting a closed surface for this mesh before and after the simplification.

I apologize that I don't have much experience with CGAL and can not put up with a "incremental builder" quickly to find out the error message. I am really curious to know what are the problems with the original mesh (it was produced from isosurface in matlab). Any tips for fixing this type of problems is also appreciated.

Qianqian

On Thu, Sep 11, 2008 at 1:48 AM, Pierre Alliez < <mailto:>> wrote:

your mesh was corrupted (see message of the incremental builder).
the attached one is a bit fixed - is it better?

it has boundary though.

-- Pierre Alliez
INRIA Sophia Antipolis - Mediterranee
http://www-sop.inria.fr/geometrica/team/Pierre.Alliez/
Tel: +33 4 92 38 76 77
Fax: +33 4 97 15 53 95








Archive powered by MHonArc 2.6.16.

Top of Page