contrib/mul/vimt/vimt_sample_grid_bicub.h
Go to the documentation of this file.
00001 #ifndef vimt_sample_grid_bicub_h_
00002 #define vimt_sample_grid_bicub_h_
00003 //:
00004 // \file
00005 // \brief Bicubic grid sampling functions for 2D images
00006 // \author Tim Cootes
00007 //
00008 // \verbatim
00009 //  Modifications
00010 //   Matt Leotta   4/16/03   Copied vimt_sample_grid_bilin to make this
00011 // \endverbatim
00012 
00013 #include <vimt/vimt_image_2d_of.h>
00014 #include <vnl/vnl_fwd.h>
00015 #include <vgl/vgl_fwd.h>
00016 
00017 //: Sample grid from image, using bicubic interpolation
00018 //  Grid points are p+i.u+j.v where i=[0..n1-1], j=[0..n2-1]
00019 //  Vector vec is resized to n1*n2*np elements, where np=image.nplanes().
00020 //  vec[0]..vec[np-1] are the values from point p
00021 //  Samples are taken along direction v first, then along u.
00022 //  Points outside image return zero.
00023 // \relatesalso vimt_image_2d_of
00024 template <class imType, class vecType>
00025 void vimt_sample_grid_bicub(vnl_vector<vecType>& vec,
00026                             const vimt_image_2d_of<imType>& image,
00027                             const vgl_point_2d<double>& p,
00028                             const vgl_vector_2d<double>& u,
00029                             const vgl_vector_2d<double>& v,
00030                             int n1, int n2);
00031 
00032 #endif // vimt_sample_grid_bicub_h_