19 #include <SDL_opengl.h>
21 #include "tinycolormap.hpp"
25 #include "imgui_impl_sdl.h"
26 #include "imgui_impl_opengl3.h"
27 #include "imgui_stdlib.h"
28 #include "imgui_internal.h"
29 #include "imfilebrowser.h"
51 void set_data(
int width,
int height, std::vector<T> *data);
72 ImGuiIO &io = ImGui::GetIO();
73 ImGui::FileBrowser saveFileDialog;
74 ImGui::FileBrowser saveDataDialog;
77 float start_x, start_y;
78 float start_xs, start_ys;
79 const char *cmaps[13] = {
"Parula",
"Heat",
"Jet",
"Turbo",
"Hot",
"Gray",
"Magma",
"Inferno",
"Plasma",
"Viridis",
"Cividis",
"Github",
"HSV"};
92 int render_update_offset;
100 std::vector<std::complex<float>> data_fft;
101 std::vector<float> data_fft_f;
102 std::vector<std::complex<float>> data_val;
105 SDL_Surface *sdl_srf;
109 inline void render_image(
int ye);
110 inline void render_image();
111 inline void set_min_max();
112 inline void set_min_max(
int last_y);
113 inline void reset_limits();
114 inline void set_pixel(
int idx,
int idy);
115 inline void compute_fft();
117 inline bool detect_frame_switch(
int &fr_count);
118 inline float get_val(
int idx);
119 inline void value_tooltip(
const int x,
const int y,
const float zoom);
GIM_Flags operator|(GIM_Flags lhs, GIM_Flags rhs)
GIM_Flags operator&(GIM_Flags lhs, GIM_Flags rhs)
ImGuiImageWindow(const std::string &title, GLuint *tex_id, bool auto_render, int data_cmap, GIM_Flags flags=GIM_Flags::None, bool *visible=nullptr)
void set_nx_ny(int width, int height)
void set_data(int width, int height, std::vector< T > *data)
ImGuiImageWindow< float > * fft_window
void render_window(bool b_redraw, int last_y, int render_update_offset, bool b_trigger_update)