diff --git a/rtdata/languages/default b/rtdata/languages/default index 148e912a9..50506d04c 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1114,6 +1114,7 @@ HISTORY_MSG_875;Local - LC mask blend HISTORY_MSG_876;Local - LC mask radius HISTORY_MSG_877;Local - LC mask chroma HISTORY_MSG_878;Local - LC mask curve contrast +HISTORY_MSG_879;Local - LC Chroma levels HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction @@ -2224,6 +2225,7 @@ TP_LOCALLAB_CH;Curves CL - LC TP_LOCALLAB_CHROMA;Chrominance TP_LOCALLAB_CHROMACBDL;Chroma TP_LOCALLAB_CHROMACB_TOOLTIP;Acts as an amplifier-reducer action compare to sliders of luminance.\nUnder 100 reduce, above 100 amplifie +TP_LOCALLAB_CHROMALEV;Chroma levels TP_LOCALLAB_CHROMASKCOL;Chroma mask TP_LOCALLAB_CHROMASK_TOOLTIP;You can use this slider to desaturated background (inverse mask - curve near 0).\nAlso to attenuate or enhance the action of a mask on the chroma TP_LOCALLAB_CHRRT;Chroma diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index 3b93f4b79..9b0b32563 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -317,11 +317,11 @@ public: static void strcurv_data(std::string retistr, int *s_datc, int &siz); void blendstruc(int bfw, int bfh, LabImage* bufcolorig, float radius, float stru, array2D & blend2, int sk, bool multiThread); - void wavcontrast4(float ** tmp, float contrast, float fatres, float radblur, float radlevblur, int bfw, int bfh, int level_bl, int level_hl, int level_br, int level_hr, int sk, bool numThreads, const LocwavCurve & locwavCurve, bool & locwavutili, + void wavcontrast4(float ** tmp, float ** tmpa, float ** tmpb, float contrast, float fatres, float radblur, float radlevblur, int bfw, int bfh, int level_bl, int level_hl, int level_br, int level_hr, int sk, bool numThreads, const LocwavCurve & locwavCurve, bool & locwavutili, const LocwavCurve & loclevwavCurve, bool & loclevwavutili, bool wavcurvelev, const LocwavCurve & locconwavCurve, bool & locconwavutili, bool wavcurvecon, const LocwavCurve & loccompwavCurve, bool & loccompwavutili, bool wavcurvecomp, - float sigm, int & maxlvl, float fatdet, float fatanch); + float sigm, int & maxlvl, float fatdet, float fatanch, float chromalev); void transit_shapedetect2(int call, int senstype, const LabImage * bufexporig, const LabImage * bufexpfin, LabImage * originalmask, const float hueref, const float chromaref, const float lumaref, float sobelref, float meansobel, float ** blend2, struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk); diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 119754040..f7e3393be 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -4078,7 +4078,7 @@ void ImProcFunctions::maskcalccol(int call, bool invmask, bool pde, int bfw, int bool wavcurvecon = false; bool loccompwavutili = false; bool wavcurvecomp = false; - wavcontrast4(bufmaskblurcol->L, contrast, 0.f, 0.f, 0.f, bfw, bfh, level_bl, level_hl, level_br, level_hr, sk, numThreads, loclmasCurvecolwav, lmasutilicolwav, dummy, loclevwavutili, wavcurvelev, dummy, locconwavutili, wavcurvecon, dummy, loccompwavutili, wavcurvecomp, 1.f, maxlvl, 0.f, 0.f); + wavcontrast4(bufmaskblurcol->L, nullptr, nullptr, contrast, 0.f, 0.f, 0.f, bfw, bfh, level_bl, level_hl, level_br, level_hr, sk, numThreads, loclmasCurvecolwav, lmasutilicolwav, dummy, loclevwavutili, wavcurvelev, dummy, locconwavutili, wavcurvecon, dummy, loccompwavutili, wavcurvecomp, 1.f, maxlvl, 0.f, 0.f, 1.f); } @@ -6934,11 +6934,11 @@ void ImProcFunctions::fftw_tile_blur(int GW, int GH, int tilssize, int max_numbl } -void ImProcFunctions::wavcontrast4(float ** tmp, float contrast, float fatres, float radblur, float radlevblur, int bfw, int bfh, int level_bl, int level_hl, int level_br, int level_hr, int sk, bool numThreads, +void ImProcFunctions::wavcontrast4(float ** tmp, float ** tmpa, float ** tmpb, float contrast, float fatres, float radblur, float radlevblur, int bfw, int bfh, int level_bl, int level_hl, int level_br, int level_hr, int sk, bool numThreads, const LocwavCurve & locwavCurve, bool & locwavutili, const LocwavCurve & loclevwavCurve, bool & loclevwavutili, bool wavcurvelev, const LocwavCurve & locconwavCurve, bool & locconwavutili, bool wavcurvecon, const LocwavCurve & loccompwavCurve, bool & loccompwavutili, bool wavcurvecomp, - float sigm, int & maxlvl, float fatdet, float fatanch) + float sigm, int & maxlvl, float fatdet, float fatanch, float chromalev) { wavelet_decomposition *wdspot = new wavelet_decomposition(tmp[0], bfw, bfh, level_br, 1, sk, numThreads, 6); @@ -6946,6 +6946,23 @@ void ImProcFunctions::wavcontrast4(float ** tmp, float contrast, float fatres, f if (wdspot->memoryAllocationFailed) { return; } + wavelet_decomposition *wdspota; + wavelet_decomposition *wdspotb; + if(chromalev != 1.f) { + wdspota = new wavelet_decomposition(tmpa[0], bfw, bfh, level_br, 1, sk, numThreads, 6); + + //first decomposition for compress dynamic range positive values and other process + if (wdspota->memoryAllocationFailed) { + return; + } + + wdspotb = new wavelet_decomposition(tmpb[0], bfw, bfh, level_br, 1, sk, numThreads, 6); + + //first decomposition for compress dynamic range positive values and other process + if (wdspotb->memoryAllocationFailed) { + return; + } + } maxlvl = wdspot->maxlevel(); int W_L = wdspot->level_W(0); @@ -7067,7 +7084,15 @@ void ImProcFunctions::wavcontrast4(float ** tmp, float contrast, float fatres, f for (int level = level_bl; level < maxlvl; ++level) { int W_L = wdspot->level_W(level); int H_L = wdspot->level_H(level); + float **wav_a = nullptr; + float **wav_b = nullptr; + float **wav_L = wdspot->level_coeffs(level); + if(chromalev != 1.f) { + wav_a = wdspota->level_coeffs(level); + wav_b = wdspotb->level_coeffs(level); + } + float rap = mean[level] - 2.f * sigm * sigma[level]; if (rap > 0.f) { @@ -7097,7 +7122,7 @@ void ImProcFunctions::wavcontrast4(float ** tmp, float contrast, float fatres, f float cpMul = 200.f * (locconwavCurve[level * 55.5f] - 0.5f); if (cpMul > 0.f) { - cpMul *= 2.f; + cpMul *= 3.5f; } cpMul /= sk; @@ -7133,6 +7158,10 @@ void ImProcFunctions::wavcontrast4(float ** tmp, float contrast, float fatres, f float alpha = max((1024.f + 15.f * (float) cpMul * beta) / 1024.f, 0.02f) ; wav_L[dir][i] *= alpha; + if(chromalev != 1.f) { + wav_a[dir][i] *= alpha * chromalev; + wav_b[dir][i] *= alpha * chromalev; + } } } } @@ -7359,6 +7388,12 @@ void ImProcFunctions::wavcontrast4(float ** tmp, float contrast, float fatres, f //reconstruct all and compress dynamic range positive wdspot->reconstruct(tmp[0], 1.f); + if(chromalev != 1.f) { + wdspota->reconstruct(tmpa[0], 1.f); + wdspotb->reconstruct(tmpb[0], 1.f); + delete wdspota; + delete wdspotb; + } delete wdspot; //compress dynamic range negative in case of - seems no need @@ -9467,7 +9502,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o bool wavcurvecon = false; bool loccompwavutili = false; bool wavcurvecomp = false; - wavcontrast4(bufmaskblurbl->L, contrast, 0.f, 0.f, 0.f, GW, GH, level_bl, level_hl, level_br, level_hr, sk, numThreads, loclmasCurveblwav, lmasutiliblwav, dummy, loclevwavutili, wavcurvelev, dummy, locconwavutili, wavcurvecon, dummy, loccompwavutili, wavcurvecomp, 1.f, maxlvl, 0.f, 0.f); + wavcontrast4(bufmaskblurbl->L, nullptr, nullptr, contrast, 0.f, 0.f, 0.f, GW, GH, level_bl, level_hl, level_br, level_hr, sk, numThreads, loclmasCurveblwav, lmasutiliblwav, dummy, loclevwavutili, wavcurvelev, dummy, locconwavutili, wavcurvecon, dummy, loccompwavutili, wavcurvecomp, 1.f, maxlvl, 0.f, 0.f, 1.f); } int shado = params->locallab.spots.at(sp).shadmaskbl; @@ -11395,8 +11430,9 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o const float fatdet = params->locallab.spots.at(sp).fatdet; const float fatanch = params->locallab.spots.at(sp).fatanch; const float fatres = params->locallab.spots.at(sp).fatres; + const float chrol = params->locallab.spots.at(sp).chromalev; - wavcontrast4(tmp1->L, contrast, fatres, radblur, radlevblur, tmp1->W, tmp1->H, level_bl, level_hl, level_br, level_hr, sk, numThreads, locwavCurve, locwavutili, loclevwavCurve, loclevwavutili, wavcurvelev, locconwavCurve, locconwavutili, wavcurvecon, loccompwavCurve, loccompwavutili, wavcurvecomp, sigma, maxlvl, fatdet, fatanch); + wavcontrast4(tmp1->L, tmp1->a, tmp1->b, contrast, fatres, radblur, radlevblur, tmp1->W, tmp1->H, level_bl, level_hl, level_br, level_hr, sk, numThreads, locwavCurve, locwavutili, loclevwavCurve, loclevwavutili, wavcurvelev, locconwavCurve, locconwavutili, wavcurvecon, loccompwavCurve, loccompwavutili, wavcurvecomp, sigma, maxlvl, fatdet, fatanch, chrol); const float satur = params->locallab.spots.at(sp).residchro; diff --git a/rtengine/procevents.h b/rtengine/procevents.h index a111bf5ce..092fc2892 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -904,6 +904,7 @@ enum ProcEventCode { Evlocallabradmasklc = 875, Evlocallabchromasklc = 876, EvlocallabLmasklcshape = 877, + Evlocallabchromalev = 878, NUMOFEVENTS }; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 235587cab..4966c4294 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2727,6 +2727,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : levelblur(0.0), residchro(0.0), sigma(1.0), + chromalev(1.0), fatdet(40.0), fatanch(50.0), fatres(0.0), @@ -3132,6 +3133,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && levelblur == other.levelblur && residchro == other.residchro && sigma == other.sigma + && chromalev == other.chromalev && fatdet == other.fatdet && fatanch == other.fatanch && fatres == other.fatres @@ -4516,6 +4518,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->locallab.spots.at(i).levelblur, "Locallab", "Levelblur_" + std::to_string(i), spot.levelblur, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).residchro, "Locallab", "Residchro_" + std::to_string(i), spot.residchro, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).sigma, "Locallab", "Sigma_" + std::to_string(i), spot.sigma, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).chromalev, "Locallab", "Chromalev_" + std::to_string(i), spot.chromalev, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).fatdet, "Locallab", "Fatdet_" + std::to_string(i), spot.fatdet, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).fatanch, "Locallab", "Fatanch_" + std::to_string(i), spot.fatanch, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).fatres, "Locallab", "Fatres_" + std::to_string(i), spot.fatres, keyFile); @@ -6051,6 +6054,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Levelblur_" + std::to_string(i), pedited, spot.levelblur, spotEdited.levelblur); assignFromKeyfile(keyFile, "Locallab", "Residchro_" + std::to_string(i), pedited, spot.residchro, spotEdited.residchro); assignFromKeyfile(keyFile, "Locallab", "Sigma_" + std::to_string(i), pedited, spot.sigma, spotEdited.sigma); + assignFromKeyfile(keyFile, "Locallab", "Chromalev_" + std::to_string(i), pedited, spot.chromalev, spotEdited.chromalev); assignFromKeyfile(keyFile, "Locallab", "Fatdet_" + std::to_string(i), pedited, spot.fatdet, spotEdited.fatdet); assignFromKeyfile(keyFile, "Locallab", "Fatanch_" + std::to_string(i), pedited, spot.fatanch, spotEdited.fatanch); assignFromKeyfile(keyFile, "Locallab", "Fatres_" + std::to_string(i), pedited, spot.fatres, spotEdited.fatres); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index ed509f25c..2ec92b873 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -1270,6 +1270,7 @@ struct LocallabParams { double levelblur; double residchro; double sigma; + double chromalev; double fatdet; double fatanch; double fatres; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 958b6d698..9275302c4 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -907,7 +907,8 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, //Evlocallabblendmasklc LUMINANCECURVE, // Evlocallabradmasklc LUMINANCECURVE, //Evlocallabchromasklc - LUMINANCECURVE //EvlocallabLmasklcshape + LUMINANCECURVE, //EvlocallabLmasklcshape + LUMINANCECURVE //Evlocallabchromalev }; diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index 37ddc6383..047b2e7fb 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -575,6 +575,7 @@ claricres(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CLARICRES"), -20., 100., 0.5, sensilc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSIS"), 0, 100, 1, 19))), residchro(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RESIDCHRO"), -100, 100, 1, 0))), sigma(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SIGMAWAV"), 0.2, 2.5, 0.01, 1.))), +chromalev(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMALEV"), 0.01, 2., 0.01, 1.))), fatdet(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATDETAIL"), -100., 300., 1., 0.))), fatanch(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATANCHOR"), 1., 100., 1., 50., Gtk::manage(new RTImage("circle-black-small.png")), Gtk::manage(new RTImage("circle-white-small.png"))))), fatres(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATRES"), 0., 100., 1., 0.))), @@ -2897,6 +2898,7 @@ pe(nullptr) levelblur->setAdjusterListener(this); residchro->setAdjusterListener(this); sigma->setAdjusterListener(this); + chromalev->setAdjusterListener(this); fatdet->setAdjusterListener(this); fatanch->setAdjusterListener(this); fatres->setAdjusterListener(this); @@ -2938,6 +2940,7 @@ pe(nullptr) contFrame->set_label_align(0.025, 0.5); ToolParamBlock* const contlevBox = Gtk::manage(new ToolParamBlock()); contlevBox->pack_start(*sigma); + contlevBox->pack_start(*chromalev); contlevBox->pack_start(*LocalcurveEditorwavcon, Gtk::PACK_SHRINK, 4); contFrame->add(*contlevBox); @@ -5249,6 +5252,7 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pp->locallab.spots.at(pp->locallab.selspot).levelblur = levelblur->getValue(); pp->locallab.spots.at(pp->locallab.selspot).residchro = residchro->getValue(); pp->locallab.spots.at(pp->locallab.selspot).sigma = sigma->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).chromalev = chromalev->getValue(); pp->locallab.spots.at(pp->locallab.selspot).fatdet = fatdet->getValue(); pp->locallab.spots.at(pp->locallab.selspot).fatanch = fatanch->getValue(); pp->locallab.spots.at(pp->locallab.selspot).fatres = fatres->getValue(); @@ -5657,6 +5661,7 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pe->locallab.spots.at(pp->locallab.selspot).levelblur = pe->locallab.spots.at(pp->locallab.selspot).levelblur || levelblur->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).residchro = pe->locallab.spots.at(pp->locallab.selspot).residchro || residchro->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).sigma = pe->locallab.spots.at(pp->locallab.selspot).sigma || sigma->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).chromalev = pe->locallab.spots.at(pp->locallab.selspot).chromalev || chromalev->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).fatdet = pe->locallab.spots.at(pp->locallab.selspot).fatdet || fatdet->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).fatanch = pe->locallab.spots.at(pp->locallab.selspot).fatanch || fatanch->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).fatres = pe->locallab.spots.at(pp->locallab.selspot).fatres || fatres->getEditedState(); @@ -6064,6 +6069,7 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pedited->locallab.spots.at(pp->locallab.selspot).levelblur = pedited->locallab.spots.at(pp->locallab.selspot).levelblur || levelblur->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).residchro = pedited->locallab.spots.at(pp->locallab.selspot).residchro || residchro->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).sigma = pedited->locallab.spots.at(pp->locallab.selspot).sigma || sigma->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).chromalev = pedited->locallab.spots.at(pp->locallab.selspot).chromalev || chromalev->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).fatdet = pedited->locallab.spots.at(pp->locallab.selspot).fatdet || fatdet->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).fatanch = pedited->locallab.spots.at(pp->locallab.selspot).fatanch || fatanch->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).fatres = pedited->locallab.spots.at(pp->locallab.selspot).fatres || fatres->getEditedState(); @@ -6640,6 +6646,7 @@ void Locallab::localcontMethodChanged() levelblur->hide(); residchro->hide(); sigma->hide(); + chromalev->hide(); fatdet->hide(); fatanch->hide(); fatres->hide(); @@ -6666,6 +6673,7 @@ void Locallab::localcontMethodChanged() levelblur->show(); residchro->show(); sigma->show(); + chromalev->show(); fatdet->show(); fatanch->show(); fatres->show(); @@ -8739,6 +8747,7 @@ void Locallab::setDefaults(const rtengine::procparams::ProcParams * defParams, c levelblur->setDefault(defSpot->levelblur); residchro->setDefault(defSpot->residchro); sigma->setDefault(defSpot->sigma); + chromalev->setDefault(defSpot->chromalev); fatdet->setDefault(defSpot->fatdet); fatanch->setDefault(defSpot->fatanch); fatres->setDefault(defSpot->fatres); @@ -8978,6 +8987,7 @@ void Locallab::setDefaults(const rtengine::procparams::ProcParams * defParams, c levelblur->setDefaultEditedState(Irrelevant); residchro->setDefaultEditedState(Irrelevant); sigma->setDefaultEditedState(Irrelevant); + chromalev->setDefaultEditedState(Irrelevant); fatdet->setDefaultEditedState(Irrelevant); fatanch->setDefaultEditedState(Irrelevant); fatres->setDefaultEditedState(Irrelevant); @@ -9222,6 +9232,7 @@ void Locallab::setDefaults(const rtengine::procparams::ProcParams * defParams, c levelblur->setDefaultEditedState(defSpotState->levelblur ? Edited : UnEdited); residchro->setDefaultEditedState(defSpotState->residchro ? Edited : UnEdited); sigma->setDefaultEditedState(defSpotState->sigma ? Edited : UnEdited); + chromalev->setDefaultEditedState(defSpotState->chromalev ? Edited : UnEdited); fatdet->setDefaultEditedState(defSpotState->fatdet ? Edited : UnEdited); fatanch->setDefaultEditedState(defSpotState->fatanch ? Edited : UnEdited); fatres->setDefaultEditedState(defSpotState->fatres ? Edited : UnEdited); @@ -10399,6 +10410,12 @@ void Locallab::adjusterChanged(Adjuster * a, double newval) } } + if (a == chromalev) { + if (listener) { + listener->panelChanged(Evlocallabchromalev, chromalev->getTextValue()); + } + } + if (a == fatdet) { if (listener) { listener->panelChanged(Evlocallabfatdet, fatdet->getTextValue()); @@ -10908,6 +10925,7 @@ void Locallab::setBatchMode(bool batchMode) levelblur->showEditedCB(); residchro->showEditedCB(); sigma->showEditedCB(); + chromalev->showEditedCB(); fatdet->showEditedCB(); fatanch->showEditedCB(); fatres->showEditedCB(); @@ -11970,6 +11988,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con levelblur->setValue(pp->locallab.spots.at(index).levelblur); residchro->setValue(pp->locallab.spots.at(index).residchro); sigma->setValue(pp->locallab.spots.at(index).sigma); + chromalev->setValue(pp->locallab.spots.at(index).chromalev); fatdet->setValue(pp->locallab.spots.at(index).fatdet); fatanch->setValue(pp->locallab.spots.at(index).fatanch); fatres->setValue(pp->locallab.spots.at(index).fatres); @@ -12482,6 +12501,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con levelblur->setEditedState(spotState->levelblur ? Edited : UnEdited); residchro->setEditedState(spotState->residchro ? Edited : UnEdited); sigma->setEditedState(spotState->sigma ? Edited : UnEdited); + chromalev->setEditedState(spotState->chromalev ? Edited : UnEdited); fatdet->setEditedState(spotState->fatdet ? Edited : UnEdited); fatanch->setEditedState(spotState->fatanch ? Edited : UnEdited); fatres->setEditedState(spotState->fatres ? Edited : UnEdited); @@ -13005,6 +13025,7 @@ void Locallab::updateSpecificGUIState() levelblur->hide(); residchro->hide(); sigma->hide(); + chromalev->hide(); fatdet->hide(); fatanch->hide(); fatres->hide(); @@ -13030,6 +13051,7 @@ void Locallab::updateSpecificGUIState() residblur->show(); levelblur->show(); sigma->show(); + chromalev->show(); fatdet->show(); fatanch->show(); fatres->show(); diff --git a/rtgui/locallab.h b/rtgui/locallab.h index 69a4bc62e..4ea28118a 100644 --- a/rtgui/locallab.h +++ b/rtgui/locallab.h @@ -370,6 +370,7 @@ private: Adjuster* const sensilc; Adjuster* const residchro; Adjuster* const sigma; + Adjuster* const chromalev; Adjuster* const fatdet; Adjuster* const fatanch; Adjuster* const fatres; diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 5dd6e06d4..7295fdd82 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -1263,6 +1263,7 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).levelblur = locallab.spots.at(j).levelblur && pSpot.levelblur == otherSpot.levelblur; locallab.spots.at(j).residchro = locallab.spots.at(j).residchro && pSpot.residchro == otherSpot.residchro; locallab.spots.at(j).sigma = locallab.spots.at(j).sigma && pSpot.sigma == otherSpot.sigma; + locallab.spots.at(j).chromalev = locallab.spots.at(j).chromalev && pSpot.chromalev == otherSpot.chromalev; locallab.spots.at(j).fatdet = locallab.spots.at(j).fatdet && pSpot.fatdet == otherSpot.fatdet; locallab.spots.at(j).fatanch = locallab.spots.at(j).fatanch && pSpot.fatanch == otherSpot.fatanch; locallab.spots.at(j).fatres = locallab.spots.at(j).fatres && pSpot.fatres == otherSpot.fatres; @@ -4026,6 +4027,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).sigma = mods.locallab.spots.at(i).sigma; } + if (locallab.spots.at(i).chromalev) { + toEdit.locallab.spots.at(i).chromalev = mods.locallab.spots.at(i).chromalev; + } + if (locallab.spots.at(i).fatdet) { toEdit.locallab.spots.at(i).fatdet = mods.locallab.spots.at(i).fatdet; } @@ -5597,6 +5602,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : levelblur(v), residchro(v), sigma(v), + chromalev(v), fatdet(v), fatanch(v), fatres(v), @@ -5992,6 +5998,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) levelblur = v; residchro = v; sigma = v; + chromalev = v; fatdet = v; fatanch = v; fatres = v; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 4450b500c..b7542040a 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -696,6 +696,7 @@ public: bool levelblur; bool residchro; bool sigma; + bool chromalev; bool fatdet; bool fatanch; bool fatres;