28 #include <boost/filesystem.hpp>
38 namespace SourceXtractor {
41 if (property_id.
getTypeId() == PropertyId::create<MeasurementFrame>().getTypeId()) {
42 auto instance = property_id.
getIndex();
60 background_analyzer_factory.
configure(manager);
61 for (
auto& image_info : image_infos) {
62 auto measurement_frame = std::make_shared<MeasurementImageFrame>(
63 image_info.m_measurement_image,
64 image_info.m_weight_image,
65 image_info.m_weight_threshold,
66 image_info.m_coordinate_system,
68 image_info.m_saturation_level,
72 auto background_model = background_analyzer->analyzeBackground(
73 image_info.m_measurement_image,
74 image_info.m_weight_image,
76 image_info.m_measurement_image->getHeight(),
false),
77 measurement_frame->getVarianceThreshold());
79 if (image_info.m_is_background_constant) {
80 measurement_frame->setBackgroundLevel(image_info.m_constant_background_value);
82 measurement_frame->setBackgroundLevel(background_model.getLevelMap());
86 label << boost::filesystem::basename(image_info.m_path) <<
"_" << image_info.m_image_hdu;
87 measurement_frame->setLabel(label.
str());
89 if (image_info.m_weight_image !=
nullptr) {
90 if (image_info.m_absolute_weight) {
91 measurement_frame->setVarianceMap(image_info.m_weight_image);
94 image_info.m_weight_image,
95 background_model.getScalingFactor());
96 measurement_frame->setVarianceMap(scaled_image);
99 measurement_frame->setVarianceMap(background_model.getVarianceMap());
void registerConfiguration()