SourceXtractorPlusPlus  0.10
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SE2BackgroundConfig.cpp
Go to the documentation of this file.
1 
17 /*
18  * @file BackgroundConfig.cpp
19  * @author nikoapos
20  */
21 
24 
25 using namespace Euclid::Configuration;
26 namespace po = boost::program_options;
27 
28 namespace SourceXtractor {
29 
30 static const std::string CELLSIZE_VALUE {"background-cell-size" };
31 static const std::string SMOOTHINGBOX_VALUE {"smoothing-box-size" };
32 
33 SE2BackgroundConfig::SE2BackgroundConfig(long manager_id) :
34  Configuration(manager_id),
35  m_cell_size(),
36  m_smoothing_box() {
37 }
38 
40  return { {"Background modelling", {
41  {CELLSIZE_VALUE.c_str(), po::value<std::string>()->default_value(std::string("64")),
42  "Background mesh cell size to determine a value."},
43  {SMOOTHINGBOX_VALUE.c_str(), po::value<std::string>()->default_value(std::string("3")),
44  "Background median filter size"},
45  }}};
46 }
47 
48 void SE2BackgroundConfig::initialize(const UserValues& args) {
49  if (args.find(CELLSIZE_VALUE) != args.end()) {
50  m_cell_size = args.find(CELLSIZE_VALUE)->second.as<std::string>();
51  }
52  if (args.find(SMOOTHINGBOX_VALUE) != args.end()) {
53  m_smoothing_box = args.find(SMOOTHINGBOX_VALUE)->second.as<std::string>();
54  }
55 }
56 
57 } // SourceXtractor namespace
static const std::string CELLSIZE_VALUE
static const std::string SMOOTHINGBOX_VALUE
STL class.
STL class.
std::map< std::string, Configuration::OptionDescriptionList > getProgramOptions() override
T find(T...args)
T c_str(T...args)
void initialize(const UserValues &args) override