Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] how to use Image_3::labellized_trilinear_interpolation() properly

Subject: CGAL users discussion list

List archive

[cgal-discuss] how to use Image_3::labellized_trilinear_interpolation() properly


Chronological Thread 
  • From: Hamid G <>
  • To:
  • Subject: [cgal-discuss] how to use Image_3::labellized_trilinear_interpolation() properly
  • Date: Tue, 9 Oct 2012 13:40:08 -0700 (PDT)

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:



When compiled and run, the code SEGFAULTs, and a little debugging showed
that in function labellized_trilinear_interpolation()
in Image_3.h (line 451), when it tries to insert the label it finds to a
std::set, a EXC_BAD_ACCESS is thrown!

So my main question is what I am doing wrong here? Is there some sort of
requirement that I have to follow before calling that function?

Also, assuming I can fix this, how can I figure out the type of value that
labellized_trilinear_interpolation()
function is going to return, i.e. the Image_word_type?
As you can see, I'm using 'int' here but is there a (programatic) way of
knowing the 'type' so I can declare the right variable?

thanks in advance,



--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/how-to-use-Image-3-labellized-trilinear-interpolation-properly-tp4655999.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.18.

Top of Page