SourceXtractorPlusPlus 1.0.3
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
SamplingConfig.cpp
Go to the documentation of this file.
1
17
18#include <boost/algorithm/string.hpp>
19
21
22using namespace Euclid::Configuration;
23namespace po = boost::program_options;
24
25namespace SourceXtractor {
26
27//static const std::string SAMPLING_ADAPTIVE_TARGET {"sampling-adaptive-target"};
28static const std::string SAMPLING_SCALE_FACTOR {"sampling-scale-factor"};
29static const std::string SAMPLING_MAX_FIT_SIZE {"sampling-max-fit-size"};
30
31SamplingConfig::SamplingConfig(long manager_id) : Configuration(manager_id),
33
35 return {{"Model Fitting Sampling",
36 {
37// {SAMPLING_ADAPTIVE_TARGET.c_str(), po::value<double>()->default_value(0.001),
38// "Adaptive sampling will stop when difference is less than this"},
39 {SAMPLING_SCALE_FACTOR.c_str(), po::value<double>()->default_value(1.0),
40 "Scaling factor for the rendering of models (e.g. 2 = twice the resolution)"},
41 {SAMPLING_MAX_FIT_SIZE.c_str(), po::value<size_t>()->default_value(1000),
42 "Size of maximum fit area before downsampling (in pixels, one side)"}
43 }
44 }};
45}
46
49
51// m_adaptive_target = args.at(SAMPLING_ADAPTIVE_TARGET).as<double>();
52 m_scale_factor = args.at(SAMPLING_SCALE_FACTOR).as<double>();
53 m_max_fit_size = args.at(SAMPLING_MAX_FIT_SIZE).as<size_t>();
54}
55
56} /* namespace SourceXtractor */
T at(T... args)
std::map< std::string, boost::program_options::variable_value > UserValues
void preInitialize(const UserValues &args) override
std::map< std::string, OptionDescriptionList > getProgramOptions() override
void initialize(const UserValues &args) override
static const std::string SAMPLING_MAX_FIT_SIZE
static const std::string SAMPLING_SCALE_FACTOR