Subject: CGAL users discussion list
List archive
- From: "Laurent Rineau (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] connectivity of a tet mesh generated from image
- Date: Thu, 09 Feb 2012 11:18:34 +0100
- Organization: GeometryFactory
Le jeudi 09 février 2012 11:03:38 Dominik Szczerba a écrit :
> Hi,
>
> I am generating a tet mesh directly from a segmented medical image
> more or less like
>
> C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria);
> const Tr& tr = c3t3.triangulation();
>
> I am then converting it to another required representation more or less
> like:
>
> for( Finite_vertices_iterator vit = tr.finite_vertices_begin();
> vit != tr.finite_vertices_end();
> ++vit)
> {
> // get vertices
> }
>
> for( Cell_iterator cit = c3t3.cells_begin() ;
> cit != c3t3.cells_end() ;
> ++cit )
> {
> // get cells
> }
>
> Now my question is: is there also cell connectivity (which cell has
> which neighbours) available in c3t3 after the mesh has been created?
> By "available" I mean that this information be already available for
> quick extraction, I do NOT mean its dedicated (lengthy) computation
> afterwards.
Sure.
c3t3.triangulation() is a full CGAL triangulation.
Given a Cell_handle, or any cell iterator, let's call it 'ci', you can call:
ci->neighbor(i) // for i in {0, 1, 2, 3}
See the documentation of the Cell type here:
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/TriangulationDS_3_ref/Concept_TriangulationDSCellBase_3.html
Here is the corresponding short link:
http://bit.ly/wGwmY3
--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory http://www.geometryfactory.com/
Release Manager of the CGAL Project http://www.cgal.org/
- [cgal-discuss] connectivity of a tet mesh generated from image, Dominik Szczerba, 02/09/2012
- Re: [cgal-discuss] connectivity of a tet mesh generated from image, Laurent Rineau (GeometryFactory), 02/09/2012
- Re: [cgal-discuss] connectivity of a tet mesh generated from image, Dominik Szczerba, 02/09/2012
- Re: Re: [cgal-discuss] connectivity of a tet mesh generated from image, Laurent Rineau (GeometryFactory), 02/09/2012
- Re: [cgal-discuss] connectivity of a tet mesh generated from image, Dominik Szczerba, 02/09/2012
- Re: [cgal-discuss] connectivity of a tet mesh generated from image, Laurent Rineau (GeometryFactory), 02/09/2012
Archive powered by MHonArc 2.6.16.