Fixed forgot a label in viewmethod Retinex

This commit is contained in:
Desmis
2016-01-25 08:17:19 +01:00
parent 723b6d5580
commit fa70b1be57

View File

@@ -8,9 +8,9 @@
using namespace rtengine;
using namespace rtengine::procparams;
Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), false, true)
Retinex::Retinex () : FoldableToolPanel (this, "retinex", M ("TP_RETINEX_LABEL"), false, true)
{
CurveListener::setMulti(true);
CurveListener::setMulti (true);
std::vector<GradientMilestone> milestones;
nextmin = 0.;
nextmax = 0.;
@@ -22,120 +22,120 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"),
nextmaxT = 0.;
Gtk::VBox * retinexVBox = Gtk::manage ( new Gtk::VBox());
retinexVBox->set_border_width(4);
retinexVBox->set_spacing(2);
retinexVBox->set_border_width (4);
retinexVBox->set_spacing (2);
Gtk::VBox * settingsVBox = Gtk::manage ( new Gtk::VBox());
settingsVBox->set_border_width(4);
settingsVBox->set_spacing(2);
settingsVBox->set_border_width (4);
settingsVBox->set_spacing (2);
dhbox = Gtk::manage (new Gtk::HBox ());
labmdh = Gtk::manage (new Gtk::Label (M("TP_RETINEX_METHOD") + ":"));
labmdh = Gtk::manage (new Gtk::Label (M ("TP_RETINEX_METHOD") + ":"));
dhbox->pack_start (*labmdh, Gtk::PACK_SHRINK, 1);
retinexMethod = Gtk::manage (new MyComboBoxText ());
retinexMethod->append (M("TP_RETINEX_LOW"));
retinexMethod->append (M("TP_RETINEX_UNIFORM"));
retinexMethod->append (M("TP_RETINEX_HIGH"));
retinexMethod->append (M("TP_RETINEX_HIGHLIG"));
retinexMethod->append (M ("TP_RETINEX_LOW"));
retinexMethod->append (M ("TP_RETINEX_UNIFORM"));
retinexMethod->append (M ("TP_RETINEX_HIGH"));
retinexMethod->append (M ("TP_RETINEX_HIGHLIG"));
// retinexMethod->append (M("TP_RETINEX_HIGHLIGPLUS"));
retinexMethod->set_active(0);
retinexMethodConn = retinexMethod->signal_changed().connect ( sigc::mem_fun(*this, &Retinex::retinexMethodChanged) );
retinexMethod->set_tooltip_markup (M("TP_RETINEX_METHOD_TOOLTIP"));
retinexMethod->set_active (0);
retinexMethodConn = retinexMethod->signal_changed().connect ( sigc::mem_fun (*this, &Retinex::retinexMethodChanged) );
retinexMethod->set_tooltip_markup (M ("TP_RETINEX_METHOD_TOOLTIP"));
retinexcolorspace = Gtk::manage (new MyComboBoxText ());
retinexcolorspace->append (M("TP_RETINEX_LABSPACE"));
retinexcolorspace->append (M("TP_RETINEX_HSLSPACE_LOG"));
retinexcolorspace->append (M("TP_RETINEX_HSLSPACE_LIN"));
retinexcolorspace->set_active(0);
retinexColorSpaceConn = retinexcolorspace->signal_changed().connect ( sigc::mem_fun(*this, &Retinex::retinexColorSpaceChanged) );
retinexcolorspace->append (M ("TP_RETINEX_LABSPACE"));
retinexcolorspace->append (M ("TP_RETINEX_HSLSPACE_LOG"));
retinexcolorspace->append (M ("TP_RETINEX_HSLSPACE_LIN"));
retinexcolorspace->set_active (0);
retinexColorSpaceConn = retinexcolorspace->signal_changed().connect ( sigc::mem_fun (*this, &Retinex::retinexColorSpaceChanged) );
dhbox->pack_start(*retinexMethod);
dhbox->pack_start(*retinexcolorspace);
retinexVBox->pack_start(*dhbox);
dhbox->pack_start (*retinexMethod);
dhbox->pack_start (*retinexcolorspace);
retinexVBox->pack_start (*dhbox);
// Histogram equalizer Lab curve
curveEditorGD = new CurveEditorGroup (options.lastRetinexDir, M("TP_RETINEX_CONTEDIT_LAB"));
curveEditorGD = new CurveEditorGroup (options.lastRetinexDir, M ("TP_RETINEX_CONTEDIT_LAB"));
curveEditorGD->setCurveListener (this);
cdshape = static_cast<DiagonalCurveEditor*>(curveEditorGD->addCurve(CT_Diagonal, M("TP_RETINEX_CURVEEDITOR_CD")));
cdshape->setTooltip(M("TP_RETINEX_CURVEEDITOR_CD_TOOLTIP"));
cdshape = static_cast<DiagonalCurveEditor*> (curveEditorGD->addCurve (CT_Diagonal, M ("TP_RETINEX_CURVEEDITOR_CD")));
cdshape->setTooltip (M ("TP_RETINEX_CURVEEDITOR_CD_TOOLTIP"));
std::vector<GradientMilestone> milestones22;
milestones22.push_back( GradientMilestone(0., 0., 0., 0.) );
milestones22.push_back( GradientMilestone(1., 1., 1., 1.) );
cdshape->setBottomBarBgGradient(milestones22);
cdshape->setLeftBarBgGradient(milestones22);
milestones22.push_back ( GradientMilestone (0., 0., 0., 0.) );
milestones22.push_back ( GradientMilestone (1., 1., 1., 1.) );
cdshape->setBottomBarBgGradient (milestones22);
cdshape->setLeftBarBgGradient (milestones22);
curveEditorGD->curveListComplete();
// Histogram equalizer HSL curve
curveEditorGDH = new CurveEditorGroup (options.lastRetinexDir, M("TP_RETINEX_CONTEDIT_HSL"));
curveEditorGDH = new CurveEditorGroup (options.lastRetinexDir, M ("TP_RETINEX_CONTEDIT_HSL"));
curveEditorGDH->setCurveListener (this);
cdshapeH = static_cast<DiagonalCurveEditor*>(curveEditorGDH->addCurve(CT_Diagonal, M("TP_RETINEX_CURVEEDITOR_CD")));
cdshapeH->setTooltip(M("TP_RETINEX_CURVEEDITOR_CD_TOOLTIP"));
cdshapeH = static_cast<DiagonalCurveEditor*> (curveEditorGDH->addCurve (CT_Diagonal, M ("TP_RETINEX_CURVEEDITOR_CD")));
cdshapeH->setTooltip (M ("TP_RETINEX_CURVEEDITOR_CD_TOOLTIP"));
std::vector<GradientMilestone> milestones22H;
milestones22H.push_back( GradientMilestone(0., 0., 0., 0.) );
milestones22H.push_back( GradientMilestone(1., 1., 1., 1.) );
cdshapeH->setBottomBarBgGradient(milestones22H);
cdshapeH->setLeftBarBgGradient(milestones22H);
milestones22H.push_back ( GradientMilestone (0., 0., 0., 0.) );
milestones22H.push_back ( GradientMilestone (1., 1., 1., 1.) );
cdshapeH->setBottomBarBgGradient (milestones22H);
cdshapeH->setLeftBarBgGradient (milestones22H);
curveEditorGDH->curveListComplete();
curveEditormap = new CurveEditorGroup (options.lastRetinexDir, M("TP_RETINEX_CONTEDIT_MAP"));
curveEditormap = new CurveEditorGroup (options.lastRetinexDir, M ("TP_RETINEX_CONTEDIT_MAP"));
curveEditormap->setCurveListener (this);
mapshape = static_cast<DiagonalCurveEditor*>(curveEditormap->addCurve(CT_Diagonal, M("TP_RETINEX_CURVEEDITOR_MAP")));
mapshape->setTooltip(M("TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP"));
mapshape = static_cast<DiagonalCurveEditor*> (curveEditormap->addCurve (CT_Diagonal, M ("TP_RETINEX_CURVEEDITOR_MAP")));
mapshape->setTooltip (M ("TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP"));
std::vector<GradientMilestone> milestones222;
milestones222.push_back( GradientMilestone(0., 0., 0., 0.) );
milestones222.push_back( GradientMilestone(1., 1., 1., 1.) );
mapshape->setBottomBarBgGradient(milestones222);
mapshape->setLeftBarBgGradient(milestones222);
milestones222.push_back ( GradientMilestone (0., 0., 0., 0.) );
milestones222.push_back ( GradientMilestone (1., 1., 1., 1.) );
mapshape->setBottomBarBgGradient (milestones222);
mapshape->setLeftBarBgGradient (milestones222);
curveEditormap->curveListComplete();
// Transmission map curve
transmissionCurveEditorG = new CurveEditorGroup (options.lastRetinexDir, M("TP_RETINEX_TRANSMISSION"));
transmissionCurveEditorG = new CurveEditorGroup (options.lastRetinexDir, M ("TP_RETINEX_TRANSMISSION"));
transmissionCurveEditorG->setCurveListener (this);
std::vector<double> defaultCurve;
rtengine::RetinexParams::getDefaulttransmissionCurve(defaultCurve);
transmissionShape = static_cast<FlatCurveEditor*>(transmissionCurveEditorG->addCurve(CT_Flat, "", NULL, false));
transmissionShape->setIdentityValue(0.);
transmissionShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve);
transmissionShape->setBottomBarBgGradient(milestones);
transmissionCurveEditorG->set_tooltip_markup (M("TP_RETINEX_TRANSMISSION_TOOLTIP"));
rtengine::RetinexParams::getDefaulttransmissionCurve (defaultCurve);
transmissionShape = static_cast<FlatCurveEditor*> (transmissionCurveEditorG->addCurve (CT_Flat, "", NULL, false));
transmissionShape->setIdentityValue (0.);
transmissionShape->setResetCurve (FlatCurveType (defaultCurve.at (0)), defaultCurve);
transmissionShape->setBottomBarBgGradient (milestones);
transmissionCurveEditorG->set_tooltip_markup (M ("TP_RETINEX_TRANSMISSION_TOOLTIP"));
transmissionCurveEditorG->curveListComplete();
gambox = Gtk::manage (new Gtk::HBox ());
labgam = Gtk::manage (new Gtk::Label (M("TP_RETINEX_GAMMA") + ":"));
labgam = Gtk::manage (new Gtk::Label (M ("TP_RETINEX_GAMMA") + ":"));
gambox->pack_start (*labgam, Gtk::PACK_SHRINK, 1);
gammaretinex = Gtk::manage (new MyComboBoxText ());
gammaretinex->append (M("TP_RETINEX_GAMMA_NONE"));
gammaretinex->append (M("TP_RETINEX_GAMMA_LOW"));
gammaretinex->append (M("TP_RETINEX_GAMMA_MID"));
gammaretinex->append (M("TP_RETINEX_GAMMA_HIGH"));
gammaretinex->append (M("TP_RETINEX_GAMMA_FREE"));
gammaretinex->set_active(0);
gammaretinexConn = gammaretinex->signal_changed().connect ( sigc::mem_fun(*this, &Retinex::gammaretinexChanged) );
gammaretinex->set_tooltip_markup (M("TP_RETINEX_GAMMA_TOOLTIP"));
gammaretinex->append (M ("TP_RETINEX_GAMMA_NONE"));
gammaretinex->append (M ("TP_RETINEX_GAMMA_LOW"));
gammaretinex->append (M ("TP_RETINEX_GAMMA_MID"));
gammaretinex->append (M ("TP_RETINEX_GAMMA_HIGH"));
gammaretinex->append (M ("TP_RETINEX_GAMMA_FREE"));
gammaretinex->set_active (0);
gammaretinexConn = gammaretinex->signal_changed().connect ( sigc::mem_fun (*this, &Retinex::gammaretinexChanged) );
gammaretinex->set_tooltip_markup (M ("TP_RETINEX_GAMMA_TOOLTIP"));
gam = Gtk::manage (new Adjuster (M("TP_RETINEX_FREEGAMMA"), 0.6, 3.0, 0.01, 1.30));
slope = Gtk::manage (new Adjuster (M("TP_RETINEX_SLOPE"), 1., 20., 0.1, 3.));
gam = Gtk::manage (new Adjuster (M ("TP_RETINEX_FREEGAMMA"), 0.6, 3.0, 0.01, 1.30));
slope = Gtk::manage (new Adjuster (M ("TP_RETINEX_SLOPE"), 1., 20., 0.1, 3.));
str = Gtk::manage (new Adjuster (M("TP_RETINEX_STRENGTH"), 0, 100., 1., 20.));
neigh = Gtk::manage (new Adjuster (M("TP_RETINEX_NEIGHBOR"), 6, 100., 1., 80.));
highl = Gtk::manage (new Adjuster (M("TP_RETINEX_HIGHLIGHT"), 1, 20, 1, 4));
highl->set_tooltip_markup (M("TP_RETINEX_HIGHLIGHT_TOOLTIP"));
vart = Gtk::manage (new Adjuster (M("TP_RETINEX_VARIANCE"), 50, 500, 1, 200));
vart->set_tooltip_markup (M("TP_RETINEX_VARIANCE_TOOLTIP"));
str = Gtk::manage (new Adjuster (M ("TP_RETINEX_STRENGTH"), 0, 100., 1., 20.));
neigh = Gtk::manage (new Adjuster (M ("TP_RETINEX_NEIGHBOR"), 6, 100., 1., 80.));
highl = Gtk::manage (new Adjuster (M ("TP_RETINEX_HIGHLIGHT"), 1, 20, 1, 4));
highl->set_tooltip_markup (M ("TP_RETINEX_HIGHLIGHT_TOOLTIP"));
vart = Gtk::manage (new Adjuster (M ("TP_RETINEX_VARIANCE"), 50, 500, 1, 200));
vart->set_tooltip_markup (M ("TP_RETINEX_VARIANCE_TOOLTIP"));
expsettings = new MyExpander (false, M("TP_RETINEX_SETTINGS"));
expsettings->signal_button_release_event().connect_notify( sigc::bind( sigc::mem_fun(this, &Retinex::foldAllButMe), expsettings) );
expsettings = new MyExpander (false, M ("TP_RETINEX_SETTINGS"));
expsettings->signal_button_release_event().connect_notify ( sigc::bind ( sigc::mem_fun (this, &Retinex::foldAllButMe), expsettings) );
retinexVBox->pack_start (*str);
str->show ();
@@ -149,98 +149,99 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"),
retinexVBox->pack_start (*highl);
highl->show ();
mMLabels = Gtk::manage(new Gtk::Label("---", Gtk::ALIGN_CENTER));
mMLabels->set_tooltip_markup (M("TP_RETINEX_MLABEL_TOOLTIP"));
mMLabels = Gtk::manage (new Gtk::Label ("---", Gtk::ALIGN_CENTER));
mMLabels->set_tooltip_markup (M ("TP_RETINEX_MLABEL_TOOLTIP"));
transLabels = Gtk::manage(new Gtk::Label("---", Gtk::ALIGN_CENTER));
transLabels->set_tooltip_markup (M("TP_RETINEX_TLABEL_TOOLTIP"));
transLabels2 = Gtk::manage(new Gtk::Label("---", Gtk::ALIGN_CENTER));
transLabels = Gtk::manage (new Gtk::Label ("---", Gtk::ALIGN_CENTER));
transLabels->set_tooltip_markup (M ("TP_RETINEX_TLABEL_TOOLTIP"));
transLabels2 = Gtk::manage (new Gtk::Label ("---", Gtk::ALIGN_CENTER));
scal = Gtk::manage (new Adjuster (M("TP_RETINEX_SCALES"), -1, 6., 1., 3.));
iter = Gtk::manage (new Adjuster (M("TP_RETINEX_ITER"), 1, 5., 1., 1.));
grad = Gtk::manage (new Adjuster (M("TP_RETINEX_GRAD"), -2., 2., 1., 1.));
grads = Gtk::manage (new Adjuster (M("TP_RETINEX_GRADS"), -2., 2., 1., 1.));
gain = Gtk::manage (new Adjuster (M("TP_RETINEX_GAIN"), 20, 200, 1, 50));
offs = Gtk::manage (new Adjuster (M("TP_RETINEX_OFFSET"), -10000, 10000, 1, 0));
scal = Gtk::manage (new Adjuster (M ("TP_RETINEX_SCALES"), -1, 6., 1., 3.));
iter = Gtk::manage (new Adjuster (M ("TP_RETINEX_ITER"), 1, 5., 1., 1.));
grad = Gtk::manage (new Adjuster (M ("TP_RETINEX_GRAD"), -2., 2., 1., 1.));
grads = Gtk::manage (new Adjuster (M ("TP_RETINEX_GRADS"), -2., 2., 1., 1.));
gain = Gtk::manage (new Adjuster (M ("TP_RETINEX_GAIN"), 20, 200, 1, 50));
offs = Gtk::manage (new Adjuster (M ("TP_RETINEX_OFFSET"), -10000, 10000, 1, 0));
// vart = Gtk::manage (new Adjuster (M("TP_RETINEX_VARIANCE"), 50, 500, 1, 125));
limd = Gtk::manage (new Adjuster (M("TP_RETINEX_THRESHOLD"), 2, 100, 1, 8));
baselog = Gtk::manage (new Adjuster (M("TP_RETINEX_BASELOG"), 1.1, 100., 0.001, 2.718));
limd = Gtk::manage (new Adjuster (M ("TP_RETINEX_THRESHOLD"), 2, 100, 1, 8));
baselog = Gtk::manage (new Adjuster (M ("TP_RETINEX_BASELOG"), 1.1, 100., 0.001, 2.718));
// grbl = Gtk::manage (new Adjuster (M("TP_RETINEX_HIGHLIGHT3"), 1, 100, 1, 50));
gain->set_tooltip_markup (M("TP_RETINEX_GAIN_TOOLTIP"));
scal->set_tooltip_markup (M("TP_RETINEX_SCALES_TOOLTIP"));
iter->set_tooltip_markup (M("TP_RETINEX_ITER_TOOLTIP"));
grad->set_tooltip_markup (M("TP_RETINEX_GRAD_TOOLTIP"));
grads->set_tooltip_markup (M("TP_RETINEX_GRADS_TOOLTIP"));
gain->set_tooltip_markup (M ("TP_RETINEX_GAIN_TOOLTIP"));
scal->set_tooltip_markup (M ("TP_RETINEX_SCALES_TOOLTIP"));
iter->set_tooltip_markup (M ("TP_RETINEX_ITER_TOOLTIP"));
grad->set_tooltip_markup (M ("TP_RETINEX_GRAD_TOOLTIP"));
grads->set_tooltip_markup (M ("TP_RETINEX_GRADS_TOOLTIP"));
// vart->set_tooltip_markup (M("TP_RETINEX_VARIANCE_TOOLTIP"));
limd->set_tooltip_markup (M("TP_RETINEX_THRESHOLD_TOOLTIP"));
baselog->set_tooltip_markup (M("TP_RETINEX_BASELOG_TOOLTIP"));
limd->set_tooltip_markup (M ("TP_RETINEX_THRESHOLD_TOOLTIP"));
baselog->set_tooltip_markup (M ("TP_RETINEX_BASELOG_TOOLTIP"));
Gtk::Frame *p1Frame;
p1Frame = Gtk::manage (new Gtk::Frame(M("TP_RETINEX_LABEL_MASK")) );
p1Frame->set_border_width(0);
p1Frame->set_label_align(0.025, 0.5);
p1Frame = Gtk::manage (new Gtk::Frame (M ("TP_RETINEX_LABEL_MASK")) );
p1Frame->set_border_width (0);
p1Frame->set_label_align (0.025, 0.5);
Gtk::VBox *p1VBox;
p1VBox = Gtk::manage ( new Gtk::VBox());
p1VBox->set_border_width(4);
p1VBox->set_spacing(2);
p1VBox->set_border_width (4);
p1VBox->set_spacing (2);
mapbox = Gtk::manage (new Gtk::HBox ());
labmap = Gtk::manage (new Gtk::Label (M("TP_RETINEX_MAP") + ":"));
labmap = Gtk::manage (new Gtk::Label (M ("TP_RETINEX_MAP") + ":"));
mapbox->pack_start (*labmap, Gtk::PACK_SHRINK, 1);
mapMethod = Gtk::manage (new MyComboBoxText ());
mapMethod->append (M("TP_RETINEX_MAP_NONE"));
mapMethod->append (M ("TP_RETINEX_MAP_NONE"));
// mapMethod->append (M("TP_RETINEX_MAP_CURV"));
mapMethod->append (M("TP_RETINEX_MAP_GAUS"));
mapMethod->append (M("TP_RETINEX_MAP_MAPP"));
mapMethod->append (M("TP_RETINEX_MAP_MAPT"));
mapMethod->set_active(0);
mapMethodConn = mapMethod->signal_changed().connect ( sigc::mem_fun(*this, &Retinex::mapMethodChanged) );
mapMethod->set_tooltip_markup (M("TP_RETINEX_MAP_METHOD_TOOLTIP"));
mapMethod->append (M ("TP_RETINEX_MAP_GAUS"));
mapMethod->append (M ("TP_RETINEX_MAP_MAPP"));
mapMethod->append (M ("TP_RETINEX_MAP_MAPT"));
mapMethod->set_active (0);
mapMethodConn = mapMethod->signal_changed().connect ( sigc::mem_fun (*this, &Retinex::mapMethodChanged) );
mapMethod->set_tooltip_markup (M ("TP_RETINEX_MAP_METHOD_TOOLTIP"));
highlights = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_HIGHLIGHTS"), 0, 100, 1, 0));
h_tonalwidth = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_HLTONALW"), 10, 100, 1, 80));
shadows = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_SHADOWS"), 0, 100, 1, 0));
s_tonalwidth = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_SHTONALW"), 10, 100, 1, 80));
radius = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_RADIUS"), 5, 100, 1, 40));
highlights = Gtk::manage (new Adjuster (M ("TP_SHADOWSHLIGHTS_HIGHLIGHTS"), 0, 100, 1, 0));
h_tonalwidth = Gtk::manage (new Adjuster (M ("TP_SHADOWSHLIGHTS_HLTONALW"), 10, 100, 1, 80));
shadows = Gtk::manage (new Adjuster (M ("TP_SHADOWSHLIGHTS_SHADOWS"), 0, 100, 1, 0));
s_tonalwidth = Gtk::manage (new Adjuster (M ("TP_SHADOWSHLIGHTS_SHTONALW"), 10, 100, 1, 80));
radius = Gtk::manage (new Adjuster (M ("TP_SHADOWSHLIGHTS_RADIUS"), 5, 100, 1, 40));
viewbox = Gtk::manage (new Gtk::HBox ());
labview = Gtk::manage (new Gtk::Label (M("TP_RETINEX_VIEW") + ":"));
labview = Gtk::manage (new Gtk::Label (M ("TP_RETINEX_VIEW") + ":"));
viewbox->pack_start (*labview, Gtk::PACK_SHRINK, 1);
viewMethod = Gtk::manage (new MyComboBoxText ());
viewMethod->append (M("TP_RETINEX_VIEW_UNSHARP"));
viewMethod->append (M("TP_RETINEX_VIEW_MASK"));
viewMethod->append (M("TP_RETINEX_VIEW_TRAN"));
viewMethod->append (M("TP_RETINEX_VIEW_TRAN2"));
viewMethod->set_active(0);
viewMethodConn = viewMethod->signal_changed().connect ( sigc::mem_fun(*this, &Retinex::viewMethodChanged) );
viewMethod->set_tooltip_markup (M("TP_RETINEX_VIEW_METHOD_TOOLTIP"));
viewMethod->append (M ("TP_RETINEX_VIEW_NONE"));
viewMethod->append (M ("TP_RETINEX_VIEW_UNSHARP"));
viewMethod->append (M ("TP_RETINEX_VIEW_MASK"));
viewMethod->append (M ("TP_RETINEX_VIEW_TRAN"));
viewMethod->append (M ("TP_RETINEX_VIEW_TRAN2"));
viewMethod->set_active (0);
viewMethodConn = viewMethod->signal_changed().connect ( sigc::mem_fun (*this, &Retinex::viewMethodChanged) );
viewMethod->set_tooltip_markup (M ("TP_RETINEX_VIEW_METHOD_TOOLTIP"));
curveEditorGH = new CurveEditorGroup (options.lastRetinexDir, M("TP_RETINEX_CONTEDIT_LH"));
curveEditorGH = new CurveEditorGroup (options.lastRetinexDir, M ("TP_RETINEX_CONTEDIT_LH"));
curveEditorGH->setCurveListener (this);
lhshape = static_cast<FlatCurveEditor*>(curveEditorGH->addCurve(CT_Flat, M("TP_RETINEX_CURVEEDITOR_LH")));
lhshape->setTooltip(M("TP_RETINEX_CURVEEDITOR_LH_TOOLTIP"));
lhshape->setCurveColorProvider(this, 4);
lhshape = static_cast<FlatCurveEditor*> (curveEditorGH->addCurve (CT_Flat, M ("TP_RETINEX_CURVEEDITOR_LH")));
lhshape->setTooltip (M ("TP_RETINEX_CURVEEDITOR_LH_TOOLTIP"));
lhshape->setCurveColorProvider (this, 4);
milestones.clear();
for (int i = 0; i < 7; i++) {
float R, G, B;
float x = float(i) * (1.0f / 6.0);
Color::hsv2rgb01(x, 0.5f, 0.5f, R, G, B);
milestones.push_back( GradientMilestone(double(x), double(R), double(G), double(B)) );
float x = float (i) * (1.0f / 6.0);
Color::hsv2rgb01 (x, 0.5f, 0.5f, R, G, B);
milestones.push_back ( GradientMilestone (double (x), double (R), double (G), double (B)) );
}
lhshape->setBottomBarBgGradient(milestones);
lhshape->setBottomBarBgGradient (milestones);
curveEditorGH->curveListComplete();
medianmap = Gtk::manage (new Gtk::CheckButton (M("TP_RETINEX_MEDIAN")));
medianmap = Gtk::manage (new Gtk::CheckButton (M ("TP_RETINEX_MEDIAN")));
medianmap->set_active (true);
medianmapConn = medianmap->signal_toggled().connect( sigc::mem_fun(*this, &Retinex::medianmapChanged) );
medianmapConn = medianmap->signal_toggled().connect ( sigc::mem_fun (*this, &Retinex::medianmapChanged) );
settingsVBox->pack_start (*mMLabels);
mMLabels->show ();
@@ -260,9 +261,9 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"),
settingsVBox->pack_start (*curveEditorGH, Gtk::PACK_SHRINK, 4);
curveEditorGH->show();
gambox->pack_start(*gammaretinex);
gambox->pack_start (*gammaretinex);
settingsVBox->pack_start(*gambox);
settingsVBox->pack_start (*gambox);
gammaretinex->show();
settingsVBox->pack_start (*gam);
@@ -298,14 +299,14 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"),
// settingsVBox->pack_start (*Gtk::manage (new Gtk::HSeparator()));
viewbox->pack_start(*viewMethod);
viewbox->pack_start (*viewMethod);
// settingsVBox->pack_start(*viewbox);
retinexVBox->pack_start(*viewbox);
retinexVBox->pack_start (*viewbox);
//settingsVBox->pack_start (*viewMethod);
mapbox->pack_start(*mapMethod);
mapbox->pack_start (*mapMethod);
// settingsVBox->pack_start(*mapbox);
p1VBox->pack_start(*mapbox);
p1VBox->pack_start (*mapbox);
p1VBox->pack_start (*curveEditormap, Gtk::PACK_SHRINK, 4);
curveEditormap->show();
@@ -333,21 +334,21 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"),
// grbl->show ();
// settingsVBox->pack_start (*Gtk::manage (new Gtk::HSeparator()));
settingsVBox->pack_start( *transmissionCurveEditorG, Gtk::PACK_SHRINK, 2);
settingsVBox->pack_start ( *transmissionCurveEditorG, Gtk::PACK_SHRINK, 2);
transmissionCurveEditorG->show();
settingsVBox->pack_start (*medianmap);
medianmap->show ();
expsettings->add(*settingsVBox);
expsettings->add (*settingsVBox);
neutrHBox = Gtk::manage (new Gtk::HBox ());
neutrHBox->set_border_width (2);
neutral = Gtk::manage (new Gtk::Button (M("TP_RETINEX_NEUTRAL")));
neutral = Gtk::manage (new Gtk::Button (M ("TP_RETINEX_NEUTRAL")));
RTImage *resetImg = Gtk::manage (new RTImage ("gtk-undo-ltr-small.png", "gtk-undo-rtl-small.png"));
neutral->set_image(*resetImg);
neutral->set_tooltip_text (M("TP_RETINEX_NEUTRAL_TIP"));
neutralconn = neutral->signal_pressed().connect( sigc::mem_fun(*this, &Retinex::neutral_pressed) );
neutral->set_image (*resetImg);
neutral->set_tooltip_text (M ("TP_RETINEX_NEUTRAL_TIP"));
neutralconn = neutral->signal_pressed().connect ( sigc::mem_fun (*this, &Retinex::neutral_pressed) );
neutral->show();
neutrHBox->pack_start (*neutral);
@@ -475,7 +476,7 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"),
}
*/
pack_start (*retinexVBox);
p1Frame->add(*p1VBox);
p1Frame->add (*p1VBox);
pack_start (*p1Frame, Gtk::PACK_EXPAND_WIDGET, 4);
pack_start (*expsettings);
@@ -500,30 +501,30 @@ Retinex::~Retinex()
}
void Retinex::neutral_pressed ()
{
neigh->resetValue(false);
gain->resetValue(false);
offs->resetValue(false);
str->resetValue(false);
scal->resetValue(false);
iter->resetValue(false);
grad->resetValue(false);
grads->resetValue(false);
vart->resetValue(false);
limd->resetValue(false);
highl->resetValue(false);
baselog->resetValue(false);
gam->resetValue(false);
slope->resetValue(false);
highlights->resetValue(false);
h_tonalwidth->resetValue(false);
shadows->resetValue(false);
s_tonalwidth->resetValue(false);
radius->resetValue(false);
mapMethod->set_active(0);
viewMethod->set_active(0);
retinexMethod->set_active(2);
retinexcolorspace->set_active(0);
gammaretinex->set_active(0);
neigh->resetValue (false);
gain->resetValue (false);
offs->resetValue (false);
str->resetValue (false);
scal->resetValue (false);
iter->resetValue (false);
grad->resetValue (false);
grads->resetValue (false);
vart->resetValue (false);
limd->resetValue (false);
highl->resetValue (false);
baselog->resetValue (false);
gam->resetValue (false);
slope->resetValue (false);
highlights->resetValue (false);
h_tonalwidth->resetValue (false);
shadows->resetValue (false);
s_tonalwidth->resetValue (false);
radius->resetValue (false);
mapMethod->set_active (0);
viewMethod->set_active (0);
retinexMethod->set_active (2);
retinexcolorspace->set_active (0);
gammaretinex->set_active (0);
transmissionShape->reset();
cdshape->reset();
cdshapeH->reset();
@@ -534,19 +535,19 @@ void Retinex::neutral_pressed ()
void Retinex::foldAllButMe (GdkEventButton* event, MyExpander *expander)
{
if (event->button == 3) {
expsettings->set_expanded(expsettings == expander);
expsettings->set_expanded (expsettings == expander);
}
}
void Retinex::writeOptions(std::vector<int> &tpOpen)
void Retinex::writeOptions (std::vector<int> &tpOpen)
{
tpOpen.push_back (expsettings->get_expanded ());
}
void Retinex::updateToolState(std::vector<int> &tpOpen)
void Retinex::updateToolState (std::vector<int> &tpOpen)
{
if(tpOpen.size() == 10) {
expsettings->set_expanded(tpOpen.at(9));
if (tpOpen.size() == 10) {
expsettings->set_expanded (tpOpen.at (9));
}
}
@@ -557,7 +558,7 @@ void Retinex::updateToolState(std::vector<int> &tpOpen)
int minmaxChangedUI (void* data)
{
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
(static_cast<Retinex*>(data))->minmaxComputed_ ();
(static_cast<Retinex*> (data))->minmaxComputed_ ();
return 0;
}
@@ -592,10 +593,10 @@ void Retinex::updateLabel ()
nX = nextmin;
nY = nextmax;
{
mMLabels->set_text(
Glib::ustring::compose(M("TP_RETINEX_MLABEL"),
Glib::ustring::format(std::fixed, std::setprecision(0), nX),
Glib::ustring::format(std::fixed, std::setprecision(0), nY))
mMLabels->set_text (
Glib::ustring::compose (M ("TP_RETINEX_MLABEL"),
Glib::ustring::format (std::fixed, std::setprecision (0), nX),
Glib::ustring::format (std::fixed, std::setprecision (0), nY))
);
}
}
@@ -612,17 +613,17 @@ void Retinex::updateTrans ()
nB = nextmaxT;
nS = nextsigma;
{
transLabels->set_text(
Glib::ustring::compose(M("TP_RETINEX_TLABEL"),
Glib::ustring::format(std::fixed, std::setprecision(1), nm),
Glib::ustring::format(std::fixed, std::setprecision(1), nM),
Glib::ustring::format(std::fixed, std::setprecision(1), nZ),
Glib::ustring::format(std::fixed, std::setprecision(1), nS))
transLabels->set_text (
Glib::ustring::compose (M ("TP_RETINEX_TLABEL"),
Glib::ustring::format (std::fixed, std::setprecision (1), nm),
Glib::ustring::format (std::fixed, std::setprecision (1), nM),
Glib::ustring::format (std::fixed, std::setprecision (1), nZ),
Glib::ustring::format (std::fixed, std::setprecision (1), nS))
);
transLabels2->set_text(
Glib::ustring::compose(M("TP_RETINEX_TLABEL2"),
Glib::ustring::format(std::fixed, std::setprecision(1), nA),
Glib::ustring::format(std::fixed, std::setprecision(1), nB))
transLabels2->set_text (
Glib::ustring::compose (M ("TP_RETINEX_TLABEL2"),
Glib::ustring::format (std::fixed, std::setprecision (1), nA),
Glib::ustring::format (std::fixed, std::setprecision (1), nB))
);
@@ -635,11 +636,11 @@ void Retinex::updateTrans ()
void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited)
{
disableListener ();
retinexMethodConn.block(true);
retinexColorSpaceConn.block(true);
gammaretinexConn.block(true);
mapMethodConn.block(true);
viewMethodConn.block(true);
retinexMethodConn.block (true);
retinexColorSpaceConn.block (true);
gammaretinexConn.block (true);
mapMethodConn.block (true);
viewMethodConn.block (true);
if (pedited) {
@@ -667,23 +668,23 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited)
if (!pedited->retinex.retinexMethod) {
retinexMethod->set_active_text(M("GENERAL_UNCHANGED"));
retinexMethod->set_active_text (M ("GENERAL_UNCHANGED"));
}
if (!pedited->retinex.mapMethod) {
mapMethod->set_active_text(M("GENERAL_UNCHANGED"));
mapMethod->set_active_text (M ("GENERAL_UNCHANGED"));
}
if (!pedited->retinex.viewMethod) {
viewMethod->set_active_text(M("GENERAL_UNCHANGED"));
viewMethod->set_active_text (M ("GENERAL_UNCHANGED"));
}
if (!pedited->retinex.retinexcolorspace) {
retinexcolorspace->set_active_text(M("GENERAL_UNCHANGED"));
retinexcolorspace->set_active_text (M ("GENERAL_UNCHANGED"));
}
if (!pedited->retinex.gammaretinex) {
gammaretinex->set_active_text(M("GENERAL_UNCHANGED"));
gammaretinex->set_active_text (M ("GENERAL_UNCHANGED"));
}
cdshape->setUnChanged (!pedited->retinex.cdcurve);
@@ -716,14 +717,14 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited)
s_tonalwidth->setValue (pp->retinex.stonalwidth);
// grbl->setValue (pp->retinex.grbl);
if(pp->retinex.iter == 1) {
grad->set_sensitive(false);
scal->set_sensitive(false);
grads->set_sensitive(false);
if (pp->retinex.iter == 1) {
grad->set_sensitive (false);
scal->set_sensitive (false);
grads->set_sensitive (false);
} else {
grad->set_sensitive(true);
scal->set_sensitive(true);
grads->set_sensitive(true);
grad->set_sensitive (true);
scal->set_sensitive (true);
grads->set_sensitive (true);
}
setEnabled (pp->retinex.enabled);
@@ -794,20 +795,20 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited)
mapMethodChanged ();
viewMethodChanged ();
medianmapConn.block(true);
medianmapConn.block (true);
medianmapChanged ();
medianmapConn.block(false);
medianmapConn.block (false);
cdshape->setCurve (pp->retinex.cdcurve);
cdshapeH->setCurve (pp->retinex.cdHcurve);
lhshape->setCurve (pp->retinex.lhcurve);
mapshape->setCurve (pp->retinex.mapcurve);
retinexMethodConn.block(false);
retinexColorSpaceConn.block(false);
gammaretinexConn.block(false);
mapMethodConn.block(false);
viewMethodConn.block(false);
retinexMethodConn.block (false);
retinexColorSpaceConn.block (false);
gammaretinexConn.block (false);
mapMethodConn.block (false);
viewMethodConn.block (false);
transmissionShape->setCurve (pp->retinex.transmissionCurve);
@@ -849,11 +850,11 @@ void Retinex::write (ProcParams* pp, ParamsEdited* pedited)
pp->retinex.stonalwidth = (int)s_tonalwidth->getValue ();
if (pedited) {
pedited->retinex.retinexMethod = retinexMethod->get_active_text() != M("GENERAL_UNCHANGED");
pedited->retinex.retinexcolorspace = retinexcolorspace->get_active_text() != M("GENERAL_UNCHANGED");
pedited->retinex.gammaretinex = gammaretinex->get_active_text() != M("GENERAL_UNCHANGED");
pedited->retinex.mapMethod = mapMethod->get_active_text() != M("GENERAL_UNCHANGED");
pedited->retinex.viewMethod = viewMethod->get_active_text() != M("GENERAL_UNCHANGED");
pedited->retinex.retinexMethod = retinexMethod->get_active_text() != M ("GENERAL_UNCHANGED");
pedited->retinex.retinexcolorspace = retinexcolorspace->get_active_text() != M ("GENERAL_UNCHANGED");
pedited->retinex.gammaretinex = gammaretinex->get_active_text() != M ("GENERAL_UNCHANGED");
pedited->retinex.mapMethod = mapMethod->get_active_text() != M ("GENERAL_UNCHANGED");
pedited->retinex.viewMethod = viewMethod->get_active_text() != M ("GENERAL_UNCHANGED");
//%%%%%%%%%%%%%%%%%%%%%%
pedited->retinex.str = str->getEditedState ();
@@ -948,7 +949,7 @@ void Retinex::write (ProcParams* pp, ParamsEdited* pedited)
void Retinex::retinexMethodChanged()
{
if(retinexMethod->get_active_row_number() == 3) {
if (retinexMethod->get_active_row_number() == 3) {
highl->show();
} else {
highl->hide();
@@ -964,14 +965,14 @@ void Retinex::retinexMethodChanged()
void Retinex::mapMethodChanged()
{
if(mapMethod->get_active_row_number() == 1 /*|| mapMethod->get_active_row_number() == 2*/) {
if (mapMethod->get_active_row_number() == 1 /*|| mapMethod->get_active_row_number() == 2*/) {
curveEditormap->show();
highlights->show();
h_tonalwidth->show();
shadows->show();
s_tonalwidth->show();
radius->show();
} else if(mapMethod->get_active_row_number() == 2 || mapMethod->get_active_row_number() == 3) {
} else if (mapMethod->get_active_row_number() == 2 || mapMethod->get_active_row_number() == 3) {
curveEditormap->show();
highlights->show();
h_tonalwidth->show();
@@ -995,7 +996,7 @@ void Retinex::mapMethodChanged()
void Retinex::viewMethodChanged()
{
if(viewMethod->get_active_row_number() == 1 || viewMethod->get_active_row_number() == 2) {
if (viewMethod->get_active_row_number() == 1 || viewMethod->get_active_row_number() == 2) {
// vart->hide();
gain->hide();
offs->hide();
@@ -1007,7 +1008,7 @@ void Retinex::viewMethodChanged()
grad->hide();
grads->hide();
curveEditorGH->hide();
} else if(viewMethod->get_active_row_number() == 3 || viewMethod->get_active_row_number() == 4) {
} else if (viewMethod->get_active_row_number() == 3 || viewMethod->get_active_row_number() == 4) {
gain->hide();
offs->hide();
// vart->hide();
@@ -1039,15 +1040,15 @@ void Retinex::ColorSpaceUpdateUI ()
if (!batchMode) {
curveEditorGH->show();
if(retinexcolorspace->get_active_row_number() == 0) {
if (retinexcolorspace->get_active_row_number() == 0) {
curveEditorGD->show();
curveEditorGDH->hide();
baselog->show();
} else if(retinexcolorspace->get_active_row_number() == 1) {
} else if (retinexcolorspace->get_active_row_number() == 1) {
curveEditorGD->hide();
curveEditorGDH->show();
baselog->show();
} else if(retinexcolorspace->get_active_row_number() == 2) {
} else if (retinexcolorspace->get_active_row_number() == 2) {
curveEditorGD->hide();
curveEditorGDH->show();
baselog->hide();
@@ -1068,10 +1069,10 @@ void Retinex::retinexColorSpaceChanged()
void Retinex::gammaretinexChanged()
{
if (!batchMode) {
if(gammaretinex->get_active_row_number() == 4) {
if (gammaretinex->get_active_row_number() == 4) {
gam->show();
slope->show();
} else if(gammaretinex->get_active_row_number() != 4) {
} else if (gammaretinex->get_active_row_number() != 4) {
gam->hide();
slope->hide();
}
@@ -1102,11 +1103,11 @@ void Retinex::medianmapChanged ()
if (listener) {
if (medianmap->get_active()) {
if (getEnabled()) {
listener->panelChanged (EvRetinexmedianmap, M("GENERAL_ENABLED"));
listener->panelChanged (EvRetinexmedianmap, M ("GENERAL_ENABLED"));
}
} else {
if (getEnabled()) {
listener->panelChanged (EvRetinexmedianmap, M("GENERAL_DISABLED"));
listener->panelChanged (EvRetinexmedianmap, M ("GENERAL_DISABLED"));
}
}
@@ -1190,14 +1191,14 @@ void Retinex::setDefaults (const ProcParams* defParams, const ParamsEdited* pedi
void Retinex::setAdjusterBehavior (bool strAdd, bool neighAdd, bool limdAdd, bool gainAdd, bool offsAdd, bool vartAdd, bool gamAdd, bool slopeAdd)
{
str->setAddMode(strAdd);
neigh->setAddMode(neighAdd);
limd->setAddMode(limdAdd);
gain->setAddMode(gainAdd);
offs->setAddMode(offsAdd);
vart->setAddMode(vartAdd);
gam->setAddMode(gamAdd);
slope->setAddMode(slopeAdd);
str->setAddMode (strAdd);
neigh->setAddMode (neighAdd);
limd->setAddMode (limdAdd);
gain->setAddMode (gainAdd);
offs->setAddMode (offsAdd);
vart->setAddMode (vartAdd);
gam->setAddMode (gamAdd);
slope->setAddMode (slopeAdd);
}
@@ -1208,14 +1209,14 @@ void Retinex::adjusterChanged (Adjuster* a, double newval)
return;
}
if(iter->getTextValue() > "1") {
scal->set_sensitive(true);
grad->set_sensitive(true);
grads->set_sensitive(true);
if (iter->getTextValue() > "1") {
scal->set_sensitive (true);
grad->set_sensitive (true);
grads->set_sensitive (true);
} else {
scal->set_sensitive(false);
grad->set_sensitive(false);
grads->set_sensitive(false);
scal->set_sensitive (false);
grad->set_sensitive (false);
grads->set_sensitive (false);
}
@@ -1282,15 +1283,15 @@ void Retinex::curveChanged (CurveEditor* ce)
{
if (listener && getEnabled()) {
if (ce == cdshape) {
listener->panelChanged (EvLCDCurve, M("HISTORY_CUSTOMCURVE"));
listener->panelChanged (EvLCDCurve, M ("HISTORY_CUSTOMCURVE"));
} else if (ce == cdshapeH) {
listener->panelChanged (EvLCDHCurve, M("HISTORY_CUSTOMCURVE"));
listener->panelChanged (EvLCDHCurve, M ("HISTORY_CUSTOMCURVE"));
} else if (ce == transmissionShape) {
listener->panelChanged (EvRetinextransmission, M("HISTORY_CUSTOMCURVE"));
listener->panelChanged (EvRetinextransmission, M ("HISTORY_CUSTOMCURVE"));
} else if (ce == lhshape) {
listener->panelChanged (EvRetinexlhcurve, M("HISTORY_CUSTOMCURVE"));
listener->panelChanged (EvRetinexlhcurve, M ("HISTORY_CUSTOMCURVE"));
} else if (ce == mapshape) {
listener->panelChanged (EvRetinexmapcurve, M("HISTORY_CUSTOMCURVE"));
listener->panelChanged (EvRetinexmapcurve, M ("HISTORY_CUSTOMCURVE"));
}
}
}
@@ -1300,11 +1301,11 @@ void Retinex::enabledChanged ()
if (listener) {
if (get_inconsistent()) {
listener->panelChanged (EvRetinexEnabled, M("GENERAL_UNCHANGED"));
listener->panelChanged (EvRetinexEnabled, M ("GENERAL_UNCHANGED"));
} else if (getEnabled()) {
listener->panelChanged (EvRetinexEnabled, M("GENERAL_ENABLED"));
listener->panelChanged (EvRetinexEnabled, M ("GENERAL_ENABLED"));
} else {
listener->panelChanged (EvRetinexEnabled, M("GENERAL_DISABLED"));
listener->panelChanged (EvRetinexEnabled, M ("GENERAL_DISABLED"));
}
}
}
@@ -1312,23 +1313,23 @@ void Retinex::enabledChanged ()
void Retinex::trimValues (rtengine::procparams::ProcParams* pp)
{
str->trimValue(pp->retinex.str);
scal->trimValue(pp->retinex.scal);
iter->trimValue(pp->retinex.iter);
grad->trimValue(pp->retinex.grad);
grads->trimValue(pp->retinex.grads);
neigh->trimValue(pp->retinex.neigh);
gain->trimValue(pp->retinex.gain);
offs->trimValue(pp->retinex.offs);
vart->trimValue(pp->retinex.vart);
limd->trimValue(pp->retinex.limd);
highl->trimValue(pp->retinex.highl);
baselog->trimValue(pp->retinex.baselog);
str->trimValue (pp->retinex.str);
scal->trimValue (pp->retinex.scal);
iter->trimValue (pp->retinex.iter);
grad->trimValue (pp->retinex.grad);
grads->trimValue (pp->retinex.grads);
neigh->trimValue (pp->retinex.neigh);
gain->trimValue (pp->retinex.gain);
offs->trimValue (pp->retinex.offs);
vart->trimValue (pp->retinex.vart);
limd->trimValue (pp->retinex.limd);
highl->trimValue (pp->retinex.highl);
baselog->trimValue (pp->retinex.baselog);
// grbl->trimValue(pp->retinex.grbl);
gam->trimValue(pp->retinex.gam);
slope->trimValue(pp->retinex.slope);
highlights->trimValue(pp->retinex.highlights);
shadows->trimValue(pp->retinex.shadows);
gam->trimValue (pp->retinex.gam);
slope->trimValue (pp->retinex.slope);
highlights->trimValue (pp->retinex.highlights);
shadows->trimValue (pp->retinex.shadows);
}
void Retinex::updateCurveBackgroundHistogram (LUTu & histToneCurve, LUTu & histLCurve, LUTu & histCCurve,/* LUTu & histCLurve, LUTu & histLLCurve,*/ LUTu & histLCAM, LUTu & histCCAM, LUTu & histRed, LUTu & histGreen, LUTu & histBlue, LUTu & histLuma, LUTu & histLRETI)
@@ -1349,24 +1350,24 @@ void Retinex::colorForValue (double valX, double valY, enum ColorCaller::ElemTyp
if (callerId == 1) { // ch - main curve
Color::hsv2rgb01(float(valX), float(valY), 0.5f, R, G, B);
Color::hsv2rgb01 (float (valX), float (valY), 0.5f, R, G, B);
} else if (callerId == 2) { // cc - bottom bar
float value = (1.f - 0.7f) * float(valX) + 0.7f;
float value = (1.f - 0.7f) * float (valX) + 0.7f;
// whole hue range
// Y axis / from 0.15 up to 0.75 (arbitrary values; was 0.45 before)
Color::hsv2rgb01(float(valY), float(valX), value, R, G, B);
Color::hsv2rgb01 (float (valY), float (valX), value, R, G, B);
} else if (callerId == 3) { // lc - bottom bar
float value = (1.f - 0.7f) * float(valX) + 0.7f;
float value = (1.f - 0.7f) * float (valX) + 0.7f;
// whole hue range
// Y axis / from 0.15 up to 0.75 (arbitrary values; was 0.45 before)
Color::hsv2rgb01(float(valY), float(valX), value, R, G, B);
Color::hsv2rgb01 (float (valY), float (valX), value, R, G, B);
} else if (callerId == 4) { // LH - bottom bar
Color::hsv2rgb01(float(valX), 0.5f, float(valY), R, G, B);
Color::hsv2rgb01 (float (valX), 0.5f, float (valY), R, G, B);
} else if (callerId == 5) { // HH - bottom bar
float h = float((valY - 0.5) * 0.3 + valX);
float h = float ((valY - 0.5) * 0.3 + valX);
if (h > 1.0f) {
h -= 1.0f;
@@ -1374,12 +1375,12 @@ void Retinex::colorForValue (double valX, double valY, enum ColorCaller::ElemTyp
h += 1.0f;
}
Color::hsv2rgb01(h, 0.5f, 0.5f, R, G, B);
Color::hsv2rgb01 (h, 0.5f, 0.5f, R, G, B);
}
caller->ccRed = double(R);
caller->ccGreen = double(G);
caller->ccBlue = double(B);
caller->ccRed = double (R);
caller->ccGreen = double (G);
caller->ccBlue = double (B);
}