SourceXtractorPlusPlus 1.0.3
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
25
27
28using namespace Euclid::Configuration;
29namespace po = boost::program_options;
30
31namespace SourceXtractor {
32
33static const std::string DETECT_MINAREA {"detection-minimum-area"};
34
39
41 return { {"Extraction", {
42 {DETECT_MINAREA.c_str(), po::value<int>()->default_value(3), "min. # of pixels above threshold"}
43 }}};
44}
45
47 if (getDependency<DetectionFrameConfig>().getDetectionFrames().size() > 0) {
48 if (args.count(DETECT_MINAREA) != 0) {
49 auto min_pixel_count = args.at(DETECT_MINAREA).as<int>();
50 getDependency<PartitionStepConfig>().addPartitionStepCreator(
51 [min_pixel_count](std::shared_ptr<SourceFactory>) {
52 return std::make_shared<MinAreaPartitionStep>(min_pixel_count);
53 }
54 );
55 }
56 }
57}
58
59} // SourceXtractor namespace
T at(T... args)
std::map< std::string, boost::program_options::variable_value > UserValues
void initialize(const UserValues &args) override
std::map< std::string, OptionDescriptionList > getProgramOptions() override
T count(T... args)
T make_shared(T... args)
static const std::string DETECT_MINAREA