Interpolators

37 views
Skip to first unread message

Maik Figura

unread,
Apr 12, 2013, 6:00:24 AM4/12/13
to field...@googlegroups.com
Hello, 

for my bachelor thesis I am doing some research intro Field3D Format, which so far is really amazing and good.

My question regards the interpolators mentioned in the doc: 

A simple interpolation example:
DenseField<T>::Ptr field = someField;
DenseField<T>::LinearInterp interp;
// Prefix indicates coordinate space
V3d wsP(0.0, 0.0, 0.0);
V3d vsP;
// Use mapping to transform between coordinate spaces
field->mapping()->worldToVoxel(wsP, vsP);
// Interpolation always uses voxel space
T value = interp.sample(field, vsP);

I tried using this example like this: 
 
 
... Field3D::DenseField3f::LinearInterp interp; interp.sample(someFieldA, vsP) ... 
 

and 

 Field3D::DenseField3f::CubicInterp interp; interp.sample(someFieldB, vsP) ... 

but in both cases, the sample function ('interp.sample') does not show up for me. 

Do I take it right, that one has to implement the sample function? I've noticed that 'Field3D::DenseField3f::CubicInterp' points to 'Field3D::CubicGenericFieldInterp' which defines a virtual sample function. 

I am a bit confused about this topic in the docs. Can someone please clarify this for me? 

Cheers
Maik 

Magnus Wrenninge

unread,
Apr 12, 2013, 8:46:17 PM4/12/13
to field...@googlegroups.com
Hi, I think you just need to #include <Field3D/FieldInterp.h>. The interpolation classes are only forward declared in the field header files.

Magnus





Cheers
Maik 

--
You received this message because you are subscribed to the Google Groups "Field3D dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to field3d-dev...@googlegroups.com.
To post to this group, send email to field...@googlegroups.com.
Visit this group at http://groups.google.com/group/field3d-dev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Maik Figura

unread,
Apr 14, 2013, 5:44:22 AM4/14/13
to field...@googlegroups.com
Ahhhhrg, 

youre probably right. Ill try this on monday. I totally forgot to check the include. 

Thanks, Ill post an answer on monday.

Cheers
Maik 

Maik Figura

unread,
Apr 16, 2013, 4:39:12 AM4/16/13
to field...@googlegroups.com
Hey Magnus,

you where right. The include was indeed the problem. 

Thanks for the fast response. 

Cheers
Maik 
Reply all
Reply to author
Forward
0 new messages