SatDump 2.0.0-alpha-520736c72
Loading...
Searching...
No Matches
xrit_channel_processor.h
Go to the documentation of this file.
1#pragma once
2
7
8#include "image/image.h"
11#include "xrit/xrit_file.h"
12#include <mutex>
13
14namespace satdump
15{
16 namespace xrit
17 {
39 {
40 private:
41 std::map<std::string, std::shared_ptr<SegmentedImageDecoder>> segmented_decoders;
42
43 private:
44 struct XRITProd
45 {
46 std::string directory_path;
47 std::string pro_f_path;
48 std::shared_ptr<products::ImageProduct> pro;
49 };
50
51 private:
57 XRITProd setupProduct(xrit::XRITFileInfo &meta);
58
64 bool saveMeta(xrit::XRITFileInfo &meta, XRITFile &file);
65
71 void saveImg(xrit::XRITFileInfo &meta, image::Image &img);
72
73 private:
74 // TODOREWORK DOCUMENT
75 void process_composites(std::shared_ptr<products::ImageProduct> pro, std::string pro_path);
76
77 public:
78 enum xrit_image_status
79 {
80 RECEIVING,
81 SAVING,
82 IDLE
83 };
84
86 {
87 xrit_image_status imageStatus = RECEIVING;
88 const int img_width = 256, img_height = 256;
89
90 // UI Stuff
91 bool hasToUpdate = false;
92 unsigned int textureID = 0;
93 uint32_t *textureBuffer;
94 };
95
96 std::map<std::string, std::unique_ptr<wip_images>> all_wip_images;
97 std::mutex ui_img_mtx;
98
99 public:
100 std::string directory = "";
101 bool in_memory_mode = false;
102 std::map<std::string, std::shared_ptr<products::ImageProduct>> in_memory_products;
103
104 public:
106
114 void push(xrit::XRITFileInfo &finfo, XRITFile &file);
115
121 void flush();
122 };
123 } // namespace xrit
124} // namespace satdump
Definition image.h:17
All-in-on class to convert a set of xRIT files provided in an arbitrary order into products.
Definition xrit_channel_processor.h:39
void flush()
Forces all segmented decoders that do hold data to save their images now. Should be called when the d...
Definition xrit_channel_processor.cpp:106
void push(xrit::XRITFileInfo &finfo, XRITFile &file)
Push a file to process. See class documenation for more information on using this class.
Definition xrit_channel_processor.cpp:17
Core Image class.
ImageProduct implementation.
Base segmented decoder class.
Definition xrit_channel_processor.h:86
Struct holding all identifying information on a xRIT files being processed.
Definition identify.h:56
Definition xrit_file.h:143