Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vimt_pyramid_values_at_point.h

Go to the documentation of this file.
00001 // This is mul/vimt/algo/vimt_pyramid_values_at_point.h
00002 #ifndef vimt_pyramid_values_at_point_h_
00003 #define vimt_pyramid_values_at_point_h_
00004 //:
00005 // \file
00006 // \brief Function to sample a point at each level of an image pyramid
00007 // \author Tim Cootes
00008 
00009 #include <vimt/vimt_image_pyramid.h>
00010 
00011 //: Use bilinear to sample from each level of the image pyramid
00012 //  \param samples: Filled with image_pyr.n_levels() values
00013 //  \param dummy: Used to define type of image pyramid
00014 template<class T>
00015 void vimt_pyramid_values_at_point(const vimt_image_pyramid& image_pyr,
00016                                   vgl_point_2d<double> p,
00017                                   vcl_vector<double>& samples,
00018                                   T dummy, int plane=0)
00019 {
00020   samples.resize(image_pyr.n_levels());
00021   for (unsigned L=image_pyr.lo();L<=image_pyr.hi();++L)
00022   {
00023     const vimt_image_2d_of<T>& image
00024             = static_cast<const vimt_image_2d_of<T>&>(image_pyr(L));
00025     samples[L] = vimt_bilin_interp_safe(image,p,plane);
00026   }
00027 }
00028 
00029 #endif // vimt_pyramid_values_at_point_h_

Generated on Thu Jan 10 14:43:58 2008 for contrib/mul/vimt by  doxygen 1.4.4