Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] how to use Image_3::labellized_trilinear_interpolation() properly
Chronological Thread
- From: "Laurent Rineau (CGAL/GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] how to use Image_3::labellized_trilinear_interpolation() properly
- Date: Wed, 10 Oct 2012 09:24:06 +0200
- Organization: GeometryFactory
Le mardi 09 octobre 2012 13:40:08 Hamid G a écrit :
> Hello,
>
> I've been trying to use labellized_trilinear_interpolation() to get label
> values of a given point in an Image_3 object,
> and I haven't been successful.
>
> To give you an example, let's say I want to find out the label for Point(0.,
> 0., 57.) in provided image stack "liver.inr.gz".
> So I took the code in examples/Mesh_3/mesh_3D_image.cpp and just added the
> following line after reading in the image in line 32:
[...] nabble forgot to send us your line. It was:
> int label = image.labellized_trilinear_interpolation(0., 0., 57., 0);
The word type of liver.inr.gz is unsigned char. So, use that:
unsigned char label =
image.labellized_trilinear_interpolation(0., 0., 57., (unsigned char)0);
That way, the template parameter Image_word_type, is automatically deduced to
unsigned char, that is the type of the fourth parameter you pass to the
function.
By curiosity, what are you doing using CGAL_ImageIO?
--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory http://www.geometryfactory.com/
Release Manager of the CGAL Project http://www.cgal.org/
- [cgal-discuss] how to use Image_3::labellized_trilinear_interpolation() properly, Hamid G, 10/09/2012
- Re: [cgal-discuss] how to use Image_3::labellized_trilinear_interpolation() properly, Laurent Rineau (CGAL/GeometryFactory), 10/10/2012
- [cgal-discuss] Re: how to use Image_3::labellized_trilinear_interpolation() properly, Hamid G, 10/11/2012
- Re: [cgal-discuss] Re: how to use Image_3::labellized_trilinear_interpolation() properly, Laurent Rineau (CGAL/GeometryFactory), 10/11/2012
- [cgal-discuss] Re: how to use Image_3::labellized_trilinear_interpolation() properly, Hamid G, 10/11/2012
- Re: [cgal-discuss] how to use Image_3::labellized_trilinear_interpolation() properly, Laurent Rineau (CGAL/GeometryFactory), 10/10/2012
Archive powered by MHonArc 2.6.18.