diff --git a/rtengine/procevents.h b/rtengine/procevents.h index df511c036..5dce3dba3 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -922,6 +922,13 @@ enum ProcEventCode { EvLocallabSpotcolorde = 893, EvlocallabshowmasksharMethod = 894, Evlocallabshowreset = 895, + Evlocallabstrengthw = 896, + Evlocallabradiusw = 897, + Evlocallabdetailw = 898, + Evlocallabgradw = 899, + Evlocallabtloww = 900, + Evlocallabthigw = 901, + EvlocallabwavCurveedg = 902, NUMOFEVENTS }; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index e67b11341..b6d8ea12d 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2742,6 +2742,12 @@ LocallabParams::LocallabSpot::LocallabSpot() : clarisoft(1.0), strwav(0.0), angwav(0.0), + strengthw(0.0), + radiusw(15.0), + detailw(10.0), + gradw(90.0), + tloww(20.0), + thigw(0.0), sensilc(30), fftwlc(false), blurlc(true), @@ -2758,6 +2764,20 @@ LocallabParams::LocallabSpot::LocallabSpot() : locconwavcurve{(double)FCT_MinMaxCPoints, 0.0, 0.5, 0.35, 0.35, 1., 0.5, 0.35, 0.35}, loccompwavcurve{(double)FCT_MinMaxCPoints, 0.0, 0.0, 0.0, 0.35, 0.5, 0., 0.35, 0.35, 1.0, 0.0, 0.35, 0.35}, loccomprewavcurve{(double)FCT_MinMaxCPoints, 0.0, 0.75, 0.35, 0.35, 1., 0.75, 0.35, 0.35}, + locedgwavcurve{(double)FCT_MinMaxCPoints, 0.0, + 0.25, + 0.35, + 0.35, + 0.50, + 0.75, + 0.35, + 0.35, + 0.90, + 0.0, + 0.35, + 0.35 +}, + CCmasklccurve{(double)FCT_MinMaxCPoints, 0.0, 1.0, 0.35, 0.35, 0.50, 1.0, 0.35, 0.35, 1.0, 1.0, 0.35, 0.35 }, LLmasklccurve{(double)FCT_MinMaxCPoints, 0.0, 1.0, 0.35, 0.35, 0.50, 1.0, 0.35, 0.35, 1.0, 1.0, 0.35, 0.35}, HHmasklccurve{(double)FCT_MinMaxCPoints, 0.0, 1.0, 0.35, 0.35, 0.50, 1.0, 0.35, 0.35, 1.0, 1.0, 0.35, 0.35}, @@ -3163,6 +3183,12 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && clarisoft == other.clarisoft && strwav == other.strwav && angwav == other.angwav + && strengthw == other.strengthw + && radiusw == other.radiusw + && detailw == other.detailw + && gradw == other.gradw + && tloww == other.tloww + && thigw == other.thigw && sensilc == other.sensilc && fftwlc == other.fftwlc && blurlc == other.blurlc @@ -3179,6 +3205,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && locconwavcurve == other.locconwavcurve && loccompwavcurve == other.loccompwavcurve && loccomprewavcurve == other.loccomprewavcurve + && locedgwavcurve == other.locedgwavcurve && CCmasklccurve == other.CCmasklccurve && LLmasklccurve == other.LLmasklccurve && HHmasklccurve == other.HHmasklccurve @@ -4564,6 +4591,12 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->locallab.spots.at(i).clarisoft, "Locallab", "Clarisoft_" + std::to_string(i), spot.clarisoft, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).strwav, "Locallab", "Strwav_" + std::to_string(i), spot.strwav, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).angwav, "Locallab", "Angwav_" + std::to_string(i), spot.angwav, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).strwav, "Locallab", "Strengthw_" + std::to_string(i), spot.strengthw, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).strwav, "Locallab", "Radiusw_" + std::to_string(i), spot.radiusw, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).strwav, "Locallab", "Detailw_" + std::to_string(i), spot.detailw, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).strwav, "Locallab", "Gradw_" + std::to_string(i), spot.gradw, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).strwav, "Locallab", "Tloww_" + std::to_string(i), spot.tloww, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).strwav, "Locallab", "Thigw_" + std::to_string(i), spot.thigw, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).sensilc, "Locallab", "Sensilc_" + std::to_string(i), spot.sensilc, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).fftwlc, "Locallab", "Fftwlc_" + std::to_string(i), spot.fftwlc, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).blurlc, "Locallab", "Blurlc_" + std::to_string(i), spot.blurlc, keyFile); @@ -4579,6 +4612,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->locallab.spots.at(i).locconwavcurve, "Locallab", "LocconwavCurve_" + std::to_string(i), spot.locconwavcurve, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).loccompwavcurve, "Locallab", "LoccompwavCurve_" + std::to_string(i), spot.loccompwavcurve, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).loccomprewavcurve, "Locallab", "LoccomprewavCurve_" + std::to_string(i), spot.loccomprewavcurve, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).locedgwavcurve, "Locallab", "LocedgwavCurve_" + std::to_string(i), spot.locedgwavcurve, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).csthreshold, "Locallab", "CSThreshold_" + std::to_string(i), spot.csthreshold.toVector(), keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).CCmasklccurve, "Locallab", "CCmasklcCurve_" + std::to_string(i), spot.CCmasklccurve, keyFile); @@ -6120,6 +6154,12 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Clarisoft_" + std::to_string(i), pedited, spot.clarisoft, spotEdited.clarisoft); assignFromKeyfile(keyFile, "Locallab", "Strwav_" + std::to_string(i), pedited, spot.strwav, spotEdited.strwav); assignFromKeyfile(keyFile, "Locallab", "Angwav_" + std::to_string(i), pedited, spot.angwav, spotEdited.angwav); + assignFromKeyfile(keyFile, "Locallab", "Strengthw_" + std::to_string(i), pedited, spot.strengthw, spotEdited.strengthw); + assignFromKeyfile(keyFile, "Locallab", "Radiusw_" + std::to_string(i), pedited, spot.radiusw, spotEdited.radiusw); + assignFromKeyfile(keyFile, "Locallab", "Detailw_" + std::to_string(i), pedited, spot.detailw, spotEdited.detailw); + assignFromKeyfile(keyFile, "Locallab", "Tloww_" + std::to_string(i), pedited, spot.tloww, spotEdited.tloww); + assignFromKeyfile(keyFile, "Locallab", "Thigw_" + std::to_string(i), pedited, spot.thigw, spotEdited.thigw); + assignFromKeyfile(keyFile, "Locallab", "Gradw_" + std::to_string(i), pedited, spot.gradw, spotEdited.gradw); assignFromKeyfile(keyFile, "Locallab", "Sensilc_" + std::to_string(i), pedited, spot.sensilc, spotEdited.sensilc); assignFromKeyfile(keyFile, "Locallab", "Fftwlc_" + std::to_string(i), pedited, spot.fftwlc, spotEdited.fftwlc); assignFromKeyfile(keyFile, "Locallab", "Blurlc_" + std::to_string(i), pedited, spot.blurlc, spotEdited.blurlc); @@ -6135,6 +6175,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "LocconwavCurve_" + std::to_string(i), pedited, spot.locconwavcurve, spotEdited.locconwavcurve); assignFromKeyfile(keyFile, "Locallab", "LoccompwavCurve_" + std::to_string(i), pedited, spot.loccompwavcurve, spotEdited.loccompwavcurve); assignFromKeyfile(keyFile, "Locallab", "LoccomprewavCurve_" + std::to_string(i), pedited, spot.loccomprewavcurve, spotEdited.loccomprewavcurve); + assignFromKeyfile(keyFile, "Locallab", "LocedgwavCurve_" + std::to_string(i), pedited, spot.locedgwavcurve, spotEdited.locedgwavcurve); assignFromKeyfile(keyFile, "Locallab", "CCmasklcCurve_" + std::to_string(i), pedited, spot.CCmasklccurve, spotEdited.CCmasklccurve); assignFromKeyfile(keyFile, "Locallab", "LLmasklcCurve_" + std::to_string(i), pedited, spot.LLmasklccurve, spotEdited.LLmasklccurve); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 7fabe0ace..0a2ce8451 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -1285,6 +1285,12 @@ struct LocallabParams { double clarisoft; double strwav; double angwav; + double strengthw; + double radiusw; + double detailw; + double gradw; + double tloww; + double thigw; int sensilc; bool fftwlc; bool blurlc; @@ -1301,6 +1307,7 @@ struct LocallabParams { std::vector locconwavcurve; std::vector loccompwavcurve; std::vector loccomprewavcurve; + std::vector locedgwavcurve; std::vector CCmasklccurve; std::vector LLmasklccurve; std::vector HHmasklccurve; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 6443b5146..281f729e4 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -925,8 +925,14 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, //Evlocallabanglog LUMINANCECURVE, //EvLocallabSpotcolorde LUMINANCECURVE, // EvlocallabshowmasksharMethod - LUMINANCECURVE // Evlocallabshowreset - + LUMINANCECURVE, // Evlocallabshowreset + LUMINANCECURVE, //Evlocallabstrengthw + LUMINANCECURVE, //Evlocallabradiusw + LUMINANCECURVE, //Evlocallabdetailw + LUMINANCECURVE, //Evlocallabgradw + LUMINANCECURVE, //Evlocallabtloww + LUMINANCECURVE, //Evlocallabthigw + LUMINANCECURVE //EvlocallabwavCurveedg }; namespace rtengine diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index 67b97f66c..02cd993c1 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -361,6 +361,9 @@ Locallab::Locallab(): LocalcurveEditorwavcompre(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_WAVCOMPRE"))), wavshapecompre(static_cast(LocalcurveEditorwavcompre->addCurve(CT_Flat, "", nullptr, false, false))), + LocalcurveEditorwavedg(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_WAVEDG"))), + wavshapeedg(static_cast(LocalcurveEditorwavedg->addCurve(CT_Flat, "", nullptr, false, false))), + masklcCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK"))), mask2lcCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK2"))), @@ -594,6 +597,12 @@ radmasklc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), -10.0, 1000.0, 0 chromasklc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMASKCOL"), -100.0, 100.0, 0.1, 0.))), strwav(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADSTR"), -4.0, 4.0, 0.05, 0.))), angwav(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADANG"), -180, 180, 0.1, 0.))), +strengthw(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRW"), 0., 100.0, 0.5, 0.))), +radiusw(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADIUSW"), 5., 100.0, 0.5, 15.))), +detailw(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DETAILW"), -50., 100.0, 1., 10.))), +gradw(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADW"), 0., 100.0, 0.5, 90.))), +tloww(Gtk::manage(new Adjuster(M("TP_LOCALLAB_TLOWW"), 0., 100.0, 1., 20.))), +thigw(Gtk::manage(new Adjuster(M("TP_LOCALLAB_TLOWW"), -10., 100.0, 1., 0.))), multiplier( [this]() -> std::array { @@ -788,6 +797,7 @@ residFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_RESID")))), sharFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_SHARFRAME")))), clariFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_CLARIFRA")))), gradwavFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_GRADWAVFRA")))), +edgFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_EDGSHARPFRA")))), blurlevelFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_BLURLEVELFRA")))), contFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_CONTFRA")))), compFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_COMPFRA")))), @@ -3010,7 +3020,28 @@ pe(nullptr) chromasklc->setAdjusterListener(this); strwav->setAdjusterListener(this); angwav->setAdjusterListener(this); + strengthw->setAdjusterListener(this); + radiusw->setAdjusterListener(this); + detailw->setAdjusterListener(this); + gradw->setAdjusterListener(this); + tloww->setAdjusterListener(this); + thigw->setAdjusterListener(this); + LocalcurveEditorwavedg->setCurveListener(this); + + wavshapeedg->setIdentityValue(0.); + wavshapeedg->setResetCurve(FlatCurveType(defSpot.locedgwavcurve.at(0)), defSpot.locedgwavcurve); + + if (showtooltip) { +// wavshapecompre->setTooltip(M("TP_LOCALLAB_COMPRESS_TOOLTIP")); +// wavshapecomp->setTooltip(M("TP_LOCALLAB_COMPRESS_TOOLTIP")); + } + + if (showtooltip) { +// llshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_LL_TOOLTIP")); + } + + LocalcurveEditorwavedg->curveListComplete(); clariFrame->set_label_align(0.025, 0.5); @@ -3030,6 +3061,17 @@ pe(nullptr) gradwavBox->pack_start(*angwav); gradwavFrame->add(*gradwavBox); + edgFrame->set_label_align(0.025, 0.5); + ToolParamBlock* const edgsBox = Gtk::manage(new ToolParamBlock()); + edgsBox->pack_start(*strengthw); + edgsBox->pack_start(*radiusw); + edgsBox->pack_start(*detailw); + edgsBox->pack_start(*LocalcurveEditorwavedg, Gtk::PACK_SHRINK, 4); + edgsBox->pack_start(*gradw); + edgsBox->pack_start(*tloww); + edgsBox->pack_start(*thigw); + edgFrame->add(*edgsBox); + Gtk::HSeparator* const separatorblu = Gtk::manage(new Gtk::HSeparator()); blurlevelFrame->set_label_align(0.025, 0.5); @@ -3105,6 +3147,7 @@ pe(nullptr) ToolParamBlock* const blurcontBox = Gtk::manage(new ToolParamBlock()); blurcontBox->pack_start(*clariFrame); blurcontBox->pack_start(*gradwavFrame); +// blurcontBox->pack_start(*edgFrame); blurcontBox->pack_start(*contFrame); blurcontBox->pack_start(*compreFrame); @@ -3922,6 +3965,7 @@ Locallab::~Locallab() delete LocalcurveEditorwavcon; delete LocalcurveEditorwavcomp; delete LocalcurveEditorwavcompre; + delete LocalcurveEditorwavedg; delete masktmCurveEditorG; delete maskblCurveEditorG; delete mask2blCurveEditorG; @@ -5452,6 +5496,13 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pp->locallab.spots.at(pp->locallab.selspot).locconwavcurve = wavshapecon->getCurve(); pp->locallab.spots.at(pp->locallab.selspot).loccompwavcurve = wavshapecomp->getCurve(); pp->locallab.spots.at(pp->locallab.selspot).loccomprewavcurve = wavshapecompre->getCurve(); + pp->locallab.spots.at(pp->locallab.selspot).strengthw = strengthw->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).radiusw = radiusw->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).detailw = detailw->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).gradw = gradw->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).tloww = tloww->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).thigw = thigw->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).locedgwavcurve = wavshapeedg->getCurve(); if (localcontMethod->get_active_row_number() == 0) { pp->locallab.spots.at(pp->locallab.selspot).localcontMethod = "loc"; @@ -5877,6 +5928,13 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pe->locallab.spots.at(pp->locallab.selspot).locconwavcurve = pe->locallab.spots.at(pp->locallab.selspot).locconwavcurve || !wavshapecon->isUnChanged(); pe->locallab.spots.at(pp->locallab.selspot).loccompwavcurve = pe->locallab.spots.at(pp->locallab.selspot).loccompwavcurve || !wavshapecomp->isUnChanged(); pe->locallab.spots.at(pp->locallab.selspot).loccomprewavcurve = pe->locallab.spots.at(pp->locallab.selspot).loccomprewavcurve || !wavshapecompre->isUnChanged(); + pe->locallab.spots.at(pp->locallab.selspot).strengthw = pe->locallab.spots.at(pp->locallab.selspot).strengthw || strengthw->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).radiusw = pe->locallab.spots.at(pp->locallab.selspot).radiusw || radiusw->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).detailw = pe->locallab.spots.at(pp->locallab.selspot).detailw || detailw->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).gradw = pe->locallab.spots.at(pp->locallab.selspot).gradw || gradw->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).tloww = pe->locallab.spots.at(pp->locallab.selspot).tloww || tloww->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).thigw = pe->locallab.spots.at(pp->locallab.selspot).thigw || thigw->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).locedgwavcurve = pe->locallab.spots.at(pp->locallab.selspot).locedgwavcurve || !wavshapeedg->isUnChanged(); pe->locallab.spots.at(pp->locallab.selspot).CCmasklccurve = pe->locallab.spots.at(pp->locallab.selspot).CCmasklccurve || !CCmasklcshape->isUnChanged(); pe->locallab.spots.at(pp->locallab.selspot).LLmasklccurve = pe->locallab.spots.at(pp->locallab.selspot).LLmasklccurve || !LLmasklcshape->isUnChanged(); @@ -6299,6 +6357,13 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pedited->locallab.spots.at(pp->locallab.selspot).locconwavcurve = pedited->locallab.spots.at(pp->locallab.selspot).locconwavcurve || !wavshapecon->isUnChanged(); pedited->locallab.spots.at(pp->locallab.selspot).loccompwavcurve = pedited->locallab.spots.at(pp->locallab.selspot).loccompwavcurve || !wavshapecomp->isUnChanged(); pedited->locallab.spots.at(pp->locallab.selspot).loccomprewavcurve = pedited->locallab.spots.at(pp->locallab.selspot).loccomprewavcurve || !wavshapecompre->isUnChanged(); + pedited->locallab.spots.at(pp->locallab.selspot).strengthw = pedited->locallab.spots.at(pp->locallab.selspot).strengthw || strengthw->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).radiusw = pedited->locallab.spots.at(pp->locallab.selspot).radiusw || radiusw->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).detailw = pedited->locallab.spots.at(pp->locallab.selspot).detailw || detailw->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).gradw = pedited->locallab.spots.at(pp->locallab.selspot).gradw || gradw->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).tloww = pedited->locallab.spots.at(pp->locallab.selspot).tloww || tloww->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).thigw = pedited->locallab.spots.at(pp->locallab.selspot).thigw || thigw->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).locedgwavcurve = pedited->locallab.spots.at(pp->locallab.selspot).locedgwavcurve || !wavshapeedg->isUnChanged(); pedited->locallab.spots.at(pp->locallab.selspot).CCmasklccurve = pedited->locallab.spots.at(pp->locallab.selspot).CCmasklccurve || !CCmasklcshape->isUnChanged(); pedited->locallab.spots.at(pp->locallab.selspot).LLmasklccurve = pedited->locallab.spots.at(pp->locallab.selspot).LLmasklccurve || !LLmasklcshape->isUnChanged(); @@ -6816,6 +6881,12 @@ void Locallab::curveChanged(CurveEditor* ce) } } + if (ce == wavshapeedg) { + if (listener) { + listener->panelChanged(EvlocallabwavCurveedg, M("HISTORY_CUSTOMCURVE")); + } + } + if (ce == CCmasklcshape) { if (listener) { listener->panelChanged(EvlocallabCCmasklcshape, M("HISTORY_CUSTOMCURVE")); @@ -6891,12 +6962,19 @@ void Locallab::localcontMethodChanged() LocalcurveEditorwavcon->hide(); LocalcurveEditorwavcomp->hide(); LocalcurveEditorwavcompre->hide(); + LocalcurveEditorwavedg->hide(); fftwlc->show(); blurlc->show(); wavblur->show(); origlc->hide(); strwav->hide(); angwav->hide(); + strengthw->hide(); + radiusw->hide(); + detailw->hide(); + gradw->hide(); + tloww->hide(); + thigw->hide(); } else if (localcontMethod->get_active_row_number() == 1) { levelwav->show(); residcont->show(); @@ -6926,12 +7004,19 @@ void Locallab::localcontMethodChanged() LocalcurveEditorwavcon->hide(); LocalcurveEditorwavcomp->hide(); LocalcurveEditorwavcompre->hide(); + LocalcurveEditorwavedg->hide(); fftwlc->hide(); blurlc->show(); wavblur->show(); origlc->show(); strwav->show(); angwav->show(); + strengthw->show(); + radiusw->show(); + detailw->show(); + gradw->show(); + tloww->show(); + thigw->show(); } // printf("localcontMethodChanged\n"); @@ -9211,6 +9296,12 @@ void Locallab::setDefaults(const rtengine::procparams::ProcParams * defParams, c blendmasklc->setDefault((double)defSpot->blendmasklc); radmasklc->setDefault(defSpot->radmasklc); chromasklc->setDefault(defSpot->chromasklc); + strengthw->setDefault(defSpot->strengthw); + radiusw->setDefault(defSpot->radiusw); + detailw->setDefault(defSpot->detailw); + gradw->setDefault(defSpot->gradw); + tloww->setDefault(defSpot->tloww); + thigw->setDefault(defSpot->thigw); // Contrast by detail levels for (int i = 0; i < 6; i++) { @@ -9459,6 +9550,12 @@ void Locallab::setDefaults(const rtengine::procparams::ProcParams * defParams, c blendmasklc->setDefaultEditedState(Irrelevant); radmasklc->setDefaultEditedState(Irrelevant); chromasklc->setDefaultEditedState(Irrelevant); + strengthw->setDefaultEditedState(Irrelevant); + radiusw->setDefaultEditedState(Irrelevant); + detailw->setDefaultEditedState(Irrelevant); + gradw->setDefaultEditedState(Irrelevant); + tloww->setDefaultEditedState(Irrelevant); + thigw->setDefaultEditedState(Irrelevant); // Contrast by detail levels for (int i = 0; i < 6; i++) { @@ -9712,6 +9809,12 @@ void Locallab::setDefaults(const rtengine::procparams::ProcParams * defParams, c blendmasklc->setDefaultEditedState(defSpotState->blendmasklc ? Edited : UnEdited); radmasklc->setDefaultEditedState(defSpotState->radmasklc ? Edited : UnEdited); chromasklc->setDefaultEditedState(defSpotState->chromasklc ? Edited : UnEdited); + strengthw->setDefaultEditedState(defSpotState->strengthw ? Edited : UnEdited); + radiusw->setDefaultEditedState(defSpotState->radiusw ? Edited : UnEdited); + detailw->setDefaultEditedState(defSpotState->detailw ? Edited : UnEdited); + gradw->setDefaultEditedState(defSpotState->gradw ? Edited : UnEdited); + tloww->setDefaultEditedState(defSpotState->tloww ? Edited : UnEdited); + thigw->setDefaultEditedState(defSpotState->thigw ? Edited : UnEdited); // Contrast by detail levels for (int i = 0; i < 6; i++) { @@ -10959,6 +11062,42 @@ void Locallab::adjusterChanged(Adjuster * a, double newval) } } + if (a == strengthw) { + if (listener) { + listener->panelChanged(Evlocallabstrengthw, strengthw->getTextValue()); + } + } + + if (a == radiusw) { + if (listener) { + listener->panelChanged(Evlocallabradiusw, radiusw->getTextValue()); + } + } + + if (a == detailw) { + if (listener) { + listener->panelChanged(Evlocallabdetailw, detailw->getTextValue()); + } + } + + if (a == gradw) { + if (listener) { + listener->panelChanged(Evlocallabgradw, gradw->getTextValue()); + } + } + + if (a == tloww) { + if (listener) { + listener->panelChanged(Evlocallabtloww, tloww->getTextValue()); + } + } + + if (a == thigw) { + if (listener) { + listener->panelChanged(Evlocallabthigw, thigw->getTextValue()); + } + } + if (a == sensilc) { if (listener) { listener->panelChanged(Evlocallabsensilc, sensilc->getTextValue()); @@ -11462,6 +11601,12 @@ void Locallab::setBatchMode(bool batchMode) blendmasklc->showEditedCB(); radmasklc->showEditedCB(); chromasklc->showEditedCB(); + strengthw->showEditedCB(); + radiusw->showEditedCB(); + detailw->showEditedCB(); + gradw->showEditedCB(); + tloww->showEditedCB(); + thigw->showEditedCB(); // Contrast by detail levels for (int i = 0; i < 6; i++) { @@ -12555,6 +12700,12 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con wavcompre->set_active(pp->locallab.spots.at(index).wavcompre); origlc->set_active(pp->locallab.spots.at(index).origlc); csThreshold->setValue(pp->locallab.spots.at(index).csthreshold); + strengthw->setValue(pp->locallab.spots.at(index).strengthw); + radiusw->setValue(pp->locallab.spots.at(index).radiusw); + detailw->setValue(pp->locallab.spots.at(index).detailw); + gradw->setValue(pp->locallab.spots.at(index).gradw); + tloww->setValue(pp->locallab.spots.at(index).tloww); + thigw->setValue(pp->locallab.spots.at(index).thigw); if (pp->locallab.spots.at(index).localcontMethod == "loc") { localcontMethod->set_active(0); @@ -12579,6 +12730,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con wavshapecon->setCurve(pp->locallab.spots.at(index).locconwavcurve); wavshapecomp->setCurve(pp->locallab.spots.at(index).loccompwavcurve); wavshapecompre->setCurve(pp->locallab.spots.at(index).loccomprewavcurve); + wavshapeedg->setCurve(pp->locallab.spots.at(index).locedgwavcurve); CCmasklcshape->setCurve(pp->locallab.spots.at(index).CCmasklccurve); LLmasklcshape->setCurve(pp->locallab.spots.at(index).LLmasklccurve); @@ -13090,6 +13242,13 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con wavshapecon->setUnChanged(!spotState->locconwavcurve); wavshapecomp->setUnChanged(!spotState->loccompwavcurve); wavshapecompre->setUnChanged(!spotState->loccomprewavcurve); + strengthw->setEditedState(spotState->strengthw ? Edited : UnEdited); + radiusw->setEditedState(spotState->radiusw ? Edited : UnEdited); + detailw->setEditedState(spotState->detailw ? Edited : UnEdited); + gradw->setEditedState(spotState->gradw ? Edited : UnEdited); + tloww->setEditedState(spotState->tloww ? Edited : UnEdited); + thigw->setEditedState(spotState->thigw ? Edited : UnEdited); + wavshapeedg->setUnChanged(!spotState->locedgwavcurve); LLmasklcshape->setUnChanged(!spotState->LLmasklccurve); HHmasklcshape->setUnChanged(!spotState->HHmasklccurve); @@ -13626,10 +13785,17 @@ void Locallab::updateSpecificGUIState() LocalcurveEditorwavcon->hide(); LocalcurveEditorwavcomp->hide(); LocalcurveEditorwavcompre->hide(); + LocalcurveEditorwavedg->hide(); fftwlc->show(); blurlc->show(); wavblur->show(); origlc->hide(); + strengthw->hide(); + radiusw->hide(); + detailw->hide(); + gradw->hide(); + tloww->hide(); + thigw->hide(); } else if (localcontMethod->get_active_row_number() == 1) { levelwav->show(); residcont->show(); @@ -13661,10 +13827,17 @@ void Locallab::updateSpecificGUIState() LocalcurveEditorwavcon->show(); LocalcurveEditorwavcomp->show(); LocalcurveEditorwavcompre->show(); + LocalcurveEditorwavedg->show(); fftwlc->hide(); blurlc->show(); wavblur->show(); origlc->show(); + strengthw->show(); + radiusw->show(); + detailw->show(); + gradw->show(); + tloww->show(); + thigw->show(); } // Update Sharpening GUI according to inverssha button state (to be compliant with inversshaChanged function) diff --git a/rtgui/locallab.h b/rtgui/locallab.h index 76251d6b2..45c82fa48 100644 --- a/rtgui/locallab.h +++ b/rtgui/locallab.h @@ -175,6 +175,8 @@ private: FlatCurveEditor* const wavshapecomp; CurveEditorGroup* const LocalcurveEditorwavcompre; FlatCurveEditor* const wavshapecompre; + CurveEditorGroup* const LocalcurveEditorwavedg; + FlatCurveEditor* const wavshapeedg; CurveEditorGroup* const masklcCurveEditorG; CurveEditorGroup* const mask2lcCurveEditorG; DiagonalCurveEditor* const Lmasklcshape; @@ -386,6 +388,14 @@ private: Adjuster* const chromasklc; Adjuster* const strwav; Adjuster* const angwav; + Adjuster* const strengthw; + Adjuster* const radiusw; + Adjuster* const detailw; + Adjuster* const gradw; + Adjuster* const tloww; + Adjuster* const thigw; + + // Contrast by detail levels const std::array multiplier; Adjuster* const chromacbdl; @@ -630,6 +640,7 @@ private: Gtk::Frame* const sharFrame; Gtk::Frame* const clariFrame; Gtk::Frame* const gradwavFrame; + Gtk::Frame* const edgFrame; Gtk::Frame* const blurlevelFrame; Gtk::Frame* const contFrame; Gtk::Frame* const compFrame; diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 3c0f7ac89..cdfab9a1e 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -1279,6 +1279,13 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).clarisoft = locallab.spots.at(j).clarisoft && pSpot.clarisoft == otherSpot.clarisoft; locallab.spots.at(j).strwav = locallab.spots.at(j).strwav && pSpot.strwav == otherSpot.strwav; locallab.spots.at(j).angwav = locallab.spots.at(j).angwav && pSpot.angwav == otherSpot.angwav; + locallab.spots.at(j).strengthw = locallab.spots.at(j).strengthw && pSpot.strengthw == otherSpot.strengthw; + locallab.spots.at(j).radiusw = locallab.spots.at(j).radiusw && pSpot.radiusw == otherSpot.radiusw; + locallab.spots.at(j).detailw = locallab.spots.at(j).detailw && pSpot.detailw == otherSpot.detailw; + locallab.spots.at(j).gradw = locallab.spots.at(j).gradw && pSpot.gradw == otherSpot.gradw; + locallab.spots.at(j).tloww = locallab.spots.at(j).tloww && pSpot.tloww == otherSpot.tloww; + locallab.spots.at(j).thigw = locallab.spots.at(j).thigw && pSpot.thigw == otherSpot.thigw; + locallab.spots.at(j).locedgwavcurve = locallab.spots.at(j).locedgwavcurve && pSpot.locedgwavcurve == otherSpot.locedgwavcurve; locallab.spots.at(j).sensilc = locallab.spots.at(j).sensilc && pSpot.sensilc == otherSpot.sensilc; locallab.spots.at(j).fftwlc = locallab.spots.at(j).fftwlc && pSpot.fftwlc == otherSpot.fftwlc; locallab.spots.at(j).blurlc = locallab.spots.at(j).blurlc && pSpot.blurlc == otherSpot.blurlc; @@ -4104,6 +4111,34 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).angwav = mods.locallab.spots.at(i).angwav; } + if (locallab.spots.at(i).strengthw) { + toEdit.locallab.spots.at(i).strengthw = mods.locallab.spots.at(i).strengthw; + } + + if (locallab.spots.at(i).radiusw) { + toEdit.locallab.spots.at(i).radiusw = mods.locallab.spots.at(i).radiusw; + } + + if (locallab.spots.at(i).detailw) { + toEdit.locallab.spots.at(i).detailw = mods.locallab.spots.at(i).detailw; + } + + if (locallab.spots.at(i).gradw) { + toEdit.locallab.spots.at(i).gradw = mods.locallab.spots.at(i).gradw; + } + + if (locallab.spots.at(i).tloww) { + toEdit.locallab.spots.at(i).tloww = mods.locallab.spots.at(i).tloww; + } + + if (locallab.spots.at(i).thigw) { + toEdit.locallab.spots.at(i).thigw = mods.locallab.spots.at(i).thigw; + } + + if (locallab.spots.at(i).locedgwavcurve) { + toEdit.locallab.spots.at(i).locedgwavcurve = mods.locallab.spots.at(i).locedgwavcurve; + } + if (locallab.spots.at(i).sensilc) { toEdit.locallab.spots.at(i).sensilc = mods.locallab.spots.at(i).sensilc; } @@ -5697,6 +5732,12 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : clarisoft(v), strwav(v), angwav(v), + strengthw(v), + radiusw(v), + detailw(v), + tloww(v), + thigw(v), + gradw(v), sensilc(v), fftwlc(v), blurlc(v), @@ -5712,6 +5753,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : locconwavcurve(v), loccompwavcurve(v), loccomprewavcurve(v), + locedgwavcurve(v), csthreshold(v), CCmasklccurve(v), LLmasklccurve(v), @@ -6108,6 +6150,12 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) clarisoft = v; strwav = v; angwav = v; + strengthw = v; + radiusw = v; + detailw = v; + tloww = v; + thigw = v; + gradw = v; sensilc = v; fftwlc = v; blurlc = v; @@ -6123,6 +6171,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) locconwavcurve = v; loccompwavcurve = v; loccomprewavcurve = v; + locedgwavcurve = v; csthreshold = v; CCmasklccurve = v; LLmasklccurve = v; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 3b2f5a049..8bd01c603 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -711,6 +711,12 @@ public: bool clarisoft; bool strwav; bool angwav; + bool strengthw; + bool radiusw; + bool detailw; + bool tloww; + bool thigw; + bool gradw; bool sensilc; bool fftwlc; bool blurlc; @@ -726,6 +732,7 @@ public: bool locconwavcurve; bool loccompwavcurve; bool loccomprewavcurve; + bool locedgwavcurve; bool csthreshold; bool CCmasklccurve; bool LLmasklccurve;