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

vifa_group_pgram_params.cxx

Go to the documentation of this file.
00001 // This is gel/vifa/vifa_group_pgram_params.cxx
00002 #include <vcl_iostream.h>
00003 #include <vcl_sstream.h>
00004 #include <vifa/vifa_group_pgram_params.h>
00005 
00006 
00007 vifa_group_pgram_params::
00008 vifa_group_pgram_params(const vifa_group_pgram_params&  dp)
00009   : gevd_param_mixin(), vul_timestamp(), vbl_ref_count()
00010 {
00011   init_params(dp.angle_increment_,
00012               dp.max_suppress_radius_,
00013               dp.length_ratio_);
00014 }
00015 
00016 bool vifa_group_pgram_params::
00017 SanityCheck()
00018 {
00019   vcl_stringstream  msg;
00020   bool        valid = true;
00021 
00022   if ((angle_increment_ <= 0) || (angle_increment_ > 45))
00023   {
00024     msg << "ERROR: Value of angle increment is out of range (0, 45]" << vcl_ends;
00025     valid = false;
00026   }
00027 
00028   if (max_suppress_radius_ <= 0)
00029   {
00030     msg << "ERROR: Maximum suppression radius must be greater than 0" << vcl_ends;
00031     valid = false;
00032   }
00033 
00034   if ((length_ratio_ <= 0) || (length_ratio_ > 1.0))
00035   {
00036     msg << "ERROR: length_ratio is out of range (0, 1.0]" << vcl_ends;
00037     valid = false;
00038   }
00039 
00040   SetErrorMsg(msg.str().c_str());
00041   return valid;
00042 }
00043 
00044 void vifa_group_pgram_params::
00045 print_info(void)
00046 {
00047   vcl_cout << "vifa_group_pgram_params:\n"
00048            << "  angle increment     = " << angle_increment_ << vcl_endl
00049            << "  max suppress radius = " << max_suppress_radius_ << vcl_endl
00050            << "  length ratio        = " << length_ratio_ << vcl_endl;
00051 }

Generated on Thu Jan 10 14:47:30 2008 for contrib/gel/vifa by  doxygen 1.4.4