mirror of
https://github.com/SatDump/SatDump
synced 2026-08-13 17:47:30 -04:00
53 lines
No EOL
1.4 KiB
C++
53 lines
No EOL
1.4 KiB
C++
#pragma once
|
|
|
|
#include "../handler.h"
|
|
#include "../processing_handler.h"
|
|
|
|
#include "logger.h"
|
|
#include "common/widgets/image_view.h"
|
|
|
|
namespace satdump
|
|
{
|
|
namespace viewer
|
|
{
|
|
class ImageHandler : public Handler, public ProcessingHandler
|
|
{
|
|
public:
|
|
ImageHandler();
|
|
~ImageHandler();
|
|
|
|
bool imgview_needs_update = false;
|
|
bool has_second_image = false;
|
|
image::Image image, curr_image;
|
|
ImageViewWidget image_view;
|
|
|
|
image::Image &get_current_img() { return has_second_image ? curr_image : image; }
|
|
|
|
void updateImage(image::Image &img) // TODOREWORK
|
|
{
|
|
image = img;
|
|
process();
|
|
}
|
|
|
|
// All params
|
|
bool equalize_img = false;
|
|
bool equalize_perchannel_img = false;
|
|
bool white_balance_img = false;
|
|
bool normalize_img = false;
|
|
bool median_blur_img = false;
|
|
|
|
// Proc function
|
|
void do_process();
|
|
|
|
// The Rest
|
|
void drawMenu();
|
|
void drawContents(ImVec2 win_size);
|
|
void drawMenuBar();
|
|
|
|
std::string getName() { return "ImageTODOREWORK"; }
|
|
|
|
static std::string getID() { return "image_handler"; }
|
|
static std::shared_ptr<Handler> getInstance() { return std::make_shared<ImageHandler>(); }
|
|
};
|
|
}
|
|
} |