contrib/brl/bbas/bugl/bugl_gaussian_point_3d.h
Go to the documentation of this file.
00001 #ifndef GAUSSIAN_POINT_3D_H_
00002 #define GAUSSIAN_POINT_3D_H_
00003 //:
00004 // \file
00005 // \author Kongbin Kang
00006 // \brief A class for 3d point with Gaussian distribution
00007 //
00008 // \verbatim
00009 //  Modifications
00010 //   10 Sept 2004 Peter Vanroose - pass arguments as "const&" instead of as "&"
00011 // \endverbatim
00012 
00013 #include "bugl_uncertainty_point_3d.h"
00014 #include <vnl/vnl_matrix_fixed.h>
00015 #include <vgl/vgl_point_3d.h>
00016 
00017 template<class T>
00018 class bugl_gaussian_point_3d : public bugl_uncertainty_point_3d<T>
00019 {
00020   vnl_matrix_fixed<T, 3, 3> sigma_;
00021   vnl_matrix_fixed<T, 3, 3> sigma_inv_;
00022   T det_;
00023  public:
00024   bugl_gaussian_point_3d() : bugl_uncertainty_point_3d<T>() {}
00025   bugl_gaussian_point_3d(vgl_point_3d<T> const& p, vnl_matrix_fixed<T, 3, 3> const& s)
00026     : bugl_uncertainty_point_3d<T>(p) { set_covariant_matrix(s); }
00027   bugl_gaussian_point_3d(T x, T y, T z, vnl_matrix_fixed<T, 3, 3> const& s)
00028     : bugl_uncertainty_point_3d<T>(x, y, z) { set_covariant_matrix(s); }
00029   ~bugl_gaussian_point_3d() {}
00030 
00031   vnl_matrix_fixed<T, 3, 3> get_covariant_matrix() const { return sigma_; }
00032   void set_covariant_matrix(vnl_matrix_fixed<T, 3, 3> const& sigma);
00033 
00034   //: probability density at point p
00035   T prob_at(vgl_point_3d<T> const& p) const;
00036 };
00037 
00038 #define BUGL_GAUSSIAN_POINT_3D_INSTANTIATE(T) extern "please include bugl/gaussian_point_3d_.txx first"
00039 #endif