Subject: CGAL users discussion list
List archive
[cgal-discuss] CGAL Problem when generating mesh (make_mesh_3) from segmented 3d image
Chronological Thread
- From: gori23 <>
- To:
- Subject: [cgal-discuss] CGAL Problem when generating mesh (make_mesh_3) from segmented 3d image
- Date: Mon, 23 Nov 2015 06:02:46 -0800 (PST)
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=SoftFail ; spf=None
- Ironport-phdr: 9a23:9kKi4BRYdKDKYqZNOu5I4Z8NT9psv+yvbD5Q0YIujvd0So/mwa64YRWN2/xhgRfzUJnB7Loc0qyN4/2mBjRLvMjJmUtBWaIPfidNsd8RkQ0kDZzNImzAB9muURYHGt9fXkRu5XCxPBsdMs//Y1rPvi/6tmZKSV3BPAZ4bt74BpTVx5zukbviptuMO04V2nKUWvBbElaflU3prM4YgI9veO4a6yDihT92QdlQ3n5iPlmJnhzxtY+a9Z9n9DlM6bp6r5YTGZPTJPppCOUARHR9azh0t4XXskzIQgKLo3cdSW4LiQFgAg7f7Ri8UI2inDH9s79y3zObZ5a+GaszVHK5871iVQTzoCgCPj89tmrQj5oj3+pgvBu9qkkmkMbva4aPOa8lJvvQ
Hi all,
I hope somebody can help me with my problem(s)
I am trying to extract the surfaces of the domains from a segmented 3d
image. So my input is a 3d voxel image (e.g. the liver_gallbladder inr
image). Then my plan was to run make_mesh_3 and to extract the surfaces.
I've ran into the following problems:
Somehow it only works when I open the inr file from a folder, like in the
examples on the CGAL manual pages:
// Loads image
CGAL::Image_3 image;
image.read("data/liver.inr.gz");
I tried to generate the Image_3 by myself using sth like this
_image* im = ::_initImage();
im->vectMode = VM_SCALAR;
im->xdim = xdim;
im->ydim = ydim;
im->zdim = zdim;
im->vdim = 1;
im->vx = vxSize.x();
im->vy = vxSize.y();
im->vz = vxSize.z();
im->endianness = ::_getEndianness();
im->wdim = sizeof(uint8_t);
im->wordKind = WK_FIXED;
im->sign = SGN_SIGNED;
im->data = volumearray;
(volumearray a pointer to the data array)
However, using my code the program gets stuck in make_mesh_3 without further
output or termination.
The second problem occurs later at the stage where I want to extract the
surface of the domains. So my aim is to get the CGAL tetrahedrization, to
throw away the tetrahedra and to keep only the surface triangles.
I tried different approaches (e.g. to loop through all facets, getting the
facets surface patch index (C3t3::Surface_patch_index sp =
c3t3.surface_patch_index(f);) and generating my surface mesh from these
vertices/triangles.
However, the result seems wrong/incomplete. In general it seems ok (as in it
resembles the surface of a domain), but there are holes in the mesh, missing
walls between domains and different domains have vertices/triangles that
dont match their neighbours (intersecting triangles).
Maybe somebody can give me a hint here on how to extract the information.
If something is not clear or you need more of my code, let me know.
Cheers,
gori23
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/CGAL-Problem-when-generating-mesh-make-mesh-3-from-segmented-3d-image-tp4661387.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] CGAL Problem when generating mesh (make_mesh_3) from segmented 3d image, gori23, 11/23/2015
- Re: [cgal-discuss] CGAL Problem when generating mesh (make_mesh_3) from segmented 3d image, Pádraig Ó Conbhuí, 11/23/2015
Archive powered by MHonArc 2.6.18.