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

strk_tracker_params.cxx

Go to the documentation of this file.
00001 // This is brl/bseg/strk/strk_tracker_params.cxx
00002 #include <strk/strk_tracker_params.h>
00003 //:
00004 // \file
00005 // See strk_tracker_params.h
00006 //
00007 //-----------------------------------------------------------------------------
00008 #include <vcl_sstream.h>
00009 #include <vcl_iostream.h>
00010 
00011 //------------------------------------------------------------------------
00012 // Constructors
00013 //
00014 
00015 strk_tracker_params::
00016 strk_tracker_params(const strk_tracker_params& tp)
00017   : gevd_param_mixin()
00018 {
00019   InitParams(tp.n_samples_,
00020              tp.search_radius_,
00021              tp.angle_range_,
00022              tp.scale_range_,
00023              tp.sigma_,
00024              tp.gradient_info_);
00025 }
00026 
00027 strk_tracker_params::
00028 strk_tracker_params(const int n_samples,
00029                     const float search_radius,
00030                     const float angle_range,
00031                     const float scale_range,
00032                     const float sigma,
00033                     const bool gradient_info)
00034 {
00035   InitParams(n_samples,
00036              search_radius,
00037              angle_range,
00038              scale_range,
00039              sigma,
00040              gradient_info);
00041 }
00042 
00043 void strk_tracker_params::InitParams(int n_samples,
00044                                      float search_radius,
00045                                      float angle_range,
00046                                      float scale_range,
00047                                      float sigma,
00048                                      bool gradient_info)
00049 {
00050   n_samples_ = n_samples;
00051   search_radius_ = search_radius;
00052   angle_range_ = angle_range;
00053   scale_range_ = scale_range;
00054   sigma_ = sigma;
00055   gradient_info_ = gradient_info;
00056 }
00057 
00058 //-----------------------------------------------------------------------------
00059 //
00060 //:   Checks that parameters are within acceptable bounds
00061 //    Note that msg << ends seems to restart the string and erase the
00062 //    previous string. We should only use it as the last call, use
00063 //    vcl_endl otherwise.
00064 bool strk_tracker_params::SanityCheck()
00065 {
00066   vcl_stringstream msg;
00067   bool valid = true;
00068 
00069   msg << vcl_ends;
00070 
00071   SetErrorMsg(msg.str().c_str());
00072   return valid;
00073 }
00074 
00075 vcl_ostream& operator << (vcl_ostream& os, const strk_tracker_params& tp)
00076 {
00077   return
00078   os << "strk_tracker_params:\n[---\n"
00079      << "n_samples " << tp.n_samples_ << vcl_endl
00080      << "search_radius " << tp.search_radius_ << vcl_endl
00081      << "angle_range " << tp.angle_range_ << vcl_endl
00082      << "scale_range " << tp.scale_range_ << vcl_endl
00083      << "sigma " << tp.sigma_ << vcl_endl
00084      << "gradient_info " << tp.gradient_info_ << vcl_endl
00085      << "---]" << vcl_endl;
00086 }

Generated on Thu Jan 10 14:53:19 2008 for contrib/brl/bseg/strk by  doxygen 1.4.4