9 #define TEXT_BUFF_SIZE 1024 14 static std::map<const char*, bool> edit_mode;
15 static std::map<const char*, std::string> edit_value;
46 edit_mode[
id] =
false;
55 val_str = &edit_value[
id];
56 return &edit_mode[
id];
65 return lastChar == str.size();
67 catch (std::invalid_argument&)
71 catch (std::out_of_range&)
77 template<
class T,
class S>
81 int temp = val->*field;
82 int min = (val + 1)->*field;
83 int max = (val + 2)->*field;
94 strcpy(buff, val_ptr->c_str());
101 error_message =
"Invalid numeric input!";
120 template<
class T,
class S>
123 bool temp = (val->*
f) > 0;
127 val->*f = temp ? 1 : 0;
132 template<
class T,
class S>
136 float temp = float(val->*field);
137 float min = float((val + 1)->*field);
138 float max = float((val + 2)->*field);
150 strcpy(buff, val_ptr->c_str());
157 error_message =
"Invalid numeric input!";
171 val->*field =
static_cast<S
>(temp);
204 if (get_curr_advanced_controls)
206 for (
int k = 0; k < 3; ++k)
227 get_curr_advanced_controls =
false;
uint32_t rauDiffThresholdBlue
void set_color_control(const STColorControl &group)
void set_slo_color_thresholds_control(const STSloColorThresholdsControl &group)
float stof(const std::string &value)
IMGUI_API void SetTooltip(const char *fmt,...) IM_PRINTFARGS(1)
uint32_t disableSLOLeftColor
void set_slo_penalty_control(const STSloPenaltyControl &group)
void slider_int(std::string &error_message, const char *id, T *val, S T::*field, bool &to_set)
STAEControl get_ae_control(int mode=0) const
void set_ae_control(const STAEControl &group)
void set_census(const STCensusRadius &group)
uint32_t textureCountThreshold
STColorControl get_color_control(int mode=0) const
void slider_float(std::string &error_message, const char *id, T *val, S T::*field, bool &to_set)
GLsizei const GLchar *const * string
void checkbox(const char *id, T *val, S T::*f, bool &to_set)
uint32_t sloK2PenaltyMod2
param_group< STSloPenaltyControl > spc
IMGUI_API bool InputText(const char *label, char *buf, size_t buf_size, ImGuiInputTextFlags flags=0, ImGuiTextEditCallback callback=NULL, void *user_data=NULL)
IMGUI_API bool SliderInt(const char *label, int *v, int v_min, int v_max, const char *display_format="%.0f", bool render_bg=false)
IMGUI_API bool TreeNode(const char *label)
uint32_t diffThresholdRed
void set_depth_control(const STDepthControlGroup &group)
uint32_t deepSeaMedianThreshold
uint32_t sloK1PenaltyMod2
param_group< STRauSupportVectorControl > rsvc
IMGUI_API void SameLine(float pos_x=0.0f, float spacing_w=-1.0f)
void set_depth_table(const STDepthTableControl &group)
STDepthControlGroup get_depth_control(int mode=0) const
param_group< STSloColorThresholdsControl > sctc
STCensusRadius get_census(int mode=0) const
uint32_t disableSLORightColor
param_group< STRauColorThresholdsControl > rctc
void set_rau_thresholds_control(const STRauColorThresholdsControl &group)
uint32_t meanIntensitySetPoint
void draw_advanced_mode_controls(rs400::advanced_mode &advanced, advanced_mode_control &amc, bool &get_curr_advanced_controls, bool &was_set, std::string &error_message)
param_group< STAFactor > amp_factor
param_group< STCensusRadius > census
IMGUI_API void SetCursorPosX(float x)
IMGUI_API void PushItemWidth(float item_width)
bool string_to_int(const std::string &str, float &result)
IMGUI_API void Text(const char *fmt,...) IM_PRINTFARGS(1)
IMGUI_API bool Button(const char *label, const ImVec2 &size=ImVec2(0, 0))
STHdad get_hdad(int mode=0) const
param_group< STAEControl > ae
IMGUI_API void PushStyleColor(ImGuiCol idx, const ImVec4 &col)
param_group< STDepthControlGroup > depth_controls
void set_hdad(const STHdad &group)
STAFactor get_amp_factor(int mode=0) const
STSloColorThresholdsControl get_slo_color_thresholds_control(int mode=0) const
STColorCorrection get_color_correction(int mode=0) const
IMGUI_API bool SliderFloat(const char *label, float *v, float v_min, float v_max, const char *display_format="%.3f", float power=1.0f, bool render_bg=false)
param_group< STColorCorrection > cc
IMGUI_API void PopItemWidth()
uint32_t lrAgreeThreshold
STRauColorThresholdsControl get_rau_thresholds_control(int mode=0) const
param_group< STColorControl > color_control
void set_rau_support_vector_control(const STRauSupportVectorControl &group)
uint32_t sloK2PenaltyMod1
uint32_t diffThresholdGreen
IMGUI_API bool Checkbox(const char *label, bool *v)
void set_color_correction(const STColorCorrection &group)
bool * draw_edit_button(const char *id, T val, std::string *&val_str)
uint32_t disableSADNormalize
uint32_t sloK1PenaltyMod1
uint32_t deepSeaNeighborThreshold
void set_rsm(const STRsm &group)
param_group< STHdad > hdad
uint32_t textureDifferenceThreshold
uint32_t rauDiffThresholdRed
param_group< STDepthTableControl > depth_table
STSloPenaltyControl get_slo_penalty_control(int mode=0) const
uint32_t rauDiffThresholdGreen
void set_amp_factor(const STAFactor &group)
STDepthTableControl get_depth_table(int mode=0) const
uint32_t diffThresholdBlue
uint32_t deepSeaSecondPeakThreshold
IMGUI_API bool IsItemHovered()
STRsm get_rsm(int mode=0) const
STRauSupportVectorControl get_rau_support_vector_control(int mode=0) const
IMGUI_API void PopStyleColor(int count=1)
std::string to_string(T value)