contrib/mul/vimt/vimt_sample_profile_bilin.h
Go to the documentation of this file.
00001 #ifndef vimt_sample_profile_bilin_h_
00002 #define vimt_sample_profile_bilin_h_
00003 //:
00004 //  \file
00005 //  \brief Profile sampling functions for 2D images
00006 //  \author Tim Cootes
00007 
00008 #include <vimt/vimt_image_2d_of.h>
00009 #include <vnl/vnl_fwd.h>
00010 #include <vgl/vgl_fwd.h>
00011 
00012 //: Sample along profile, using bilinear interpolation
00013 //  Profile points are p+iu, where i=[0..n-1] (world co-ordinates).
00014 //  Vector v is resized to n*np elements, where np=image.n_planes().
00015 //  v[0]..v[np-1] are the values from point p
00016 template <class imType, class vecType>
00017 void vimt_sample_profile_bilin(vnl_vector<vecType>& v,
00018                                const vimt_image_2d_of<imType>& image,
00019                                const vgl_point_2d<double>& p,
00020                                const vgl_vector_2d<double>& u,
00021                                int n);
00022 
00023 //: Sample along profile, using bilinear interpolation
00024 //  Profile points are p+iu, where i=[0..n-1] (world co-ordinates).
00025 //  Vector v is resized to n*np elements, where np=image.n_planes().
00026 //  v[0]..v[np-1] are the values from point p.
00027 //  Values outside the images are set to NA
00028 template <class imType, class vecType>
00029 void vimt_sample_profile_bilin_edgena(vnl_vector<vecType>& v,
00030                                const vimt_image_2d_of<imType>& image,
00031                                const vgl_point_2d<double>& p,
00032                                const vgl_vector_2d<double>& u,
00033                                int n);
00034 
00035 
00036 #endif // vimt_sample_profile_bilin_h_