From 1d45e92f86edaf73e0624c670670f67ad91ecb0b Mon Sep 17 00:00:00 2001 From: Desmis Date: Wed, 4 Dec 2019 14:32:11 +0100 Subject: [PATCH] Save work --- rtdata/languages/default | 17 ++ rtengine/procevents.h | 12 ++ rtengine/procparams.cc | 54 +++++- rtengine/procparams.h | 12 ++ rtengine/refreshmap.cc | 14 +- rtgui/locallab.cc | 367 +++++++++++++++++++++++++++++++++++++-- rtgui/locallab.h | 27 ++- rtgui/paramsedited.cc | 81 ++++++++- rtgui/paramsedited.h | 12 ++ 9 files changed, 575 insertions(+), 21 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index 646826b8d..0bf90c6f1 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1081,6 +1081,12 @@ HISTORY_MSG_841;Local - LC curve HISTORY_MSG_842;Local - Contrast Threshold Mask blur HISTORY_MSG_843;Local - Radius Mask blur HISTORY_MSG_844;Local - Color Mask fftw +HISTORY_MSG_845;Local - Encoding log +HISTORY_MSG_846;Local - Encoding auto +HISTORY_MSG_847;Local - SourceGray +HISTORY_MSG_848;Local - SourceGray auto +HISTORY_MSG_849;Local - Auto Grayon +HISTORY_MSG_849;Local - Auto Grayoff HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction @@ -2154,10 +2160,12 @@ TP_LOCALLAB_ALL;All rubrics TP_LOCALLAB_AMOUNT;Amount TP_LOCALLAB_ARTIF;Shape detection TP_LOCALLAB_ARTIF_TOOLTIP;Increase deltaE Weakening improve shape detection, but can reduce the scope of detection.\nThreshold deltaE-scope increase the range of scope-deltaE - high values are for very wide gamut images.\nThreshold structure take into account the structure level of solid areas +TP_LOCALLAB_AUTOGRAY;Automatic TP_LOCALLAB_AVOID;Avoid color shift TP_LOCALLAB_BALAN;Balance deltaE ab-L TP_LOCALLAB_BALANEXP;PDE balance TP_LOCALLAB_BILATERAL;Bilateral filter +TP_LOCALLAB_BLACK_EV;Black Ev TP_LOCALLAB_BLENDMASKCOL;Blend TP_LOCALLAB_BLGUID;Guided Filter Luminance TP_LOCALLAB_BLINV;Inverse @@ -2223,6 +2231,7 @@ TP_LOCALLAB_DEHAZ;Strength TP_LOCALLAB_DELTAEC;Mask DeltaE Image TP_LOCALLAB_DENOIS;Denoise TP_LOCALLAB_DEPTH;Depth +TP_LOCALLAB_DETAIL;Detail TP_LOCALLAB_DETAILSH;Details TP_LOCALLAB_DETAILTHR;Detail threshold Luminance Chroma (DCT) TP_LOCALLAB_DUPLSPOTNAME;Copy @@ -2316,7 +2325,11 @@ TP_LOCALLAB_LMASK_LEVEL_TOOLTIP;Give priority to action on midtones and high lig TP_LOCALLAB_LMASK_LL_TOOLTIP;Give priority to action on midtones and high lights TP_LOCALLAB_LOCCONT;Unsharp Mask TP_LOCALLAB_LOC_CONTRAST;Local contrast +TP_LOCALLAB_LOG;Encoding log +TP_LOCALLAB_LOGAUTO;Automatic +TP_LOCALLAB_LOGFRA;Source Gray Point TP_LOCALLAB_LOGLIN;Logarithm mode +TP_LOCALLAB_LOGPFRA;Relative Exposure Levels TP_LOCALLAB_LUM;Curves LL - CC TP_LOCALLAB_LUMADARKEST;Darkest TP_LOCALLAB_LUMASK;Luminance Background Mask @@ -2435,6 +2448,7 @@ TP_LOCALLAB_SENSIEXCLU;Scope TP_LOCALLAB_SENSIEXCLU_TOOLTIP;Adjust color to include in exclusion! TP_LOCALLAB_SENSIH;Scope TP_LOCALLAB_SENSIH_TOOLTIP; Adjust scope of action:\nSmall values limit action to colors very similar to those under the center spot.\nHigh values let the tool act upon a wider range of colors.\nValues smaller than 20 lead to a better algorithm. +TP_LOCALLAB_SENSILOG;Scope TP_LOCALLAB_SENSIS;Scope TP_LOCALLAB_SENSIS_TOOLTIP;Adjust scope of action:\nSmall values limit action to colors very similar to those under the center spot.\nHigh values let the tool act upon a wider range of colors.\nValues smaller than 20 lead to a better algorithm. TP_LOCALLAB_SENSI_TOOLTIP;Adjust scope of action:\nSmall values limit action to colors very similar to those under the center spot.\nHigh values let the tool act upon a wider range of colors.\nValues smaller than 20 lead to a better algorithm. @@ -2487,6 +2501,7 @@ TP_LOCALLAB_SOFTMETHOD_TOOLTIP;Original Retinex is very different from others Re TP_LOCALLAB_SOFTRADIUSCOL;Soft radius TP_LOCALLAB_SOFTRETI;Reduce artifact deltaE TP_LOCALLAB_SOFTRETI_TOOLTIP;Take into account deltaE to improve Transmission map +TP_LOCALLAB_SOURCE_GRAY;Value TP_LOCALLAB_SPECIAL;Special use of RGB curves TP_LOCALLAB_SPOTNAME;Control Spot # TP_LOCALLAB_STD;Standard @@ -2505,6 +2520,7 @@ TP_LOCALLAB_STYPE;Shape method TP_LOCALLAB_STYPE_TOOLTIP;You can choose between:\nSymmetrical - left handle linked to right, top handle linked to bottom.\nIndependent - all handles are independent. TP_LOCALLAB_SYM;Symmetrical (mouse) TP_LOCALLAB_SYMSL;Symmetrical (mouse + sliders) +TP_LOCALLAB_TARGET_GRAY;Target Gray Point TP_LOCALLAB_THRES;Threshold structure TP_LOCALLAB_THRESDELTAE;Threshold deltaE-scope TP_LOCALLAB_THRESRETI;Threshold @@ -2541,6 +2557,7 @@ TP_LOCALLAB_WAVLOW;Wavelet low TP_LOCALLAB_WAVMASK;Mask Levels local contrast TP_LOCALLAB_WAVMED;Wavelet normal TP_LOCALLAB_WEDIANHI;Median Hi +TP_LOCALLAB_WHITE_EV;White Ev TP_LOCAL_HEIGHT;Bottom TP_LOCAL_HEIGHT_T;Top TP_LOCAL_WIDTH;Right diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 0f7b5a008..2c479774a 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -868,6 +868,18 @@ enum ProcEventCode { Evlocallabblurcol = 841, Evlocallabcontcol = 842, EvLocallabfftColorMask = 843, + EvLocenalog = 844, + EvLocallabAuto = 845, + EvlocallabsourceGray = 846, + EvlocallabsourceGrayAuto = 847, + EvlocallabAutoGrayOn = 848, + EvlocallabAutoGrayOff = 849, + EvlocallabAutogray = 850, + EvlocallabblackEv = 851, + EvlocallabwhiteEv = 852, + EvlocallabtargetGray = 853, + Evlocallabdetail = 854, + Evlocallabsensilog = 855, NUMOFEVENTS }; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 3c02aba23..607404055 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2766,7 +2766,19 @@ LocallabParams::LocallabSpot::LocallabSpot() : adjblur(0), bilateral(0), sensiden(20), - detailthr(0) + detailthr(0), + //log encoding + explog(false), + autocompute(false), +// autogray(true), + sourceGray(18.), + targetGray(18.), + Autogray(true), + blackEv(-5.0), + whiteEv(10.0), + detail(1), + sensilog(30) + { } @@ -3144,7 +3156,19 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && adjblur == other.adjblur && bilateral == other.bilateral && sensiden == other.sensiden - && detailthr == other.detailthr; + && detailthr == other.detailthr + //log encoding + && expdenoi == other.expdenoi + && autocompute == other.autocompute +// && autogray == other.autogray + && sourceGray == other.sourceGray + && targetGray == other.targetGray + && Autogray == other.Autogray + && blackEv == other.blackEv + && whiteEv == other.whiteEv + && detail == other.detail + && sensilog == other.sensilog; + } bool LocallabParams::LocallabSpot::operator !=(const LocallabSpot& other) const @@ -4489,6 +4513,19 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->locallab.spots.at(i).bilateral, "Locallab", "Bilateral_" + std::to_string(i), spot.bilateral, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).sensiden, "Locallab", "Sensiden_" + std::to_string(i), spot.sensiden, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).detailthr, "Locallab", "Detailthr_" + std::to_string(i), spot.detailthr, keyFile); + + //log encoding + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).explog, "Locallab", "Explog_" + std::to_string(i), spot.explog, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).autocompute, "Locallab", "Autocompute_" + std::to_string(i), spot.autocompute, keyFile); +// saveToKeyfile(!pedited || pedited->locallab.spots.at(i).autogray, "Locallab", "autoGray_" + std::to_string(i), spot.autogray, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).sourceGray, "Locallab", "SourceGray_" + std::to_string(i), spot.sourceGray, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).targetGray, "Locallab", "TargetGray_" + std::to_string(i), spot.targetGray, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).Autogray, "Locallab", "Autogray_" + std::to_string(i), spot.Autogray, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).blackEv, "Locallab", "BlackEv_" + std::to_string(i), spot.blackEv, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).whiteEv, "Locallab", "WhiteEv_" + std::to_string(i), spot.whiteEv, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).detail, "Locallab", "Detail_" + std::to_string(i), spot.detail, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).sensilog, "Locallab", "Sensilog_" + std::to_string(i), spot.sensilog, keyFile); + } } @@ -5999,6 +6036,19 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Sensiden_" + std::to_string(i), pedited, spot.sensiden, spotEdited.sensiden); assignFromKeyfile(keyFile, "Locallab", "Detailthr_" + std::to_string(i), pedited, spot.detailthr, spotEdited.detailthr); + //log encoding + assignFromKeyfile(keyFile, "Locallab", "Explog_" + std::to_string(i), pedited, spot.explog, spotEdited.explog); + assignFromKeyfile(keyFile, "Locallab", "Autocompute_" + std::to_string(i), pedited, spot.autocompute, spotEdited.autocompute); +// assignFromKeyfile(keyFile, "Locallab", "autoGray_" + std::to_string(i), pedited, spot.autogray, spotEdited.autogray); + assignFromKeyfile(keyFile, "Locallab", "SourceGray_" + std::to_string(i), pedited, spot.sourceGray, spotEdited.sourceGray); + assignFromKeyfile(keyFile, "Locallab", "TargetGray_" + std::to_string(i), pedited, spot.targetGray, spotEdited.targetGray); + assignFromKeyfile(keyFile, "Locallab", "AutoGray_" + std::to_string(i), pedited, spot.Autogray, spotEdited.Autogray); + assignFromKeyfile(keyFile, "Locallab", "BlackEv_" + std::to_string(i), pedited, spot.blackEv, spotEdited.blackEv); + assignFromKeyfile(keyFile, "Locallab", "WhiteEv_" + std::to_string(i), pedited, spot.whiteEv, spotEdited.whiteEv); + assignFromKeyfile(keyFile, "Locallab", "Detail_" + std::to_string(i), pedited, spot.detail, spotEdited.detail); + assignFromKeyfile(keyFile, "Locallab", "Sensilog_" + std::to_string(i), pedited, spot.sensilog, spotEdited.sensilog); + + locallab.spots.at(i) = spot; if (pedited) { diff --git a/rtengine/procparams.h b/rtengine/procparams.h index d1b92204c..ca664d6ef 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -1311,6 +1311,18 @@ struct LocallabParams { int bilateral; int sensiden; int detailthr; + //log encoding + bool explog; + bool autocompute; +// bool autogray; + double sourceGray; + double targetGray; + bool Autogray; + double blackEv; + double whiteEv; + int detail; + int sensilog; + LocallabSpot(); diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index db534a883..7ed407dc1 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -871,7 +871,19 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, // Evlocallablcshape LUMINANCECURVE, // Evlocallabblurcol LUMINANCECURVE, // Evlocallabcontcol - LUMINANCECURVE // EvLocallabfftColorMask + LUMINANCECURVE, // EvLocallabfftColorMask + LUMINANCECURVE, // EvLocenalog + LUMINANCECURVE, //EvLocallabAuto + LUMINANCECURVE, //EvlocallabsourceGray + LUMINANCECURVE, //EvlocallabsourceGrayAuto + LUMINANCECURVE, //EvlocallabAutoGrayOn + LUMINANCECURVE, //EvlocallabAutoGrayOff + LUMINANCECURVE, //EvlocallabAutoGray + LUMINANCECURVE, //EvlocallabblackEv + LUMINANCECURVE, //EvlocallabwhiteEv + LUMINANCECURVE, //EvlocallabtargetGray + LUMINANCECURVE, //Evlocallabdetail + LUMINANCECURVE //Evlocallabsensilog }; diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index aac576266..719bc1b95 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -7,7 +7,7 @@ * * RawTherapee is free software: you can redistribute it and/or modify * RawTherapee is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by + * it under the terms of the GNU General Public License as publishfed by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * @@ -144,6 +144,7 @@ Locallab::Locallab(): expcontrast(Gtk::manage(new MyExpander(true, M("TP_LOCALLAB_LOC_CONTRAST")))), expcbdl(Gtk::manage(new MyExpander(true, Gtk::manage(new Gtk::HBox())))), expdenoi(Gtk::manage(new MyExpander(true, Gtk::manage(new Gtk::HBox())))), + explog(Gtk::manage(new MyExpander(true, M("TP_LOCALLAB_LOG")))), expmaskcol(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_SHOWC")))), expmaskcol1(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_SHOWC1")))), expmaskexp(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_SHOWE")))), @@ -503,6 +504,13 @@ adjblur(Gtk::manage(new Adjuster(M("TP_LOCALLAB_ADJ"), -100., 100., 1., 0., Gtk: bilateral(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BILATERAL"), 0, 100, 1, 0))), sensiden(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSIDEN"), 0, 100, 1, 20))), detailthr(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DETAILTHR"), 0, 100, 1, 0))), +//log encoding +sourceGray(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOURCE_GRAY"), 1.0, 100.0, 0.1, 18.0))), +targetGray(Gtk::manage(new Adjuster(M("TP_LOCALLAB_TARGET_GRAY"), 5.0, 80.0, 0.1, 18.0))), +blackEv(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLACK_EV"), -16.0, 0.0, 0.1, -5.0))), +whiteEv(Gtk::manage(new Adjuster(M("TP_LOCALLAB_WHITE_EV"), 0.0, 32.0, 0.1, 10.0))), +detail(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DETAIL"), 0, 5, 1, 1))), +sensilog(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSILOG"), 0, 100, 1, 30))), // ButtonCheck widgets // Color & Light @@ -547,6 +555,8 @@ inverssha(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_INVERS")))), fftwlc(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_FFTW")))), //CBDL enacbMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), +//encoding log +Autogray(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_AUTOGRAY")))), // ComboBox widgets // Color & Light @@ -595,6 +605,8 @@ showmaskcbMethod(Gtk::manage(new MyComboBoxText())), psThreshold(Gtk::manage(new ThresholdAdjuster(M("TP_VIBRANCE_PSTHRESHOLD"), -100., 100., 0., M("TP_VIBRANCE_PSTHRESHOLD_WEIGTHING"), 0, 0., 100., 75., M("TP_VIBRANCE_PSTHRESHOLD_SATTHRESH"), 0, this, false))), // Other widgets +autocompute(Gtk::manage(new Gtk::ToggleButton(M("TP_LOCALLAB_LOGAUTO")))), + labqualcurv(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_QUALCURV_METHOD") + ":"))), lumacontrastMinusButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMACONTRAST_MINUS")))), lumaneutralButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMANEUTRAL")))), @@ -622,6 +634,8 @@ retitoolFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_RETITOOLFRA")))), residFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_RESID")))), clariFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_CLARIFRA")))), grainFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_GRAINFRA")))), +logFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LOGFRA")))), +logPFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LOGPFRA")))), // retiBox(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_CLARIFRA")))), retiBox(Gtk::manage(new ToolParamBlock())), maskretiBox(Gtk::manage(new ToolParamBlock())), @@ -3259,6 +3273,57 @@ pe(nullptr) panel->pack_start(*expdenoi, false, false); } + // log encoding + explog->signal_button_release_event().connect_notify(sigc::bind(sigc::mem_fun(this, &Locallab::foldAllButMe), explog)); + enablelogConn = explog->signal_enabled_toggled().connect(sigc::bind(sigc::mem_fun(this, &Locallab::enableToggled), explog)); + autoconn = autocompute->signal_toggled().connect(sigc::mem_fun(*this, &Locallab::autocomputeToggled)); + AutograyConn = Autogray->signal_toggled().connect(sigc::mem_fun(*this, &Locallab::AutograyChanged)); + //sourceGray = Gtk::manage(new Adjuster(M("TP_LO_SOURCE_GRAY"), 1.0, 100.0, 0.1, 18.0)); + + //sourceGray->throwOnButtonRelease(); + + //sourceGray->addAutoButton(); + sourceGray->delay = options.adjusterMaxDelay; + blackEv->delay = options.adjusterMaxDelay; + whiteEv->delay = options.adjusterMaxDelay; + targetGray->delay = options.adjusterMaxDelay; + + sourceGray->setAdjusterListener(this); + blackEv->setAdjusterListener(this); + whiteEv->setAdjusterListener(this); + targetGray->setAdjusterListener(this); + detail->setAdjusterListener(this); + sensilog->setAdjusterListener(this); + + whiteEv->setLogScale(16, 0); + blackEv->setLogScale(2, -8); + + ToolParamBlock* const logBox = Gtk::manage(new ToolParamBlock()); + explog->add(*logBox, false); + explog->setLevel(2); + + logPFrame->set_label_align(0.025, 0.5); + ToolParamBlock* const logPBox = Gtk::manage(new ToolParamBlock()); + logPBox->pack_start(*autocompute); + logPBox->pack_start(*blackEv); + logPBox->pack_start(*whiteEv); + logPFrame->add(*logPBox); + + logFrame->set_label_align(0.025, 0.5); + ToolParamBlock* const logFBox = Gtk::manage(new ToolParamBlock()); + logFBox->pack_start(*Autogray); + logFBox->pack_start(*sourceGray); + logFrame->add(*logFBox); + + logBox->pack_start(*logPFrame); + logBox->pack_start(*logFrame); + logBox->pack_start(*targetGray); + logBox->pack_start(*detail); + logBox->pack_start(*sensilog); + + +// panel->pack_start(*explog, false, false); + pack_start(*panel); setParamEditable(false); @@ -3317,6 +3382,7 @@ void Locallab::foldAllButMe(GdkEventButton* event, MyExpander *expander) expcontrast->set_expanded(expcontrast == expander); expcbdl->set_expanded(expcbdl == expander); expdenoi->set_expanded(expdenoi == expander); + explog->set_expanded(explog == expander); expmaskcol->set_expanded(expmaskcol == expander); expmaskcol1->set_expanded(expmaskcol1 == expander); expmaskexp->set_expanded(expmaskexp == expander); @@ -3373,6 +3439,9 @@ void Locallab::enableToggled(MyExpander *expander) } else if (expander == expdenoi) { event = EvLocenadenoi; expConn = &enabledenoiConn; + } else if (expander == explog) { + event = EvLocenalog; + expConn = &enablelogConn; } else { return; } @@ -3412,6 +3481,7 @@ void Locallab::writeOptions(std::vector &tpOpen) tpOpen.push_back(expcontrast->get_expanded()); tpOpen.push_back(expcbdl->get_expanded()); tpOpen.push_back(expdenoi->get_expanded()); + tpOpen.push_back(explog->get_expanded()); tpOpen.push_back(expmaskcol->get_expanded()); tpOpen.push_back(expmaskcol1->get_expanded()); tpOpen.push_back(expmaskexp->get_expanded()); @@ -3572,7 +3642,7 @@ void Locallab::refChanged(double huer, double lumar, double chromar) void Locallab::updateToolState(std::vector &tpOpen) { - if (tpOpen.size() >= 23) { + if (tpOpen.size() >= 24) { expsettings->setExpanded(tpOpen.at(0)); expcolor->set_expanded(tpOpen.at(1)); expexpose->set_expanded(tpOpen.at(2)); @@ -3586,15 +3656,16 @@ void Locallab::updateToolState(std::vector &tpOpen) expcontrast->set_expanded(tpOpen.at(10)); expcbdl->set_expanded(tpOpen.at(11)); expdenoi->set_expanded(tpOpen.at(12)); - expmaskcol->set_expanded(tpOpen.at(13)); - expmaskcol1->set_expanded(tpOpen.at(14)); - expmaskexp->set_expanded(tpOpen.at(15)); - expmasksh->set_expanded(tpOpen.at(16)); - expmaskcb->set_expanded(tpOpen.at(17)); - expmaskreti->set_expanded(tpOpen.at(18)); - expmasktm->set_expanded(tpOpen.at(19)); - expmaskbl->set_expanded(tpOpen.at(20)); - expmaskvib->set_expanded(tpOpen.at(21)); + explog->set_expanded(tpOpen.at(13)); + expmaskcol->set_expanded(tpOpen.at(14)); + expmaskcol1->set_expanded(tpOpen.at(15)); + expmaskexp->set_expanded(tpOpen.at(16)); + expmasksh->set_expanded(tpOpen.at(17)); + expmaskcb->set_expanded(tpOpen.at(18)); + expmaskreti->set_expanded(tpOpen.at(19)); + expmasktm->set_expanded(tpOpen.at(20)); + expmaskbl->set_expanded(tpOpen.at(21)); + expmaskvib->set_expanded(tpOpen.at(22)); } } @@ -4850,6 +4921,19 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pp->locallab.spots.at(pp->locallab.selspot).bilateral = bilateral->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).sensiden = sensiden->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).detailthr = detailthr->getIntValue(); + + //log encoding + pp->locallab.spots.at(pp->locallab.selspot).explog = explog->getEnabled(); + pp->locallab.spots.at(pp->locallab.selspot).autocompute = autocompute->get_active(); + // pp->locallab.spots.at(pp->locallab.selspot).autogray = sourceGray->getAutoValue(); + pp->locallab.spots.at(pp->locallab.selspot).sourceGray = sourceGray->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).Autogray = Autogray->get_active(); + pp->locallab.spots.at(pp->locallab.selspot).blackEv = blackEv->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).whiteEv = whiteEv->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).targetGray = targetGray->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).detail = detail->getIntValue(); + pp->locallab.spots.at(pp->locallab.selspot).sensilog = sensilog->getIntValue(); + } ControlSpotPanel::SpotEdited* const se = expsettings->getEditedStates(); @@ -5215,6 +5299,19 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pe->locallab.spots.at(pp->locallab.selspot).bilateral = pe->locallab.spots.at(pp->locallab.selspot).bilateral || bilateral->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).sensiden = pe->locallab.spots.at(pp->locallab.selspot).sensiden || sensiden->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).detailthr = pe->locallab.spots.at(pp->locallab.selspot).detailthr || detailthr->getEditedState(); + + //log encoding + pe->locallab.spots.at(pp->locallab.selspot).explog = pe->locallab.spots.at(pp->locallab.selspot).explog || !explog->get_inconsistent(); + pe->locallab.spots.at(pp->locallab.selspot).autocompute = pe->locallab.spots.at(pp->locallab.selspot).autocompute || !autocompute->get_inconsistent(); + pe->locallab.spots.at(pp->locallab.selspot).sourceGray = pe->locallab.spots.at(pp->locallab.selspot).sourceGray || sourceGray->getEditedState(); +// pe->locallab.spots.at(pp->locallab.selspot).autogray = !sourceGray->getAutoInconsistent(); + pe->locallab.spots.at(pp->locallab.selspot).Autogray = pe->locallab.spots.at(pp->locallab.selspot).Autogray || !Autogray->get_inconsistent(); + pe->locallab.spots.at(pp->locallab.selspot).blackEv = pe->locallab.spots.at(pp->locallab.selspot).blackEv || blackEv->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).whiteEv = pe->locallab.spots.at(pp->locallab.selspot).whiteEv || whiteEv->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).targetGray = pe->locallab.spots.at(pp->locallab.selspot).targetGray || targetGray->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).detail = pe->locallab.spots.at(pp->locallab.selspot).detail || detail->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).sensilog = pe->locallab.spots.at(pp->locallab.selspot).sensilog || sensilog->getEditedState(); + } } @@ -5582,6 +5679,18 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pedited->locallab.spots.at(pp->locallab.selspot).bilateral = pedited->locallab.spots.at(pp->locallab.selspot).bilateral || bilateral->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).sensiden = pedited->locallab.spots.at(pp->locallab.selspot).sensiden || sensiden->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).detailthr = pedited->locallab.spots.at(pp->locallab.selspot).detailthr || detailthr->getEditedState(); + + //log encoding + pedited->locallab.spots.at(pp->locallab.selspot).explog = pedited->locallab.spots.at(pp->locallab.selspot).explog || !explog->get_inconsistent(); + pedited->locallab.spots.at(pp->locallab.selspot).autocompute = pedited->locallab.spots.at(pp->locallab.selspot).autocompute || !autocompute->get_inconsistent(); + pedited->locallab.spots.at(pp->locallab.selspot).sourceGray = pedited->locallab.spots.at(pp->locallab.selspot).sourceGray || sourceGray->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).Autogray = pedited->locallab.spots.at(pp->locallab.selspot).Autogray || !Autogray->get_inconsistent(); + pedited->locallab.spots.at(pp->locallab.selspot).blackEv = pedited->locallab.spots.at(pp->locallab.selspot).blackEv || blackEv->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).whiteEv = pedited->locallab.spots.at(pp->locallab.selspot).whiteEv || whiteEv->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).targetGray = pedited->locallab.spots.at(pp->locallab.selspot).targetGray || targetGray->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).detail = pedited->locallab.spots.at(pp->locallab.selspot).detail || detail->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).sensilog = pedited->locallab.spots.at(pp->locallab.selspot).sensilog || sensilog->getEditedState(); + } } } @@ -6920,6 +7029,35 @@ void Locallab::enablMaskChanged() } } + +void Locallab::autocomputeToggled() +{ + /* + if (multiImage) { + if (autocompute->get_inconsistent()) { + autocompute->set_inconsistent(false); + autoconn.block(true); + autocompute->set_active(false); + autoconn.block(false); + } + } +*/ + if (listener) { + if (autocompute->get_active()) { + listener->panelChanged(EvLocallabAuto, M("GENERAL_ENABLED")); + blackEv->setEnabled(false); + whiteEv->setEnabled(false); + //targetGray->setEnabled(false); + } else { + listener->panelChanged(EvLocallabAuto, M("GENERAL_DISABLED")); + // blackEv->setEnabled(true); + // whiteEv->setEnabled(true); + } + } +} + + + void Locallab::fftwblChanged() { // printf("fftwblChanged\n"); @@ -7406,6 +7544,30 @@ void Locallab::activlumChanged() } } +void Locallab::AutograyChanged() +{ + + if (multiImage) { + if (Autogray->get_inconsistent()) { + Autogray->set_inconsistent(false); + AutograyConn.block(true); + Autogray->set_active(false); + AutograyConn.block(false); + } + } + + if (getEnabled() && explog->getEnabled()) { + if (listener) { + if (Autogray->get_active()) { + listener->panelChanged(EvlocallabAutogray, M("GENERAL_ENABLED")); + } else { + listener->panelChanged(EvlocallabAutogray, M("GENERAL_DISABLED")); + } + } + } +} + + void Locallab::fftwlcChanged() { // printf("fftwlcChanged\n"); @@ -7664,6 +7826,9 @@ void Locallab::setParamEditable(bool cond) expcbdl->set_sensitive(cond); // Denoise expdenoi->set_sensitive(cond); + //log encoding + explog->set_sensitive(cond); + } void Locallab::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited) @@ -7920,6 +8085,14 @@ void Locallab::setDefaults(const rtengine::procparams::ProcParams * defParams, c bilateral->setDefault((double)defSpot->bilateral); sensiden->setDefault((double)defSpot->sensiden); detailthr->setDefault((double)defSpot->detailthr); + + //log encoding + sourceGray->setDefault((double)defSpot->sourceGray); + blackEv->setDefault((double)defSpot->blackEv); + whiteEv->setDefault((double)defSpot->whiteEv); + targetGray->setDefault((double)defSpot->targetGray); + detail->setDefault((double)defSpot->detail); + sensilog->setDefault((double)defSpot->sensilog); // Set default edited states for adjusters and threshold adjusters if (!pedited) { @@ -8141,6 +8314,15 @@ void Locallab::setDefaults(const rtengine::procparams::ProcParams * defParams, c bilateral->setDefaultEditedState(Irrelevant); sensiden->setDefaultEditedState(Irrelevant); detailthr->setDefaultEditedState(Irrelevant); + + //log encoding + sourceGray->setDefaultEditedState(Irrelevant); + blackEv->setDefaultEditedState(Irrelevant); + whiteEv->setDefaultEditedState(Irrelevant); + targetGray->setDefaultEditedState(Irrelevant); + detail->setDefaultEditedState(Irrelevant); + sensilog->setDefaultEditedState(Irrelevant); + } else { const LocallabParamsEdited::LocallabSpotEdited* defSpotState = new LocallabParamsEdited::LocallabSpotEdited(true); @@ -8367,13 +8549,18 @@ void Locallab::setDefaults(const rtengine::procparams::ProcParams * defParams, c bilateral->setDefaultEditedState(defSpotState->bilateral ? Edited : UnEdited); sensiden->setDefaultEditedState(defSpotState->sensiden ? Edited : UnEdited); detailthr->setDefaultEditedState(defSpotState->detailthr ? Edited : UnEdited); + + //log encoding + sourceGray->setDefaultEditedState(defSpotState->sourceGray ? Edited : UnEdited); + blackEv->setDefaultEditedState(defSpotState->blackEv ? Edited : UnEdited); + whiteEv->setDefaultEditedState(defSpotState->whiteEv ? Edited : UnEdited); + targetGray->setDefaultEditedState(defSpotState->targetGray ? Edited : UnEdited); + detail->setDefaultEditedState(defSpotState->detail ? Edited : UnEdited); + sensilog->setDefaultEditedState(defSpotState->sensilog ? Edited : UnEdited); + } } -void Locallab::adjusterAutoToggled(Adjuster* a, bool newval) -{ - // Not used -} void Locallab::adjusterChanged(ThresholdAdjuster* a, double newBottom, double newTop) { @@ -9144,6 +9331,10 @@ void Locallab::adjusterChanged(Adjuster * a, double newval) } + //log encoding + if (getEnabled() && (explog->getEnabled())) { + } + // Tone Mapping if (getEnabled() && exptonemap->getEnabled()) { if (a == stren) { @@ -9675,8 +9866,60 @@ void Locallab::adjusterChanged(Adjuster * a, double newval) } } + + //log encoding + if (getEnabled() && explog->getEnabled()) { + + if (a != sourceGray && a != targetGray && a != detail) { + // autocompute->set_active(false); + } + + + if (a == sourceGray) { + if (listener) { + // printf("OK 1\n"); + // if(autocompute->get_active()) printf("AUTO\n"); else printf("PAS\n"); + listener->panelChanged(EvlocallabsourceGray, sourceGray->getTextValue()); + //listener->panelChanged(autocompute->get_active() ? EvlocallabsourceGrayAuto : EvlocallabsourceGray, a->getTextValue()); + } + } + + if (a == blackEv) { + if (listener) { + listener->panelChanged(EvlocallabblackEv, blackEv->getTextValue()); + } + } + + if (a == whiteEv) { + if (listener) { + listener->panelChanged(EvlocallabwhiteEv, whiteEv->getTextValue()); + } + } + + if (a == targetGray) { + if (listener) { + listener->panelChanged(EvlocallabtargetGray, targetGray->getTextValue()); + } + } + + if (a == detail) { + if (listener) { + listener->panelChanged(Evlocallabdetail, detail->getTextValue()); + } + } + + if (a == sensilog) { + if (listener) { + listener->panelChanged(Evlocallabsensilog, sensilog->getTextValue()); + } + } + + } + } + + void Locallab::enabledChanged() { if (listener) { @@ -9920,6 +10163,15 @@ void Locallab::setBatchMode(bool batchMode) sensiden->showEditedCB(); detailthr->showEditedCB(); + //log encoding + sourceGray->showEditedCB(); + blackEv->showEditedCB(); + whiteEv->showEditedCB(); + targetGray->showEditedCB(); + detail->showEditedCB(); + sensilog->showEditedCB(); + + // Set batch mode for comboBoxText // Color & Light qualitycurveMethod->append(M("GENERAL_UNCHANGED")); @@ -10173,6 +10425,10 @@ void Locallab::enableListener() showmaskcbMethodConn.block(false); // Denoise enabledenoiConn.block(false); + //encoding log +// autoconn.block(false); + AutograyConn.block(false); + } void Locallab::disableListener() @@ -10261,6 +10517,10 @@ void Locallab::disableListener() showmaskcbMethodConn.block(true); // Denoise enabledenoiConn.block(true); + //encoding log + // autoconn.block(true); + AutograyConn.block(true); + } void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited, int index) @@ -10992,6 +11252,19 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con bilateral->setValue(0); } + //log encoding + explog->setEnabled(pp->locallab.spots.at(index).explog); + autocompute->set_active(pp->locallab.spots.at(index).autocompute); + sourceGray->setValue(pp->locallab.spots.at(index).sourceGray); +// sourceGray->setAutoValue(pp->locallab.spots.at(index).autogray); +// lastAutogray = pp->locallab.spots.at(index).autogray; + Autogray->set_active(pp->locallab.spots.at(index).Autogray); + blackEv->setValue(pp->locallab.spots.at(index).blackEv); + whiteEv->setValue(pp->locallab.spots.at(index).whiteEv); + targetGray->setValue(pp->locallab.spots.at(index).targetGray); + detail->setValue(pp->locallab.spots.at(index).detail); + sensilog->setValue(pp->locallab.spots.at(index).sensilog); + if (pedited) { if (index < (int)pedited->locallab.spots.size()) { const LocallabParamsEdited::LocallabSpotEdited* spotState = &pedited->locallab.spots.at(index); @@ -11419,6 +11692,19 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con bilateral->setEditedState(spotState->bilateral ? Edited : UnEdited); sensiden->setEditedState(spotState->sensiden ? Edited : UnEdited); detailthr->setEditedState(spotState->detailthr ? Edited : UnEdited); + + //log encoding + explog->set_inconsistent(!spotState->explog); + autocompute->set_inconsistent(multiImage && !spotState->autocompute); + sourceGray->setEditedState(spotState->sourceGray ? Edited : UnEdited); + // sourceGray->setAutoInconsistent(multiImage && !spotState->autogray); + Autogray->set_inconsistent(multiImage && !spotState->Autogray); + blackEv->setEditedState(spotState->blackEv ? Edited : UnEdited); + whiteEv->setEditedState(spotState->whiteEv ? Edited : UnEdited); + targetGray->setEditedState(spotState->targetGray ? Edited : UnEdited); + detail->setEditedState(spotState->detail ? Edited : UnEdited); + sensilog->setEditedState(spotState->sensilog ? Edited : UnEdited); + } } } @@ -11877,3 +12163,54 @@ void Locallab::autoOpenCurve() // CCmaskexpshape->openIfNonlinear(); // LLmaskexpshape->openIfNonlinear(); } + +void Locallab::adjusterAutoToggled(Adjuster* a, bool newval) +{ + /* + printf("OK TOG\n"); + if (multiImage) { + if (sourceGray->getAutoInconsistent()) { + sourceGray->setAutoInconsistent (false); + sourceGray->setAutoValue (false); + } else if (lastAutogray) { + sourceGray->setAutoInconsistent (true); + } + + lastAutogray = sourceGray->getAutoValue(); + // (a == sourceGray ? lastAutogray : lastAutoRadius) = a->getAutoValue(); + + } + + if (listener) { + const auto event = (a == sourceGray ? EvlocallabAutoGrayOff: EvlocallabAutoGrayOn); + if (sourceGray->getAutoInconsistent()) { + listener->panelChanged(event, M("GENERAL_UNCHANGED")); + } else if (sourceGray->getAutoValue()) { + listener->panelChanged(event, M("GENERAL_ENABLED")); + } else { + listener->panelChanged(event, M("GENERAL_DISABLED")); + } + } +*/ +/* + if (listener) { + if (a == sourceGray) { + if (sourceGray->getAutoInconsistent()) { + listener->panelChanged (EvlocallabAutoGrayOff, M ("GENERAL_UNCHANGED")); + } else if (sourceGray->getAutoValue()) { + listener->panelChanged (EvlocallabAutoGrayOn, M ("GENERAL_ENABLED")); + } else { + listener->panelChanged (EvlocallabAutoGrayOff, M ("GENERAL_DISABLED")); + } + } +*/ + /* + if (a == sourceGray) { + printf("OK source\n"); + auto e = (!newval) ? EvlocallabAutoGrayOff : EvlocallabAutoGrayOn; + listener->panelChanged(e, newval ? M("GENERAL_ENABLED") : M("GENERAL_DISABLED")); + } + */ +// } + +} diff --git a/rtgui/locallab.h b/rtgui/locallab.h index 45e72cfe3..5706fd2ba 100644 --- a/rtgui/locallab.h +++ b/rtgui/locallab.h @@ -19,6 +19,7 @@ * 2017 Jacques Desmis * 2018 Pierre Cabrera */ +#pragma once #include @@ -62,6 +63,7 @@ private: MyExpander* const expcontrast; MyExpander* const expcbdl; MyExpander* const expdenoi; + MyExpander* const explog; MyExpander* const expmaskcol; MyExpander* const expmaskcol1; MyExpander* const expmaskexp; @@ -71,7 +73,7 @@ private: MyExpander* const expmasktm; MyExpander* const expmaskbl; MyExpander* const expmaskvib; - sigc::connection enablecolorConn, enableexposeConn, enableshadhighConn, enablevibranceConn, enablesoftConn, enableblurConn, enabletonemapConn, enableretiConn, enablesharpConn, enablecontrastConn, enablecbdlConn, enabledenoiConn; + sigc::connection enablecolorConn, enableexposeConn, enableshadhighConn, enablevibranceConn, enablesoftConn, enableblurConn, enabletonemapConn, enableretiConn, enablesharpConn, enablecontrastConn, enablecbdlConn, enabledenoiConn, enablelogConn; // Curve widgets // Color & Light @@ -370,6 +372,14 @@ private: Adjuster* const sensiden; Adjuster* const detailthr; + //Log encoding + Adjuster* const sourceGray; + Adjuster* const targetGray; + Adjuster* const blackEv; + Adjuster* const whiteEv; + Adjuster* const detail; + Adjuster* const sensilog; + // ButtonCheck widgets // Color & Light Gtk::CheckButton* const curvactiv; @@ -435,10 +445,12 @@ private: //local contrast Gtk::CheckButton* const fftwlc; sigc::connection fftwlcConn; - //CBDL Gtk::CheckButton* const enacbMask; sigc::connection enacbMaskConn; + //encoding log + Gtk::CheckButton* const Autogray; + sigc::connection AutograyConn; // ComboBox widgets // Color & Light @@ -514,6 +526,8 @@ private: ThresholdAdjuster* const psThreshold; // Other widgets + Gtk::ToggleButton* const autocompute; + sigc::connection autoconn; Gtk::Label* const labqualcurv; Gtk::Button* const lumacontrastMinusButton; Gtk::Button* const lumaneutralButton; @@ -542,6 +556,8 @@ private: Gtk::Frame* const residFrame; Gtk::Frame* const clariFrame; Gtk::Frame* const grainFrame; + Gtk::Frame* const logFrame; + Gtk::Frame* const logPFrame; ToolParamBlock* const retiBox; ToolParamBlock* const maskretiBox; ToolParamBlock* const mask7; @@ -561,6 +577,9 @@ private: double nextminT; double nextmaxT; double nextsigma; +// bool lastAutogray; +// Adjuster* sourceGray; + int complexsoft; /** * Used to store the default ProcParams when setDefaults function is called @@ -663,6 +682,10 @@ private: void localcontMethodChanged(); //CBDL void showmaskcbMethodChanged(); + //log encoding + void autocomputeToggled(); + void AutograyChanged(); + // Other widgets event functions void lumacontrastMinusPressed(); void lumaneutralPressed(); diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 03d828e1c..f293fd9f8 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -1307,6 +1307,19 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).bilateral = locallab.spots.at(j).bilateral && pSpot.bilateral == otherSpot.bilateral; locallab.spots.at(j).sensiden = locallab.spots.at(j).sensiden && pSpot.sensiden == otherSpot.sensiden; locallab.spots.at(j).detailthr = locallab.spots.at(j).detailthr && pSpot.detailthr == otherSpot.detailthr; + + //log encoding + locallab.spots.at(j).explog = locallab.spots.at(j).explog && pSpot.explog == otherSpot.explog; + locallab.spots.at(j).autocompute = locallab.spots.at(j).autocompute && pSpot.autocompute == otherSpot.autocompute; + // locallab.spots.at(j).autogray = locallab.spots.at(j).autogray && pSpot.autogray == otherSpot.autogray; + locallab.spots.at(j).sourceGray = locallab.spots.at(j).sourceGray && pSpot.sourceGray == otherSpot.sourceGray; + locallab.spots.at(j).targetGray = locallab.spots.at(j).targetGray && pSpot.targetGray == otherSpot.targetGray; + locallab.spots.at(j).Autogray = locallab.spots.at(j).Autogray && pSpot.Autogray == otherSpot.Autogray; + locallab.spots.at(j).blackEv = locallab.spots.at(j).blackEv && pSpot.blackEv == otherSpot.blackEv; + locallab.spots.at(j).whiteEv = locallab.spots.at(j).whiteEv && pSpot.whiteEv == otherSpot.whiteEv; + locallab.spots.at(j).detail = locallab.spots.at(j).detail && pSpot.detail == otherSpot.detail; + locallab.spots.at(j).sensilog = locallab.spots.at(j).sensilog && pSpot.sensilog == otherSpot.sensilog; + } } @@ -4143,6 +4156,48 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng if (locallab.spots.at(i).detailthr) { toEdit.locallab.spots.at(i).detailthr = mods.locallab.spots.at(i).detailthr; } + + //log encoding + if (locallab.spots.at(i).explog) { + toEdit.locallab.spots.at(i).explog = mods.locallab.spots.at(i).explog; + } + + if (locallab.spots.at(i).autocompute) { + toEdit.locallab.spots.at(i).autocompute = mods.locallab.spots.at(i).autocompute; + } + + if (locallab.spots.at(i).sourceGray) { + toEdit.locallab.spots.at(i).sourceGray = mods.locallab.spots.at(i).sourceGray; + } + + if (locallab.spots.at(i).targetGray) { + toEdit.locallab.spots.at(i).targetGray = mods.locallab.spots.at(i).targetGray; + } + + if (locallab.spots.at(i).blackEv) { + toEdit.locallab.spots.at(i).blackEv = mods.locallab.spots.at(i).blackEv; + } + + if (locallab.spots.at(i).whiteEv) { + toEdit.locallab.spots.at(i).whiteEv = mods.locallab.spots.at(i).whiteEv; + } + + if (locallab.spots.at(i).detail) { + toEdit.locallab.spots.at(i).detail = mods.locallab.spots.at(i).detail; + } + + if (locallab.spots.at(i).sensilog) { + toEdit.locallab.spots.at(i).sensilog = mods.locallab.spots.at(i).sensilog; + } + +// if (locallab.spots.at(i).autogray) { +// toEdit.locallab.spots.at(i).autogray = mods.locallab.spots.at(i).autogray; + // } + + if (locallab.spots.at(i).Autogray) { + toEdit.locallab.spots.at(i).Autogray = mods.locallab.spots.at(i).Autogray; + } + } @@ -5463,7 +5518,19 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : adjblur(v), bilateral(v), sensiden(v), - detailthr(v) + detailthr(v), + //log encoding + explog(v), + autocompute(v), + sourceGray(v), + targetGray(v), +// autogray(v), + Autogray(v), + blackEv(v), + whiteEv(v), + detail(v), + sensilog(v) + { } @@ -5827,6 +5894,18 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) bilateral = v; sensiden = v; detailthr = v; + //log encoding + explog = v; + autocompute = v; + sourceGray = v; + targetGray = v; +// autogray = v; + Autogray = v; + blackEv = v; + whiteEv = v; + detail = v; + sensilog = v; + } bool CaptureSharpeningParamsEdited::isUnchanged() const diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 64b270926..41d69e6aa 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -738,6 +738,18 @@ public: bool sensiden; bool detailthr; + //log encoding + bool explog; + bool autocompute; + bool sourceGray; + bool targetGray; + // bool autogray; + bool Autogray; + bool blackEv; + bool whiteEv; + bool detail; + bool sensilog; + LocallabSpotEdited(bool v); void set(bool v);