Skip to Content.
Sympa Menu

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

Subject: CGAL users discussion list

List archive

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


Chronological Thread 
  • From: Josip Dzolonga <>
  • To:
  • Subject: [cgal-discuss] A Delaunay-Based Region Growing Algorithm
  • Date: Tue, 13 Oct 2009 02:51:21 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=lcQvumtkKvJSSaMf7jSm63cog0fQHAPwJeg2qSIUUW4eZ++EYE3tg6rpOn931AT7vT mXeWBDxjmLGsNL+CXZmYFWhhKEXFOnaTgpsW8L0rwnOYcko9npKXKQRUVJIe+cB84GCc E7q1lCP29saUaIbCIBoWg+wgv2ka0Om/1GX1k=

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



Archive powered by MHonArc 2.6.16.

Top of Page