SourceXtractorPlusPlus  0.11
Please provide a description of the project.
BackgroundAnalyzerFactory.cpp
Go to the documentation of this file.
1 
17 /*
18  * BackgroundAnalyzerFactory.cpp
19  *
20  * Created on: Mar 29, 2017
21  * Author: mschefer
22  */
23 
24 
26 
30 
31 namespace SourceXtractor {
32 
35 }
36 
38  WeightImageConfig::WeightType weight_type) const {
39  // make a SE2 background if cell size and smoothing box are given
40  if (m_cell_size.size() > 0 && m_smoothing_box.size() > 0) {
41  if (m_legacy)
42  return std::make_shared<SE2BackgroundLevelAnalyzer>(m_cell_size, m_smoothing_box, weight_type);
43  else
44  return std::make_shared<SEBackgroundLevelAnalyzer>(m_cell_size, m_smoothing_box, weight_type);
45  } else {
46  // make a simple background
47  return std::make_shared<SimpleBackgroundAnalyzer>();
48  }
49 }
50 
54 }
55 
57  auto se2background_config = manager.getConfiguration<SE2BackgroundConfig>();
58  auto weight_image_config = manager.getConfiguration<WeightImageConfig>();
59  m_cell_size = se2background_config.getCellSize();
60  m_smoothing_box = se2background_config.getSmoothingBox();
61  m_legacy = se2background_config.useLegacy();
62  m_weight_type = weight_image_config.getWeightType();
63 }
64 
65 }
void configure(Euclid::Configuration::ConfigManager &manager) override
Method which should initialize the object.
std::shared_ptr< BackgroundAnalyzer > createBackgroundAnalyzer() const
T size(T... args)
void reportConfigDependencies(Euclid::Configuration::ConfigManager &manager) const override
Registers all the Configuration dependencies.