SatDump 2.0.0-alpha-76a915210
Loading...
Searching...
No Matches
punctiform_product_handler.h
1#pragma once
2
4#include "product_handler.h"
6
7namespace satdump
8{
9 namespace handlers
10 {
11 class PunctiformProductHandler : public ProductHandler
12 {
13 public:
14 PunctiformProductHandler(std::shared_ptr<products::Product> p, bool dataset_mode = false);
15 ~PunctiformProductHandler();
16
17 // Products
19
20 // Needed for local stuff
21 enum current_mode_t
22 {
23 MODE_GRAPH,
24 MODE_DOTMAP,
25 MODE_FILLMAP,
26 };
27
28 current_mode_t current_mode = MODE_GRAPH;
29 float progress = 0;
30
31 ImageHandler img_handler;
32
33 std::string selected_channel;
34 double range_min = 0;
35 double range_max = 10;
36
37 // Proc function
38 void do_process();
39
40 // The Rest
41 void drawMenu();
42 void drawContents(ImVec2 win_size);
43 void drawMenuBar();
44
45 //
46 void addSubHandler(std::shared_ptr<Handler> handler, bool ontop = false) { img_handler.addSubHandler(handler, ontop); }
47
48 void delSubHandler(std::shared_ptr<Handler> handler, bool now = false) { img_handler.delSubHandler(handler, true); }
49
50 bool drawTreeMenu(std::shared_ptr<Handler> &h) { return img_handler.drawTreeMenu(h); }
51
52 void setConfig(nlohmann::json p);
53 nlohmann::json getConfig();
54
55 void saveResult(std::string directory);
56
57 std::string getID() { return "punctiform_product_handler"; }
58 };
59 } // namespace handlers
60} // namespace satdump
The main standard ImageHandler.
Definition image_handler.h:33
ProductHandler(std::shared_ptr< products::Product > p, bool dataset_mode=false, std::function< bool(nlohmann::ordered_json &)> filterPreset=[](auto &) { return true;})
Constructor.
Definition product_handler.cpp:17
void drawContents(ImVec2 win_size)
Render explorer contents (center/left)
Definition punctiform_product_handler.cpp:168
void do_process()
Actual processing function to be implemented by the child class.
Definition punctiform_product_handler.cpp:127
nlohmann::json getConfig()
Optional, allows getting a configuration/state as JSON.
Definition punctiform_product_handler.cpp:109
void drawMenuBar()
Render explorer menu bar (in the left sidebar)
Definition punctiform_product_handler.cpp:162
void delSubHandler(std::shared_ptr< Handler > handler, bool now=false)
Delete a subhandler.
Definition punctiform_product_handler.h:48
void setConfig(nlohmann::json p)
Optional, allows setting a configuration/state from JSON.
Definition punctiform_product_handler.cpp:92
bool drawTreeMenu(std::shared_ptr< Handler > &h)
Render explorer menu bar (in the left sidebar)
Definition punctiform_product_handler.h:50
void addSubHandler(std::shared_ptr< Handler > handler, bool ontop=false)
Add a new subhandler.
Definition punctiform_product_handler.h:46
void drawMenu()
Render explorer menu left sidebar.
Definition punctiform_product_handler.cpp:28
Definition punctiform_product.h:19