Subject: CGAL users discussion list
List archive
- From: Dominik Szczerba <>
- To:
- Subject: Re: [cgal-discuss] connectivity of a tet mesh generated from image
- Date: Thu, 9 Feb 2012 14:18:14 +0100
Thank you, this is very useful.
Still one question though: what is ci->neighbor(i) supposed to return
if a cell does not have a neighbor i? I tried testing against NULL,
but it does not seem to be the case. I also tried
ci->has_neighbor(ci->neighbor(i) but this seems to always return true.
Thanks for any hints,
Dominik
On Thu, Feb 9, 2012 at 11:18 AM, Laurent Rineau (GeometryFactory)
<>
wrote:
> 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/
>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://lists-sop.inria.fr/wws/info/cgal-discuss
>
--
Dominik
- [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.