00001 #ifndef vnl_gaussian_kernel_1d_h_ 00002 #define vnl_gaussian_kernel_1d_h_ 00003 00004 //: 00005 // \file 00006 // \brief Holds one half of a discretely sampled 1D gaussian distribution 00007 // \author Andrew W. Fitzgibbon, Oxford RRG, 07 Aug 97 00008 // 00009 // Modifications 00010 // 970807 AWF Initial version. 00011 // dac (Manchester) 28/03/2001: tidied up documentation 00012 // 00013 00014 #include <vnl/vnl_vector.h> 00015 00016 00017 //: Holds one half of a discretely sampled 1D gaussian distribution 00018 // vnl_gaussian_kernel_1d is a class that holds one half of a discretely 00019 // sampled 1D gaussian distribution. 00020 // 00021 00022 class vnl_gaussian_kernel_1d { 00023 public: 00024 // Constructors/Destructors-------------------------------------------------- 00025 00026 vnl_gaussian_kernel_1d(double sigma, double cutoff = 0.5/256.0); 00027 00028 double G(double x) const; 00029 00030 int width() const { return vec_.size(); } 00031 double operator [] (int i) const { return vec_[i]; } 00032 00033 protected: 00034 // Data Members-------------------------------------------------------------- 00035 vnl_vector<double> vec_; 00036 double inscale_; 00037 00038 // Helpers------------------------------------------------------------------- 00039 }; 00040 00041 #endif // vnl_gaussian_kernel_1d_h_