SourceXtractorPlusPlus  0.10
Please provide a description of the project.
SourceXtractor.cpp
Go to the documentation of this file.
1 
23 #include <typeinfo>
24 #include <map>
25 #include <string>
26 #include <iomanip>
27 
28 #include <boost/program_options.hpp>
29 #include <boost/algorithm/string/predicate.hpp>
31 
32 #include "ElementsKernel/Main.h"
33 #include "ElementsKernel/System.h"
35 
37 #include "Configuration/Utils.h"
38 
40 
48 
50 
53 
55 
61 
65 
67 
71 
78 
80 
82 #include "SEMain/PluginConfig.h"
83 #include "SEMain/Sorter.h"
84 
85 
86 namespace po = boost::program_options;
87 namespace fs = boost::filesystem;
88 using namespace SourceXtractor;
89 using namespace Euclid::Configuration;
90 
92 
93 static const std::string LIST_OUTPUT_PROPERTIES {"list-output-properties"};
94 static const std::string PROPERTY_COLUMN_MAPPING_ALL {"property-column-mapping-all"};
95 static const std::string PROPERTY_COLUMN_MAPPING {"property-column-mapping"};
96 static const std::string DUMP_CONFIG {"dump-default-config"};
97 
98 class GroupObserver : public Observer<std::shared_ptr<SourceGroupInterface>> {
99 public:
100  virtual void handleMessage(const std::shared_ptr<SourceGroupInterface>& group) override {
101  m_list.push_back(group);
102  }
103 
105 };
106 
107 class SourceObserver : public Observer<std::shared_ptr<SourceWithOnDemandProperties>> {
108 public:
109  virtual void handleMessage(const std::shared_ptr<SourceWithOnDemandProperties>& source) override {
110  m_list.push_back(source);
111  }
112 
114 };
115 
117 
118 static void setupEnvironment(void) {
119  // Some parts of boost (including boost::filesystem) can throw an exception when the
120  // locale as configured in the environment is invalid.
121  // We work around that overriding the locale if we find an invalid one.
122  // See https://svn.boost.org/trac10/ticket/10205
123  try {
124  std::locale("");
125  }
126  catch (...) {
127  ::setenv("LC_ALL", "C", 1);
128  }
129 }
130 
131 
132 class SEMain : public Elements::Program {
133 
134  std::shared_ptr<TaskFactoryRegistry> task_factory_registry = std::make_shared<TaskFactoryRegistry>();
135  std::shared_ptr<TaskProvider> task_provider = std::make_shared<TaskProvider>(task_factory_registry);
136  std::shared_ptr<OutputRegistry> output_registry = std::make_shared<OutputRegistry>();
137  SegmentationFactory segmentation_factory {task_provider};
138  OutputFactory output_factory { output_registry };
141  std::make_shared<SourceWithOnDemandPropertiesFactory>(task_provider);
143  std::make_shared<SourceGroupWithOnDemandPropertiesFactory>(task_provider);
144  PartitionFactory partition_factory {source_factory};
145  GroupingFactory grouping_factory {group_factory};
146  DeblendingFactory deblending_factory {source_factory};
147  MeasurementFactory measurement_factory { output_registry };
148  BackgroundAnalyzerFactory background_level_analyzer_factory {};
149  ProgressReporterFactory progress_printer_factory {};
150 
151  bool config_initialized = false;
152  po::options_description config_parameters;
153 
154 public:
155 
156  SEMain(const std::string& plugin_path, const std::vector<std::string>& plugin_list)
157  : plugin_manager { task_factory_registry, output_registry, config_manager_id, plugin_path, plugin_list } {
158  }
159 
163  po::options_description getConfigParameters() {
164  if (!config_initialized) {
165  auto& config_manager = ConfigManager::getInstance(config_manager_id);
166  config_manager.registerConfiguration<SourceXtractorConfig>();
167  config_manager.registerConfiguration<BackgroundConfig>();
168  config_manager.registerConfiguration<SE2BackgroundConfig>();
169  config_manager.registerConfiguration<MemoryConfig>();
170 
172 
173  //plugins need to be registered before reportConfigDependencies()
174  plugin_manager.loadPlugins();
175  task_factory_registry->reportConfigDependencies(config_manager);
176  segmentation_factory.reportConfigDependencies(config_manager);
177  partition_factory.reportConfigDependencies(config_manager);
178  grouping_factory.reportConfigDependencies(config_manager);
179  deblending_factory.reportConfigDependencies(config_manager);
180  measurement_factory.reportConfigDependencies(config_manager);
181  output_factory.reportConfigDependencies(config_manager);
182  background_level_analyzer_factory.reportConfigDependencies(config_manager);
183 
184  config_parameters.add(config_manager.closeRegistration());
185  config_initialized = true;
186  }
187  return config_parameters;
188  }
189 
192  auto options = getConfigParameters();
193 
194  options.add_options() (LIST_OUTPUT_PROPERTIES.c_str(), po::bool_switch(),
195  "List the possible output properties for the given input parameters and exit");
196  options.add_options() (PROPERTY_COLUMN_MAPPING_ALL.c_str(), po::bool_switch(),
197  "Show the columns created for each property");
198  options.add_options() (PROPERTY_COLUMN_MAPPING.c_str(), po::bool_switch(),
199  "Show the columns created for each property, for the given configuration");
200  options.add_options() (DUMP_CONFIG.c_str(), po::bool_switch(),
201  "Dump parameters with default values into a configuration file");
202  progress_printer_factory.addOptions(options);
203 
204  // Allow to pass Python options as positional following --
205  po::positional_options_description p;
206  p.add("python-arg", -1);
207 
208  return {options, p};
209  }
210 
212  template <typename T>
213  static void writeDefault(std::ostream& out, const po::option_description& opt, const boost::any& default_value) {
214  out << opt.long_name() << '=' << boost::any_cast<T>(default_value) << std::endl;
215  }
216 
218  template <typename T>
219  static void writeDefaultMultiple(std::ostream& out, const po::option_description& opt, const boost::any& default_value) {
220  auto values = boost::any_cast<std::vector<T>>(default_value);
221  if (values.empty()) {
222  out << opt.long_name() << '=' << std::endl;
223  }
224  else {
225  for (const auto& v : values)
226  out << opt.long_name() << '=' << v << std::endl;
227  }
228  }
229 
231  void printDefaults() {
232  typedef std::function<void(std::ostream&, const po::option_description&, const boost::any&)> PrinterFunction;
234  {typeid(bool), &writeDefault<bool>},
235  {typeid(int), &writeDefault<int>},
236  {typeid(double), &writeDefault<double>},
237  {typeid(std::string), &writeDefault<std::string>},
238  {typeid(std::vector<std::string>), &writeDefaultMultiple<std::string>}
239  };
240  decltype(printers)::const_iterator printer;
241 
242  auto config_parameters = getConfigParameters();
243  for (const auto& p : config_parameters.options()) {
244  boost::any default_value;
245 
246  std::cout << "# " << p->description() << std::endl;
247  if (!p->semantic()->apply_default(default_value)) {
248  std::cout << '#' << p->long_name() << "=" << std::endl;
249  }
250  else if ((printer = printers.find(default_value.type())) == printers.end()) {
251  std::cout << '#' << p->long_name() << "=<Unknown type " << default_value.type().name() << '>' << std::endl;
252  }
253  else {
254  printer->second(std::cout, *p, default_value);
255  }
256  std::cout << std::endl;
257  }
258 
259  // We need to print the log options manually, as that is set up by Elements
260  std::cout << "# Log level: FATAL, ERROR, WARN, INFO, DEBUG" << std::endl;
261  std::cout << "log-level=INFO" << std::endl;
262  std::cout << "# Log file" << std::endl;
263  std::cout << "#log-file" << std::endl;
264  }
265 
267 
268  // If the user just requested to see the possible output columns we show
269  // them and we do nothing else
270 
271  if (args.at(LIST_OUTPUT_PROPERTIES).as<bool>()) {
272  for (auto& name : output_registry->getOutputPropertyNames()) {
273  std::cout << name << std::endl;
274  }
275  return Elements::ExitCode::OK;
276  }
277 
278  if (args.at(PROPERTY_COLUMN_MAPPING_ALL).as<bool>()) {
279  output_registry->printPropertyColumnMap();
280  return Elements::ExitCode::OK;
281  }
282 
283  if (args.at(DUMP_CONFIG).as<bool>()) {
284  printDefaults();
285  return Elements::ExitCode::OK;
286  }
287 
288  // Elements does not verify that the config-file exists. It will just not read it.
289  // We verify that it does exist here.
290  if (args.find("config-file") != args.end()) {
291  auto cfg_file = args.at("config-file").as<fs::path>();
292  if (cfg_file != "" && !fs::exists(cfg_file)) {
293  throw Elements::Exception() << "The configuration file '" << cfg_file << "' does not exist";
294  }
295  }
296 
297  // Create the progress listener and printer ASAP
298  progress_printer_factory.configure(args);
299  auto progress_mediator = progress_printer_factory.createProgressMediator();
300 
301  // Initialize the rest of the components
302  auto& config_manager = ConfigManager::getInstance(config_manager_id);
303  config_manager.initialize(args);
304 
305  // Configure TileManager
306  auto memory_config = config_manager.getConfiguration<MemoryConfig>();
307  TileManager::getInstance()->setOptions(memory_config.getTileSize(),
308  memory_config.getTileSize(), memory_config.getTileMaxMemory());
309 
310  CheckImages::getInstance().configure(config_manager);
311 
312  task_factory_registry->configure(config_manager);
313  task_factory_registry->registerPropertyInstances(*output_registry);
314 
315  segmentation_factory.configure(config_manager);
316  partition_factory.configure(config_manager);
317  grouping_factory.configure(config_manager);
318  deblending_factory.configure(config_manager);
319  measurement_factory.configure(config_manager);
320  output_factory.configure(config_manager);
321  background_level_analyzer_factory.configure(config_manager);
322 
323  if (args.at(PROPERTY_COLUMN_MAPPING).as<bool>()) {
324  output_registry->printPropertyColumnMap(config_manager.getConfiguration<OutputConfig>().getOutputProperties());
325  return Elements::ExitCode::OK;
326  }
327 
328  auto detection_image = config_manager.getConfiguration<DetectionImageConfig>().getDetectionImage();
329  auto detection_image_path = config_manager.getConfiguration<DetectionImageConfig>().getDetectionImagePath();
330  auto weight_image = config_manager.getConfiguration<WeightImageConfig>().getWeightImage();
331  bool is_weight_absolute = config_manager.getConfiguration<WeightImageConfig>().isWeightAbsolute();
332  auto weight_threshold = config_manager.getConfiguration<WeightImageConfig>().getWeightThreshold();
333 
334  auto detection_image_coordinate_system = config_manager.getConfiguration<DetectionImageConfig>().getCoordinateSystem();
335  auto detection_image_gain = config_manager.getConfiguration<DetectionImageConfig>().getGain();
336  auto detection_image_saturation = config_manager.getConfiguration<DetectionImageConfig>().getSaturation();
337 
338  auto segmentation = segmentation_factory.createSegmentation();
339  auto partition = partition_factory.getPartition();
340  auto source_grouping = grouping_factory.createGrouping();
341 
342  std::shared_ptr<Deblending> deblending = deblending_factory.createDeblending();
343  std::shared_ptr<Measurement> measurement = measurement_factory.getMeasurement();
344  std::shared_ptr<Output> output = output_factory.getOutput();
345 
346  auto sorter = std::make_shared<Sorter>();
347 
348  // Link together the pipeline's steps
349  segmentation->Observable<std::shared_ptr<SourceInterface>>::addObserver(partition);
350  segmentation->Observable<ProcessSourcesEvent>::addObserver(source_grouping);
351  partition->addObserver(source_grouping);
352  source_grouping->addObserver(deblending);
353  deblending->addObserver(measurement);
354  measurement->addObserver(sorter);
355  sorter->addObserver(output);
356 
357  segmentation->Observable<SegmentationProgress>::addObserver(progress_mediator->getSegmentationObserver());
358  segmentation->Observable<std::shared_ptr<SourceInterface>>::addObserver(progress_mediator->getDetectionObserver());
359  deblending->addObserver(progress_mediator->getDeblendingObserver());
360  measurement->addObserver(progress_mediator->getMeasurementObserver());
361 
362  // Add observers for CheckImages
363  if (CheckImages::getInstance().getSegmentationImage() != nullptr) {
364  segmentation->Observable<std::shared_ptr<SourceInterface>>::addObserver(
365  std::make_shared<DetectionIdCheckImage>(CheckImages::getInstance().getSegmentationImage()));
366  }
367  if (CheckImages::getInstance().getPartitionImage() != nullptr) {
368  measurement->addObserver(
369  std::make_shared<SourceIdCheckImage>(CheckImages::getInstance().getPartitionImage()));
370  }
371  if (CheckImages::getInstance().getGroupImage() != nullptr) {
372  measurement->addObserver(
373  std::make_shared<GroupIdCheckImage>(CheckImages::getInstance().getGroupImage()));
374  }
375  if (CheckImages::getInstance().getMoffatImage() != nullptr) {
376  measurement->addObserver(
377  std::make_shared<MoffatCheckImage>(CheckImages::getInstance().getMoffatImage()));
378  }
379 
380  auto interpolation_gap = config_manager.getConfiguration<DetectionImageConfig>().getInterpolationGap();
381  auto detection_frame = std::make_shared<DetectionImageFrame>(detection_image, weight_image,
382  weight_threshold, detection_image_coordinate_system, detection_image_gain,
383  detection_image_saturation, interpolation_gap);
384  detection_frame->setLabel(boost::filesystem::basename(detection_image_path));
385 
386  auto background_analyzer = background_level_analyzer_factory.createBackgroundAnalyzer();
387  auto background_model = background_analyzer->analyzeBackground(detection_frame->getOriginalImage(), weight_image,
388  ConstantImage<unsigned char>::create(detection_image->getWidth(), detection_image->getHeight(), false), detection_frame->getVarianceThreshold());
389 
390  // initial set of the variance and background check images, might be overwritten below
391  CheckImages::getInstance().setBackgroundCheckImage(background_model.getLevelMap());
392  CheckImages::getInstance().setVarianceCheckImage(background_model.getVarianceMap());
393 
394  detection_frame->setBackgroundLevel(background_model.getLevelMap());
395 
396  if (weight_image != nullptr) {
397  if (is_weight_absolute) {
398  detection_frame->setVarianceMap(weight_image);
399  } else {
400  auto scaled_image = MultiplyImage<SeFloat>::create(weight_image, background_model.getScalingFactor());
401  detection_frame->setVarianceMap(scaled_image);
402  }
403  } else {
404  detection_frame->setVarianceMap(background_model.getVarianceMap());
405  }
406  // re-set the variance check image to what's in the detection_frame()
407  CheckImages::getInstance().setVarianceCheckImage(detection_frame->getVarianceMap());
408 
409  const auto& background_config = config_manager.getConfiguration<BackgroundConfig>();
410 
411  // Override background level and threshold if requested by the user
412  if (background_config.isBackgroundLevelAbsolute()) {
414  detection_image->getWidth(), detection_image->getHeight(), background_config.getBackgroundLevel());
415 
416  detection_frame->setBackgroundLevel(background);
418  }
419 
420  if (background_config.isDetectionThresholdAbsolute()) {
421  detection_frame->setDetectionThreshold(background_config.getDetectionThreshold());
422  }
423  CheckImages::getInstance().setVarianceCheckImage(detection_frame->getVarianceMap());
424 
425  //CheckImages::getInstance().setFilteredCheckImage(detection_frame->getFilteredImage());
426 
427  // Perform measurements (multi-threaded part)
428  measurement->startThreads();
429 
430  try {
431  // Process the image
432  segmentation->processFrame(detection_frame);
433  }
434  catch (const std::exception &e) {
435  logger.error() << "Failed to process the frame! " << e.what();
436  measurement->waitForThreads();
438  }
439 
440  measurement->waitForThreads();
441 
442  CheckImages::getInstance().setFilteredCheckImage(detection_frame->getFilteredImage());
443  CheckImages::getInstance().setThresholdedCheckImage(detection_frame->getThresholdedImage());
444  CheckImages::getInstance().setSnrCheckImage(detection_frame->getSnrImage());
446  TileManager::getInstance()->flush();
447  FitsFileManager::getInstance()->closeAllFiles();
448 
449  size_t n_writen_rows = output->flush();
450 
451  progress_mediator->done();
452 
453  if (n_writen_rows > 0) {
454  logger.info() << n_writen_rows << " sources detected";
455  } else {
456  logger.info() << "NO SOURCES DETECTED";
457  }
458 
459  return Elements::ExitCode::OK;
460  }
461 };
462 
463 
465 
466 public:
468  m_plugin_path(plugin_path), m_plugin_list(plugin_list) {
469  }
470 
471  virtual ~PluginOptionsMain() = default;
472 
473  boost::program_options::options_description defineSpecificProgramOptions() override {
474  auto& config_manager = ConfigManager::getInstance(conf_man_id);
475  config_manager.registerConfiguration<PluginConfig>();
476  auto options = config_manager.closeRegistration();
477  // The following will consume any extra options in the configuration file
478  options.add_options()("*", po::value<std::vector<std::string>>());
479  return options;
480  }
481 
483  auto& config_manager = ConfigManager::getInstance(conf_man_id);
484  config_manager.initialize(args);
485  auto& conf = config_manager.getConfiguration<PluginConfig>();
486  m_plugin_path = conf.getPluginPath();
487  m_plugin_list = conf.getPluginList();
488  return Elements::ExitCode::OK;
489  }
490 
491 private:
492 
493  long conf_man_id = getUniqueManagerId();
496 
497 };
498 
499 
500 
501 ELEMENTS_API int main(int argc, char* argv[]) {
502  std::string plugin_path {};
503  std::vector<std::string> plugin_list {};
504 
505  // This adds the current directory as a valid location for the default "sourcextractor++.conf" configuration
506  Elements::TempEnv local_env;
507  if (local_env["ELEMENTS_CONF_PATH"].empty()) {
508  local_env["ELEMENTS_CONF_PATH"] = ".:/etc";
509  } else {
510  local_env["ELEMENTS_CONF_PATH"] = ".:" + local_env["ELEMENTS_CONF_PATH"] + ":/etc";
511  }
512 
514 
515  // Try to be reasonably graceful with unhandled exceptions
517 
518  try {
519  // First we create a program which has a sole purpose to get the options for
520  // the plugin paths. Note that we do not want to have this helper program
521  // to handle any other options except of the plugin-directory and plugin, so
522  // we create a subset of the given options with only the necessary ones. We
523  // also turn off the the logging.
524  std::vector<int> masked_indices{};
525  std::vector<std::string> plugin_options_input{};
526  plugin_options_input.emplace_back("DummyProgram");
527  plugin_options_input.emplace_back("--log-level");
528  plugin_options_input.emplace_back("ERROR");
529  for (int i = 0; i < argc; ++i) {
530  std::string option{argv[i]};
531  if (option == "--config-file") {
532  plugin_options_input.emplace_back("--config-file");
533  plugin_options_input.emplace_back(std::string{argv[i + 1]});
534  }
535  if (boost::starts_with(option, "--config-file=")) {
536  plugin_options_input.emplace_back(option);
537  }
538  if (option == "--plugin-directory") {
539  plugin_options_input.emplace_back("--plugin-directory");
540  plugin_options_input.emplace_back(std::string{argv[i + 1]});
541  }
542  if (boost::starts_with(option, "--plugin-directory=")) {
543  plugin_options_input.emplace_back(option);
544  }
545  if (option == "--plugin") {
546  plugin_options_input.emplace_back("--plugin");
547  plugin_options_input.emplace_back(std::string{argv[i + 1]});
548  }
549  if (boost::starts_with(option, "--plugin=")) {
550  plugin_options_input.emplace_back(option);
551  }
552  }
553 
554  int argc_tmp = plugin_options_input.size();
555  std::vector<const char *> argv_tmp(argc_tmp);
556  for (unsigned int i = 0; i < plugin_options_input.size(); ++i) {
557  auto& option_str = plugin_options_input[i];
558  argv_tmp[i] = option_str.data();
559  }
560 
561  CREATE_MANAGER_WITH_ARGS(plugin_options_program, PluginOptionsMain, plugin_path, plugin_list);
562  plugin_options_program.run(argc_tmp, const_cast<char **>(argv_tmp.data()));
563 
564  CREATE_MANAGER_WITH_ARGS(main, SEMain, plugin_path, plugin_list);
565  Elements::ExitCode exit_code = main.run(argc, argv);
566  return static_cast<Elements::ExitCodeType>(exit_code);
567  }
568  catch (const std::exception &e) {
569  logger.fatal() << e.what();
570  return static_cast<Elements::ExitCodeType>(Elements::ExitCode::NOT_OK);
571  }
572  catch (...) {
573  logger.fatal() << "Unknown exception type!";
574  logger.fatal() << "Please, report this as a bug";
575  return static_cast<Elements::ExitCodeType>(Elements::ExitCode::SOFTWARE);
576  }
577 }
static long config_manager_id
void setBackgroundCheckImage(std::shared_ptr< Image< SeFloat >> background_image)
Definition: CheckImages.h:88
T set_terminate(T... args)
std::list< std::shared_ptr< SourceWithOnDemandProperties > > m_list
virtual size_t flush()=0
virtual void startThreads()=0
void setThresholdedCheckImage(std::shared_ptr< Image< SeFloat >> thresholded_image)
Definition: CheckImages.h:100
PluginManager plugin_manager
static Elements::Logging logger
static std::shared_ptr< TileManager > getInstance()
Definition: TileManager.h:137
static const std::string LIST_OUTPUT_PROPERTIES
void setSnrCheckImage(std::shared_ptr< Image< SeFloat >> snr_image)
Definition: CheckImages.h:104
SEMain(const std::string &plugin_path, const std::vector< std::string > &plugin_list)
std::set< std::string > getOutputPropertyNames()
void loadPlugins()
loads all the available plugins. Both those linked at compile-time and those loaded at run-time
static const std::string PROPERTY_COLUMN_MAPPING
std::string & m_plugin_path
virtual void addObserver(std::shared_ptr< Observer< T >> observer)
Adds an Observer that will be notified when notify Observers is called.
Definition: Observable.h:59
void printDefaults()
Print a configuration file populated with defaults.
constexpr double e
static std::shared_ptr< FitsFileManager > getInstance()
static void onTerminate() noexcept
void printPropertyColumnMap(const std::vector< std::string > &properties={})
T endl(T... args)
Definition: conf.py:1
std::shared_ptr< WriteableImage< unsigned int > > getSegmentationImage() const
Definition: CheckImages.h:52
void info(const std::string &logMessage)
void setFilteredCheckImage(std::shared_ptr< Image< SeFloat >> filtered_image)
Definition: CheckImages.h:96
T end(T... args)
std::pair< po::options_description, po::positional_options_description > defineProgramArguments() override
Return the arguments that the program accepts.
Provides the detection image.
STL class.
T partition(T... args)
STL class.
T at(T... args)
virtual void reportConfigDependencies(Euclid::Configuration::ConfigManager &manager) const override
Registers all the Configuration dependencies.
std::list< std::shared_ptr< SourceGroupInterface > > m_list
PluginOptionsMain(std::string &plugin_path, std::vector< std::string > &plugin_list)
static void setupEnvironment(void)
T data(T... args)
virtual void handleMessage(const std::shared_ptr< SourceWithOnDemandProperties > &source) override
po::options_description config_parameters
boost::program_options::options_description defineSpecificProgramOptions() override
const std::vector< std::string > getOutputProperties()
static CheckImages & getInstance()
Definition: CheckImages.h:114
Elements::ExitCode mainMethod(std::map< std::string, po::variable_value > &args) override
long getUniqueManagerId()
The SegmentationFactory will provide a Segmentation implementation based on the current configuration...
po::options_description getConfigParameters()
virtual void configure(Euclid::Configuration::ConfigManager &manager) override
Method which should initialize the object.
Definition: CheckImages.cpp:62
#define ELEMENTS_API
void fatal(const std::string &logMessage)
static void writeDefaultMultiple(std::ostream &out, const po::option_description &opt, const boost::any &default_value)
Print a multiple-value option.
STL class.
STL class.
ELEMENTS_API int main(int argc, char *argv[])
virtual void reportConfigDependencies(Euclid::Configuration::ConfigManager &manager) const override
Registers all the Configuration dependencies.
Definition: CheckImages.cpp:38
void registerPropertyInstances(OutputRegistry &output_registry)
T find(T... args)
T size(T... args)
void error(const std::string &logMessage)
static void writeDefault(std::ostream &out, const po::option_description &opt, const boost::any &default_value)
Print a simple option.
virtual void waitForThreads()=0
T c_str(T... args)
virtual void configure(Euclid::Configuration::ConfigManager &manager) override
Method which should initialize the object.
Elements::ExitCode mainMethod(std::map< std::string, boost::program_options::variable_value > &args) override
static std::shared_ptr< ConstantImage< T > > create(int width, int height, T constant_value)
Definition: ConstantImage.h:42
Observer interface to be used with Observable to implement the Observer pattern.
Definition: Observable.h:38
static const std::string DUMP_CONFIG
virtual void handleMessage(const std::shared_ptr< SourceGroupInterface > &group) override
void setVarianceCheckImage(std::shared_ptr< Image< SeFloat >> variance_image)
Definition: CheckImages.h:92
PluginManager handles the loading of plugins and calls their registration function,...
Definition: PluginManager.h:53
static Logging getLogger(const std::string &name="")
STL class.
std::vector< std::string > & m_plugin_list
static const std::string PROPERTY_COLUMN_MAPPING_ALL
#define CREATE_MANAGER_WITH_ARGS(MANAGER, ELEMENTS_PROGRAM,...)
T emplace_back(T... args)
static std::shared_ptr< ProcessedImage< T, P > > create(std::shared_ptr< const Image< T >> image_a, std::shared_ptr< const Image< T >> image_b)