Subject: CGAL users discussion list
List archive
- From: "Laurent Rineau (CGAL/GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Re: Image_3 from a std::vector
- Date: Fri, 01 Jun 2012 18:52:12 +0200
- Organization: GeometryFactory
Le vendredi 01 juin 2012 09:38:38 slaughter a écrit :
> If inputting data with the set_data member, how should the data be
> organized?
Like in a 3D array, by xy-slices. See the following function in
<CGAL/ImageIO.h>:
template <typename Word>
inline
Word
static_evaluate(const _image* image,
const unsigned int i,
const unsigned int j,
const unsigned int k)
{
return ((Word*)image->data)[(k * image->ydim + j) * image->xdim + i];
}
The first words in the image are those for k==0, y==0, and x varying. Then xy-
varying.
I do not know if that answer your question. I am not a specialist in 3D
images
representations.
--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory http://www.geometryfactory.com/
Release Manager of the CGAL Project http://www.cgal.org/
- [cgal-discuss] Re: Image_3 from a std::vector, slaughter, 06/01/2012
- Re: [cgal-discuss] Re: Image_3 from a std::vector, Laurent Rineau (CGAL/GeometryFactory), 06/01/2012
Archive powered by MHonArc 2.6.18.