Skip to Content.
Sympa Menu

cgal-discuss - Re:[cgal-discuss] A Delaunay-Based Region Growing Algorithm

Subject: CGAL users discussion list

List archive

Re:[cgal-discuss] A Delaunay-Based Region Growing Algorithm


Chronological Thread 
  • From: sanlington <>
  • To: cgal-discuss <>
  • Subject: Re:[cgal-discuss] A Delaunay-Based Region Growing Algorithm
  • Date: Tue, 13 Oct 2009 10:37:14 +0800 (CST)

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主流网游《天下贰》,网易六年亿资打造



Archive powered by MHonArc 2.6.16.

Top of Page