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

strk_region_info_params.cxx

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

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