SourceXtractorPlusPlus 0.19.2
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
MinAreaPartitionConfig.cpp
Go to the documentation of this file.
1
17/*
18 * @file MinAreaPartitionConfig.cpp
19 * @author nikoapos
20 */
21
24
26
27using namespace Euclid::Configuration;
28namespace po = boost::program_options;
29
30namespace SourceXtractor {
31
32static const std::string DETECT_MINAREA {"detection-minimum-area"};
33
35 declareDependency<PartitionStepConfig>();
36}
37
39 return { {"Extraction", {
40 {DETECT_MINAREA.c_str(), po::value<int>()->default_value(3), "min. # of pixels above threshold"}
41 }}};
42}
43
45 if (args.count(DETECT_MINAREA) != 0) {
46 auto min_pixel_count = args.at(DETECT_MINAREA).as<int>();
47 getDependency<PartitionStepConfig>().addPartitionStepCreator(
48 [min_pixel_count](std::shared_ptr<SourceFactory>) {
49 return std::make_shared<MinAreaPartitionStep>(min_pixel_count);
50 }
51 );
52 }
53}
54
55} // SourceXtractor namespace
T at(T... args)
T c_str(T... args)
void initialize(const UserValues &args) override
std::map< std::string, OptionDescriptionList > getProgramOptions() override
T count(T... args)
static const std::string DETECT_MINAREA