Subject: CGAL users discussion list
List archive
- From: "Laurent Rineau (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] surface extraction
- Date: Wed, 23 Nov 2011 16:39:01 +0100
- Organization: GeometryFactory
Le mercredi 23 novembre 2011 13:12:39 elhassan Abdou a écrit :
> Dear All
>
> I am a newbie in CGAL. I read the 3D surface mesh generation. I want the
> Surface_3 to read from 3D array not from Gray_level_image. Can anyone help
> me with this.
Here is the use of undocumented functions, if 'data_pointer' is the pointer
to
your array:
CGAL::Image_3 image(_createImage(dimx, dimy, dimz, 1,
spacing_x, spacing_y, spacing_y,
1, WK_FIXED, SGN_UNSIGNED));
ImageIO_free(image.data());
image.set_data(dat_pointer);
The last three parameters "1, WK_FIXED, SGN_UNSIGNED" mean "unsigned char".
Have a look at <CGAL/ImageIO.h> and src/CGALImageIO/ImageIO.cpp for the ugly
details.
_createImage+ImageIO_free is not efficient. You can have a look at those
functions, and copy/paste the code you need, to avoid the
allocation/deallocation of a buffer of size dimx×dimy× dimz.
--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory http://www.geometryfactory.com/
Release Manager of the CGAL Project http://www.cgal.org/
- [cgal-discuss] surface extraction, elhassan Abdou, 11/23/2011
- Re: [cgal-discuss] surface extraction, Laurent Rineau (GeometryFactory), 11/23/2011
Archive powered by MHonArc 2.6.16.