SourceXtractorPlusPlus  0.12
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VignetTaskFactory.cpp
Go to the documentation of this file.
1 
32 
33 namespace SourceXtractor {
34 
37 }
38 
40  auto vignet_config = manager.getConfiguration<VignetConfig>();
41  m_vignet_size = vignet_config.getVignetSize();
42  m_vignet_default_pixval = vignet_config.getVignetDefaultPixval();
43 
44  auto& measurement_config = manager.getConfiguration<MeasurementImageConfig>();
45  const auto& image_infos = measurement_config.getImageInfos();
46 
48 
49  for (size_t i = 0; i < image_infos.size(); ++i) {
50  m_images.push_back(image_infos[i].m_id);
51  }
52 }
53 
55  if (property_id.getTypeId() == typeid(Vignet)) {
56  return std::make_shared<VignetSourceTask>(property_id.getIndex(), m_vignet_size, m_vignet_default_pixval);
57  }
58  else if (property_id == PropertyId::create<VignetArray>()) {
59  return std::make_shared<VignetArraySourceTask>(m_images);
60  }
61  return nullptr;
62 }
63 
64 } // end of namespace SourceXtractor
65 
std::vector< unsigned > m_images
STL class.
T push_back(T...args)
const std::vector< MeasurementImageInfo > & getImageInfos() const
unsigned int getIndex() const
Definition: PropertyId.h:70
Identifier used to set and retrieve properties.
Definition: PropertyId.h:40
std::type_index getTypeId() const
Definition: PropertyId.h:66
void reportConfigDependencies(Euclid::Configuration::ConfigManager &manager) const override
Registers all the Configuration dependencies.
void configure(Euclid::Configuration::ConfigManager &manager) override
Method which should initialize the object.
std::shared_ptr< Task > createTask(const PropertyId &property_id) const override
Returns a Task producing a Property corresponding to the given PropertyId.