Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] 3D mesh indexes

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] 3D mesh indexes


Chronological Thread 
  • From: Yann Cobigo <>
  • To: "" <>
  • Subject: Re: [cgal-discuss] 3D mesh indexes
  • Date: Sat, 14 Dec 2013 17:07:01 +0000 (GMT)
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=naTgNF0yfIvtnLiIaim0kW/+GM5zpcgYnRTQC30iBP/HXBbC2IlCPZRm91Gd+zwM4UR1Vek1S4ajKJ2lWov7rmugeG+34w2nqE5NHa+EiPzCRHk6VnoKGIGBFJikEickrWgGemg+DpiUc1gmL2hlM5QSRbsHkL42MTdwAkFK1dY=;

Hi,

I think I found my mistake. I took some peaces of code from an oracle without controlling each lines...

My mistake,

Best regards,

Yann


On Friday, December 13, 2013 9:45 PM, Yann Cobigo <> wrote:
Hi again,

I must do something wrong ... Here is the procedure:

  //
  // Loads image
  CGAL::Image_3 image;
  image.read( "file.inr" );

  //
  // Domain
  Mesh_domain domain(image);

  //
  // Mesh criteria
  Mesh_criteria criteria( facet_angle=25, facet_size=1., facet_distance=.5,
                                      cell_radius_edge_ratio=2., cell_size=8. );
 
  //
  // Meshing
 C3t3 mesh_ = CGAL::make_mesh_3<C3t3>(domain, criteria);

// Check if my subdomain is present
  const Triangulation& triangulation = mesh_.triangulation();
  Cell_pmap             cell_pmap( mesh_ );
  Facet_pmap           facet_pmap( mesh_, cell_pmap );
  Vertex_pmap          vertex_pmap( mesh_, cell_pmap, facet_pmap );

  for( Cell_iterator cit = mesh_.cells_in_complex_begin() ;
        cit != mesh_.cells_in_complex_end() ;
       ++cit )
    {
      std::cout << cell_pmap.subdomain_index( cit ) << std::endl;
    }

The result gives me 1, 2, 3, ..., 21 indexes. I should have 100, but it is not present. Instead, when I vizualize the mesh, cells with index 21 are in the volume 100 from the labeled image file.inr.
Any hint?

Best regards,

Yann 


On Friday, December 13, 2013 2:15 PM, Yann Cobigo <> wrote:
Hi,

Thank you for your quick response. I must have messed up some place ... I will come back to you if I have more information that confirms my question.

Best regards,
Yann



On Friday, December 13, 2013 6:24 AM, Laurent Rineau (CGAL/GeometryFactory) <> wrote:
Le Friday 13 December 2013 02:21:45 Yann Cobigo a écrit :

> Hi everyone,
>
> I try to produce a tetrahedral mesh (M3D) based on a file file.inr (I3D). In
> this purpose, I use the example Mesh_3/mesh_3D_image.cpp.
>
>
> My image, I3D, is divided into n domains with indexes: {i_{d}}_{d = 0 ..
> n-1}.
>
> If my domains' indexes are consecutive, i.e. i_{0} = 0, i_{1} = 1, i_{2} =
> 2, ..., i_{n-1} = n-1, the tetrahedrization produces a mesh M3D with the
> same index nomenclature for the domains: m_{1} = 1, m_{2} = 2, ..., m_{n-1}
> = n-1.
>
> On the other hand, if ths image I3D domains' indexes are not consecutive,
> i.e. i_{0} = 0, i_{1} = 1, i_{2} = 13, ..., i_{n-1} = N, the indexes of the
> mesh no longer respect the same I3D nomenclature: m_{1} = 1, m_{2} = 2,
> ..., m_{n-1} = n-1, instead of m_{1} = 1, m_{2} = 13, ..., m_{n-1} = N.
>
> Is there a way to ensure that the mesh domains' indexes m_{d} be the same as
> the image domains' indexes i_ {d}?


I am surprised. The subdomain indices should be the same in the 3D mesh
produces by CGAL (M3D) and the one in the 3D labellized image. Can you show us
the code you use to produce and export/read the CGAL tetrahedral mesh?

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory          http://www.geometryfactory.com/
Release Manager of the CGAL Project      http://www.cgal.org/


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss











Archive powered by MHonArc 2.6.18.

Top of Page