00001 // This is core/vil/vil_sample_profile_bilin.h 00002 #ifndef vil_sample_profile_bilin_h_ 00003 #define vil_sample_profile_bilin_h_ 00004 //: 00005 // \file 00006 // \brief Bilinear profile sampling functions for 2D images 00007 // \author Tim Cootes 00008 // 00009 // The vil bicub source files were derived from the corresponding 00010 // vil bilin files, thus the vil bilin/bicub source files are very 00011 // similar. If you modify something in this file, there is a 00012 // corresponding bicub file that would likely also benefit from 00013 // the same change. 00014 00015 #include <vil/vil_image_view.h> 00016 00017 //: Sample along profile, using bilinear interpolation 00018 // Profile points are (x0+i.dx,y0+i.dy), where i=[0..n-1]. 00019 // Vector v is filled with n*np elements, where np=image.nplanes()*image.ncomponents() 00020 // v[0]..v[np-1] are the values from point (x0,y0) 00021 // Points outside image return zero. 00022 // \relatesalso vil_image_view 00023 template <class imType, class vecType> 00024 void vil_sample_profile_bilin(vecType* v, 00025 const vil_image_view<imType>& image, 00026 double x0, double y0, double dx, double dy, 00027 int n); 00028 00029 //: Sample along profile, using bilinear interpolation 00030 // Profile points are (x0+i.dx,y0+i.dy), where i=[0..n-1]. 00031 // Vector v is filled with n*np elements, where np=image.nplanes()*image.ncomponents() 00032 // v[0]..v[np-1] are the values from point (x0,y0) 00033 // Points outside image return NA. 00034 // \relatesalso vil_image_view 00035 template <class imType, class vecType> 00036 void vil_sample_profile_bilin_edgena(vecType* v, 00037 const vil_image_view<imType>& image, 00038 double x0, double y0, double dx, double dy, 00039 int n); 00040 00041 #endif // vil_sample_profile_bilin_h_