Subject: CGAL users discussion list
List archive
- From: "Chenes Christophe (HES)" <>
- To: "''" <>
- Subject: [cgal-discuss] make_surface_mesh with speicifc label
- Date: Tue, 20 Nov 2012 08:41:45 +0000
- Accept-language: fr-CH, en-US
Dear all,
I’m currently working on a remeshing tool which use CGAL make_surface_mesh to mesh a labeled image to a surface mesh. For now, my tool works only if there is a single label in the image but I need to enable multi-label meshing.
More specifically, I have a 3D labeled image (unsigned char) with two labels: 100 and 255; and I want to create a surface mesh for one of the two labels.
My code:
Tr tr; C2t3 c2t3 (tr);
// label ? Gray_level_image image(img3, label);
// Here I chose cx,cy,cz precisely so it is inside the label part GT::Point_3 bounding_sphere_center( cx, cy, cz ); GT::FT bounding_sphere_squared_radius = radius * radius; GT::Sphere_3 bounding_sphere(bounding_sphere_center, bounding_sphere_squared_radius);
// Criteria CGAL::Surface_mesh_default_criteria_3<Tr> criteria( angle, size, dist );
// Meshing CGAL::make_surface_mesh(c2t3, surface, criteria, CGAL::Manifold_tag());
This code returns a surface mesh but always for the 255 label even if I specify the 100 label as input…
Is it right to specify the label in the Gray_level_image?
One solution would be to threshold the input image with vtk before giving it to CGAL but it might be easier (and faster?) to directly do it with CGAL.
Thanks in advance for your help/advices.
█ Christophe Chênes ▪ Assistant de Recherche HES Filière Technique en radiologie médicale Haute école de santé ▪ Avenue de Champel 47 ▪ 1206 Genève Direct +41 22 388 66 91
|
- [cgal-discuss] make_surface_mesh with speicifc label, Chenes Christophe (HES), 11/20/2012
Archive powered by MHonArc 2.6.18.