core/vnl/algo/vnl_gaussian_kernel_1d.h
Go to the documentation of this file.
00001 // This is core/vnl/algo/vnl_gaussian_kernel_1d.h
00002 #ifndef vnl_gaussian_kernel_1d_h_
00003 #define vnl_gaussian_kernel_1d_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 // \file
00009 // \brief Holds one half of a discretely sampled 1D gaussian distribution
00010 // \author Andrew W. Fitzgibbon, Oxford RRG
00011 // \date   07 Aug 97
00012 //
00013 // \verbatim
00014 // Modifications
00015 //  970807 AWF Initial version.
00016 //  dac (Manchester) 28/03/2001: tidied up documentation
00017 // \endverbatim
00018 
00019 #include <vnl/vnl_vector.h>
00020 
00021 //: Holds one half of a discretely sampled 1D gaussian distribution
00022 class vnl_gaussian_kernel_1d
00023 {
00024  public:
00025   // Constructors/Destructors--------------------------------------------------
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 
00039 #endif // vnl_gaussian_kernel_1d_h_