MCPcopy Create free account
hub / github.com/SatDump/SatDump / update

Method update

src-interface/viewer/scatterometer_handler.cpp:63–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61 }
62
63 void ScatterometerViewerHandler::update()
64 {
65 if (selected_visualization_id == 0)
66 {
67 GrayScaleScatCfg cfg;
68 cfg.channel = select_channel_image_id;
69 cfg.min = scat_grayscale_min;
70 cfg.max = scat_grayscale_max;
71 current_img = make_scatterometer_grayscale(*products, cfg);
72 image_view.update(current_img);
73 }
74 else if (selected_visualization_id == 1)
75 {
76 GrayScaleScatCfg cfg;
77 if (current_scat_type == SCAT_ASCAT)
78 cfg.channel = ascat_select_channel_id;
79 else
80 cfg.channel = select_channel_image_id;
81 cfg.min = scat_grayscale_min;
82 cfg.max = scat_grayscale_max;
83 current_image_proj.clear();
84 current_img = make_scatterometer_grayscale_projs(*products, cfg, nullptr, &current_image_proj);
85
86 if (overlay_handler.enabled())
87 {
88 auto proj_func = satdump::reprojection::setupProjectionFunction(current_img.width(), current_img.height(), current_image_proj, {});
89 overlay_handler.apply(current_img, proj_func);
90 }
91
92 image_view.update(current_img);
93 }
94 }
95
96 void ScatterometerViewerHandler::asyncUpdate()
97 {

Callers

nothing calls this directly

Calls 8

setupProjectionFunctionFunction · 0.85
enabledMethod · 0.80
widthMethod · 0.80
heightMethod · 0.80
clearMethod · 0.45
applyMethod · 0.45

Tested by

no test coverage detected