Subject: CGAL users discussion list
List archive
- From: Josip Dzolonga <>
- To:
- Subject: Re: [cgal-discuss] A Delaunay-Based Region Growing Algorithm
- Date: Tue, 13 Oct 2009 11:42:43 +0200
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=dcthp520KgUW8KU7rT1sI6JmSKKx3z16XZvFP+m79zjiuDQDfcxUvWRAc0+ILmvSPu +Gjth/ichOnqrE7ktsRJukvLxCfpnIzdU0W1PFsSwTgvlFzXmqzdhFlxled9h86N4NRk 5R5qfrTEoM7v4nKv5YC4gGzt8A0FPChYUFMnk=
But there is no function that just accepts a facet, I also need an edge and I can't see how to extract the edges from a facet. Should I go over all edges with finite_edges_begin and then see to which triangle facet belong?
2009/10/13 sanlington <>
hi,
do you mean you want to get the facets incident to the interested facet(triangle) ? if so, try the incident_facets(...) functions in Triangulation_3 class, they are also available in Delaunay_triangulation_3 class. (cgal_manual/Triangulation_3_ref/Class_Triangulation_3.html)
Besides, if you transfer a facet to triangle,the neighbor information would be lost, so maybe you shoud "push_back" the facet, not the triangle, for the sequential neighborhood operation.
在2009-10-13,"Josip Dzolonga" <> 写道:
Dear all,
I have been recently introduced to CGAL, and I am using it to perform a Delaunay-Based Region Growing algorithm on an unorganized point cloud. The algorithm goes as follows
1) Compute the Delaunay triangulation (I am using the CGAL::Delaunay_triangulation_3 class) and add all facets to a list with the following code
// T - of type CGAL::Triangulation_hierarchy_3
// Triangle is from CGAL::Triangulation_hierarchy_3
for (Finite_facets_iterator iter = T.finite_facets_begin();
iter != T.finite_facets_end(); iter++){
Triangle triangle = T.triangle(*iter);
if (TrigPerimeter(triangle) < MAX_PERIMETER) // Skip over the big triangles
triList->push_back(triangle);
}
}
2) Choose a seed (the triangle with a vertex having the largest Z coordinate and the smallest circumdistance) and put in a priority queue Q where the priority is based on a heuristic
3) Take a triangle from Q and attach to it one of its best neighbours.
I have successfully done 1 and 2, however I am getting stuck on 3. Namely, as I am keeping all the triangles in a list of type list<Triangle>, I can't see how to get the neighbouring triangles of some element in the list. I really tried to browse the manual, but can't find anything that might be helpful. Can you also point me to some relevant examples that do something similar to this? I tried the official examples but there was no access to neighbouring facets.
Thank you in advance,
Josip
09年新晋3D主流网游《天下贰》,网易六年亿资打造
- [cgal-discuss] A Delaunay-Based Region Growing Algorithm, Josip Dzolonga, 10/13/2009
- Re:[cgal-discuss] A Delaunay-Based Region Growing Algorithm, sanlington, 10/13/2009
- Re: [cgal-discuss] A Delaunay-Based Region Growing Algorithm, Josip Dzolonga, 10/13/2009
- Re: [cgal-discuss] A Delaunay-Based Region Growing Algorithm, sanlington, 10/13/2009
- Re:[cgal-discuss] A Delaunay-Based Region Growing Algorithm, sanlington, 10/13/2009
Archive powered by MHonArc 2.6.16.