diff --git a/rtdata/languages/default b/rtdata/languages/default index ca65e7095..3643bd654 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1125,6 +1125,9 @@ HISTORY_MSG_885;Local - Contrast Dynamic Range Wavelet HISTORY_MSG_886;Local - Contrast Wavelet Curve Compression HISTORY_MSG_887;Local - Contrast Wavelet Compression Residual HISTORY_MSG_888;Local - Contrast Wavelet Balance Threshold +HISTORY_MSG_889;Local - Contrast Wavelet Graduated Strength +HISTORY_MSG_890;Local - Contrast Wavelet Graduated angle +HISTORY_MSG_891;Local - Contrast Wavelet Graduated HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction @@ -2358,6 +2361,7 @@ TP_LOCALLAB_GRADSTRHUE_TOOLTIP;Filter Hue strength TP_LOCALLAB_GRADSTRLUM;Gradient strength Luminance TP_LOCALLAB_GRADSTR_TOOLTIP;Filter strength in stops TP_LOCALLAB_GRAINFRA;Film Grain 1:1 +TP_LOCALLAB_GRALWFRA;Graduated Filter Local contrast TP_LOCALLAB_GRIDFRAME_TOOLTIP;It is desirable that the spot is in a flat area.\n\nOnly mode NORMAL and eventually Hue, Saturation, Color, Luminosity are concerned by Merge background TP_LOCALLAB_GRIDONE;Color Toning TP_LOCALLAB_GRIDTWO;Direct diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index a0e9bd73d..9a48670e8 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -224,7 +224,7 @@ public: void idirpyr(LabImage* data_coarse, LabImage* data_fine, int level, LUTf &rangefn_L, LUTf & nrwt_l, LUTf & nrwt_ab, int pitch, int scale, const int luma, const int chroma/*, LUTf & Lcurve, LUTf & abcurve*/); //locallab - void maskcalccol(int call, bool invmask, bool pde, int bfw, int bfh, int xstart, int ystart, int sk, int cx, int cy, LabImage* bufcolorig, LabImage* bufmaskblurcol, LabImage* originalmaskcol, LabImage* original, LabImage* reserved, int inv, const struct local_params & lp, + void maskcalccol(int call, bool invmask, bool pde, int bfw, int bfh, int xstart, int ystart, int sk, int cx, int cy, LabImage* bufcolorig, LabImage* bufmaskblurcol, LabImage* originalmaskcol, LabImage* original, LabImage* reserved, int inv, struct local_params & lp, float strumask, bool astool, const LocCCmaskCurve & locccmasCurve, bool & lcmasutili, const LocLLmaskCurve & locllmasCurve, bool & llmasutili, @@ -319,7 +319,7 @@ 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 ** 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, + void wavcontrast4(struct local_params& lp, 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, bool wavcurve, const LocwavCurve & loclevwavCurve, bool & loclevwavutili, bool wavcurvelev, const LocwavCurve & locconwavCurve, bool & locconwavutili, bool wavcurvecon, const LocwavCurve & loccompwavCurve, bool & loccompwavutili, bool wavcurvecomp, diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index f1884c4ae..dd5a8ed76 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -234,6 +234,8 @@ struct local_params { float strvibab; float strvibh; float angvib; + float angwav; + float strwav; float softradiusexp; float softradiuscol; float softradiuscb; @@ -421,7 +423,7 @@ struct local_params { bool Autogray; bool autocompute; float baselog; - + bool wavgradl; }; @@ -831,6 +833,8 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall float strvibab = ((float) locallab.spots.at(sp).strvibab); float strvibh = ((float) locallab.spots.at(sp).strvibh); float angvib = ((float) locallab.spots.at(sp).angvib); + float strwav = ((float) locallab.spots.at(sp).strwav); + float angwav = ((float) locallab.spots.at(sp).angwav); float softradiusexpo = ((float) locallab.spots.at(sp).softradiusexp); float softradiuscolor = ((float) locallab.spots.at(sp).softradiuscol); float softradiusreti = ((float) locallab.spots.at(sp).softradiusret); @@ -907,7 +911,8 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall float chromasktm = ((float) locallab.spots.at(sp).chromasktm); float gammasktm = ((float) locallab.spots.at(sp).gammasktm); float slomasktm = ((float) locallab.spots.at(sp).slomasktm); - + bool wavgradl = locallab.spots.at(sp).wavgradl; + float blendmaskbl = ((float) locallab.spots.at(sp).blendmaskbl) / 100.f ; float radmaskbl = ((float) locallab.spots.at(sp).radmaskbl); float chromaskbl = ((float) locallab.spots.at(sp).chromaskbl); @@ -967,6 +972,8 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.strvibab = strvibab; lp.strvibh = strvibh; lp.angvib = angvib; + lp.strwav = strwav; + lp.angwav = angwav; lp.softradiusexp = softradiusexpo; lp.softradiuscol = softradiuscolor; lp.softradiusret = softradiusreti; @@ -994,7 +1001,7 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.chromatm = chromasktm; lp.gammatm = gammasktm; lp.slomatm = slomasktm; - + lp.wavgradl = wavgradl; lp.blendmabl = blendmaskbl; lp.radmabl = radmaskbl; lp.chromabl = chromaskbl; @@ -2965,6 +2972,9 @@ void calclocalGradientParams(const struct local_params& lp, struct grad_params& } else if (indic == 9) { stops = lp.strvibh; angs = lp.angvib; + } else if (indic == 10) { + stops = lp.strwav; + angs = lp.angwav; } @@ -3721,7 +3731,7 @@ void ImProcFunctions::retinex_pde(float * datain, float * dataout, int bfw, int } -void ImProcFunctions::maskcalccol(int call, bool invmask, bool pde, int bfw, int bfh, int xstart, int ystart, int sk, int cx, int cy, LabImage* bufcolorig, LabImage* bufmaskblurcol, LabImage* originalmaskcol, LabImage* original, LabImage* reserved, int inv, const struct local_params & lp, +void ImProcFunctions::maskcalccol(int call, bool invmask, bool pde, int bfw, int bfh, int xstart, int ystart, int sk, int cx, int cy, LabImage* bufcolorig, LabImage* bufmaskblurcol, LabImage* originalmaskcol, LabImage* original, LabImage* reserved, int inv, struct local_params & lp, float strumask, bool astool, const LocCCmaskCurve & locccmasCurve, bool & lcmasutili, const LocLLmaskCurve & locllmasCurve, bool & llmasutili, @@ -4097,7 +4107,8 @@ void ImProcFunctions::maskcalccol(int call, bool invmask, bool pde, int bfw, int bool wavcurvecomp = false; bool loccomprewavutili = false; bool wavcurvecompre = false; - 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, dummy, loccomprewavutili, wavcurvecompre, 1.f, 1.f, maxlvl, 0.f, 0.f, 1.f, 1.f, false, false, false, false, false, 0.f, 0.f); + bool wavcurve = false; + wavcontrast4(lp, 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, wavcurve, dummy,loclevwavutili, wavcurvelev, dummy, locconwavutili, wavcurvecon, dummy, loccompwavutili, wavcurvecomp, dummy, loccomprewavutili, wavcurvecompre, 1.f, 1.f, maxlvl, 0.f, 0.f, 1.f, 1.f, false, false, false, false, false, 0.f, 0.f); } @@ -5276,11 +5287,12 @@ void ImProcFunctions::InverseColorLight_Local(bool tonequ, bool tonecurv, int sp } } } -/* - if (lp.war != 0) { - ImProcFunctions::ciecamloc_02float(sp, temp); - } - */ + + /* + if (lp.war != 0) { + ImProcFunctions::ciecamloc_02float(sp, temp); + } + */ } if (senstype == 0) { //Color and Light curves L C @@ -7135,6 +7147,7 @@ void ImProcFunctions::wavcont(wavelet_decomposition &wdspot, float ****templevel int H_L = wdspot.level_H(level); float **wav_L = wdspot.level_coeffs(level); madL[level][dir - 1] = Mad(wav_L[dir], W_L * H_L);//evaluate noise by level + for (int y = 0; y < H_L; y++) { for (int x = 0; x < W_L; x++) { float val = wav_L[dir][y * W_L + x]; @@ -7188,7 +7201,7 @@ void ImProcFunctions::wavcont(wavelet_decomposition &wdspot, float ****templevel float MaxP[10]; float MaxN[10]; Evaluate2(wdspot, mean, meanN, sigma, sigmaN, MaxP, MaxN); - // printf("levbl=%i maxlvl=%i\n", level_bl, maxlvl); + // printf("levbl=%i maxlvl=%i\n", level_bl, maxlvl); for (int dir = 1; dir < 4; dir++) { for (int level = level_bl; level < maxlvl; ++level) { @@ -7211,9 +7224,9 @@ void ImProcFunctions::wavcont(wavelet_decomposition &wdspot, float ****templevel detailattenuator = 0.0f; } - // float thresref = mean[level]; - // float thresreal = 0.1f * thres * thresref;//small values to take into account noise and artifacts - printf("mean=%f level=%i\n", mean[level], level); + // float thresref = mean[level]; + // float thresreal = 0.1f * thres * thresref;//small values to take into account noise and artifacts + printf("mean=%f level=%i\n", mean[level], level); Compresslevels(templevel[dir - 1][level], W_L, H_L, compression, detailattenuator, thres, mean[level], MaxP[level], meanN[level], MaxN[level], madL[level][dir - 1]); } @@ -7243,8 +7256,8 @@ void ImProcFunctions::wavcont(wavelet_decomposition &wdspot, float ****templevel } -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, +void ImProcFunctions::wavcontrast4(struct local_params& lp, 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, bool wavcurve, const LocwavCurve & loclevwavCurve, bool & loclevwavutili, bool wavcurvelev, const LocwavCurve & locconwavCurve, bool & locconwavutili, bool wavcurvecon, const LocwavCurve & loccompwavCurve, bool & loccompwavutili, bool wavcurvecomp, const LocwavCurve & loccomprewavCurve, bool & loccomprewavutili, bool wavcurvecompre, @@ -7257,11 +7270,144 @@ void ImProcFunctions::wavcontrast4(float ** tmp, float ** tmpa, float ** tmpb, f return; } + struct grad_params gpwav; + + maxlvl = wdspot->maxlevel(); + + int W_Lm = wdspot->level_W(maxlvl - 1); //I assume all decomposition have same W and H + + int H_Lm = wdspot->level_H(maxlvl - 1); + + if (lp.strwav != 0.f && lp.wavgradl) { + array2D factorwav(W_Lm, H_Lm); + calclocalGradientParams(lp, gpwav, 0, 0, W_Lm, H_Lm, 10); + + float factmax = -100000.f; + + for (int y = 0; y < H_Lm; y++) { + for (int x = 0; x < W_Lm; x++) { + float factor = ImProcFunctions::calcGradientFactor(gpwav, x, y); + //printf("fact=%f ", factor); + + if (factor > factmax) { + factmax = factor; + } + + factorwav[y][x] = factor; + } + + // printf("fact=%f\n", factmax); + } + + if (lp.strwav < 0.f) { + factmax *= -1; + } + + for (int y = 0; y < H_Lm; y++) { + for (int x = 0; x < W_Lm; x++) { + factorwav[y][x] /= factmax; + } + } + + float mean[10]; + float meanN[10]; + float sigma[10]; + float sigmaN[10]; + float MaxP[10]; + float MaxN[10]; + Evaluate2(*wdspot, mean, meanN, sigma, sigmaN, MaxP, MaxN); + float alowg = 1.f; + float blowg = 0.f; + + if (level_hl != level_bl) { + alowg = 1.f / (level_hl - level_bl); + blowg = -alowg * level_bl; + } + + float ahighg = 1.f; + float bhighg = 0.f; + + if (level_hr != level_br) { + ahighg = 1.f / (level_hr - level_br); + bhighg = -ahighg * level_br; + } + + for (int dir = 1; dir < 4; dir++) { + for (int level = level_bl; level < maxlvl; ++level) { + int W_L = wdspot->level_W(level); + int H_L = wdspot->level_H(level); + float **wav_L = wdspot->level_coeffs(level); + + if (MaxP[level] > 0.f && mean[level] != 0.f && sigma[level] != 0.f) { + float insigma = 0.666f; //SD + float logmax = log(MaxP[level]); //log Max + float rapX = (mean[level] + sigma[level]) / MaxP[level]; //rapport between sD / max + float inx = log(insigma); + float iny = log(rapX); + float rap = inx / iny; //koef + float asig = 0.166f / sigma[level]; + float bsig = 0.5f - asig * mean[level]; + float amean = 0.5f / mean[level]; + +#ifdef _OPENMP + #pragma omp parallel for if (multiThread) +#endif + + for (int y = 0; y < H_L; y++) { + for (int x = 0; x < W_L; x++) { + + float absciss; + float &val = wav_L[dir][y * W_L + x]; + + if (fabsf(val) >= (mean[level] + sigma[level])) { //for max + float valcour = xlogf(fabsf(val)); + float valc = valcour - logmax; + float vald = valc * rap; + absciss = xexpf(vald); + } else if (fabsf(val) >= mean[level]) { + absciss = asig * fabsf(val) + bsig; + } else { + absciss = amean * fabsf(val); + } + + float klev = 1.f; + + if (level >= level_hl && level <= level_hr) { + klev = 1.f; + } + + if (level_hl != level_bl) { + if (level >= level_bl && level < level_hl) { + klev = alowg * level + blowg; + } + } + + if (level_hr != level_br) { + if (level > level_hr && level <= level_br) { + klev = ahighg * level + bhighg; + } + } + + float kc = 0.5f * klev * factorwav[y][x] * absciss; + float reduceeffect = kc <= 0.f ? 1.f : 1.5f; + + float kinterm = 1.f + reduceeffect * kc; + kinterm = kinterm <= 0.f ? 0.01f : kinterm; + + val *= kinterm; + } + } + } + } + } + + + } + //declare a and b if need wavelet_decomposition *wdspota = nullptr; wavelet_decomposition *wdspotb = nullptr; - maxlvl = wdspot->maxlevel(); int W_L = wdspot->level_W(0); int H_L = wdspot->level_H(0); float *wav_L0 = wdspot->coeff0; @@ -7479,7 +7625,7 @@ void ImProcFunctions::wavcontrast4(float ** tmp, float ** tmpa, float ** tmpb, f } - if (locwavCurve && locwavutili) {//simple local contrast in function luminance + if (locwavCurve && locwavutili && wavcurve) {//simple local contrast in function luminance float mean[10]; float meanN[10]; float sigma[10]; @@ -7494,6 +7640,7 @@ void ImProcFunctions::wavcontrast4(float ** tmp, float ** tmpa, float ** tmpb, f int H_L = wdspot->level_H(level); float **wav_L = wdspot->level_coeffs(level); + // printf("W_L=%i H_L=%i lev=%i\n", W_L, H_L, level); if (MaxP[level] > 0.f && mean[level] != 0.f && sigma[level] != 0.f) { float insigma = 0.666f; //SD float logmax = log(MaxP[level]); //log Max @@ -7524,7 +7671,6 @@ void ImProcFunctions::wavcontrast4(float ** tmp, float ** tmpa, float ** tmpb, f } else { absciss = amean * fabsf(val); } - float klev = 1.f; if (level >= level_hl && level <= level_hr) { @@ -9703,7 +9849,8 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o bool wavcurvecomp = false; bool loccomprewavutili = false; bool wavcurvecompre = false; - 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, dummy, loccomprewavutili, wavcurvecompre, 1.f, 1.f, maxlvl, 0.f, 0.f, 1.f, 1.f, false, false, false, false, false, 0.f, 0.f); + bool wavcurve = false; + wavcontrast4(lp, 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, wavcurve, dummy, loclevwavutili, wavcurvelev, dummy, locconwavutili, wavcurvecon, dummy, loccompwavutili, wavcurvecomp, dummy, loccomprewavutili, wavcurvecompre, 1.f, 1.f, maxlvl, 0.f, 0.f, 1.f, 1.f, false, false, false, false, false, 0.f, 0.f); } int shado = params->locallab.spots.at(sp).shadmaskbl; @@ -11628,10 +11775,11 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o while ((1 << maxlevelspot) >= (minwin * sk) && maxlevelspot > 1) { --maxlevelspot ; } + // printf("minwin=%i maxlevelavant=%i maxlespot=%i\n", minwin, wavelet_level, maxlevelspot); wavelet_level = min(wavelet_level, maxlevelspot); - // printf("maxlevel=%i\n", wavelet_level); + // printf("maxlevel=%i\n", wavelet_level); bool exec = false; bool origlc = params->locallab.spots.at(sp).origlc; @@ -11662,7 +11810,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o const float compress = params->locallab.spots.at(sp).residcomp; const float thres = params->locallab.spots.at(sp).threswav; - 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, loccomprewavCurve, loccomprewavutili, wavcurvecompre, sigma, offs, maxlvl, fatdet, fatanch, chrol, chrobl, blurlc, blurena, levelena, comprena, compreena, compress, thres); + wavcontrast4(lp, 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, wavcurve, loclevwavCurve, loclevwavutili, wavcurvelev, locconwavCurve, locconwavutili, wavcurvecon, loccompwavCurve, loccompwavutili, wavcurvecomp, loccomprewavCurve, loccomprewavutili, wavcurvecompre, sigma, offs, maxlvl, fatdet, fatanch, chrol, chrobl, blurlc, blurena, levelena, comprena, compreena, compress, thres); const float satur = params->locallab.spots.at(sp).residchro; @@ -13096,12 +13244,13 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o ImProcFunctions::shadowsHighlights(bufexpfin.get(), true, 1, 0, lp.shadex, 40, sk, 0, lp.shcomp); } } -/* - //cat02 - if (params->locallab.spots.at(sp).warm != 0) { - ImProcFunctions::ciecamloc_02float(sp, bufexpfin.get()); - } -*/ + + /* + //cat02 + if (params->locallab.spots.at(sp).warm != 0) { + ImProcFunctions::ciecamloc_02float(sp, bufexpfin.get()); + } + */ /* constexpr float ampli = 70.f; float ch = 0.f; diff --git a/rtengine/procevents.h b/rtengine/procevents.h index d3009d9c7..a90305c1e 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -914,6 +914,9 @@ enum ProcEventCode { EvlocallabwavCurvecompre = 885, Evlocallabresidcomp = 886, Evlocallabthreswav = 887, + Evlocallabstrwav = 888, + Evlocallabangwav = 889, + Evlocallabwavgradl = 890, NUMOFEVENTS }; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index b722ccaba..c458df2cd 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2739,12 +2739,15 @@ LocallabParams::LocallabSpot::LocallabSpot() : clarilres(0.0), claricres(0.0), clarisoft(1.0), + strwav(0.0), + angwav(0.0), sensilc(30), fftwlc(false), blurlc(true), wavblur(false), wavcont(false), wavcomp(false), + wavgradl(false), wavcompre(false), origlc(false), localcontMethod("loc"), @@ -3154,12 +3157,15 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && clarilres == other.clarilres && claricres == other.claricres && clarisoft == other.clarisoft + && strwav == other.strwav + && angwav == other.angwav && sensilc == other.sensilc && fftwlc == other.fftwlc && blurlc == other.blurlc && wavblur == other.wavblur && wavcont == other.wavcont && wavcomp == other.wavcomp + && wavgradl == other.wavgradl && wavcompre == other.wavcompre && origlc == other.origlc && localcontMethod == other.localcontMethod @@ -4549,12 +4555,15 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->locallab.spots.at(i).clarilres, "Locallab", "ClariLres_" + std::to_string(i), spot.clarilres, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).claricres, "Locallab", "ClariCres_" + std::to_string(i), spot.claricres, keyFile); 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).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); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).wavblur, "Locallab", "Wavblur_" + std::to_string(i), spot.wavblur, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).wavcont, "Locallab", "Wavcont_" + std::to_string(i), spot.wavcont, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).wavcomp, "Locallab", "Wavcomp_" + std::to_string(i), spot.wavcomp, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).wavgradl, "Locallab", "Wavgradl_" + std::to_string(i), spot.wavgradl, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).wavcompre, "Locallab", "Wavcompre_" + std::to_string(i), spot.wavcompre, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).origlc, "Locallab", "Origlc_" + std::to_string(i), spot.origlc, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).localcontMethod, "Locallab", "localcontMethod_" + std::to_string(i), spot.localcontMethod, keyFile); @@ -6099,12 +6108,15 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "ClariLres_" + std::to_string(i), pedited, spot.clarilres, spotEdited.clarilres); assignFromKeyfile(keyFile, "Locallab", "ClariCres_" + std::to_string(i), pedited, spot.claricres, spotEdited.claricres); 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", "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); assignFromKeyfile(keyFile, "Locallab", "Wavblur_" + std::to_string(i), pedited, spot.wavblur, spotEdited.wavblur); assignFromKeyfile(keyFile, "Locallab", "Wavcont_" + std::to_string(i), pedited, spot.wavcont, spotEdited.wavcont); assignFromKeyfile(keyFile, "Locallab", "Wavcomp_" + std::to_string(i), pedited, spot.wavcomp, spotEdited.wavcomp); + assignFromKeyfile(keyFile, "Locallab", "Wavgradl_" + std::to_string(i), pedited, spot.wavgradl, spotEdited.wavgradl); assignFromKeyfile(keyFile, "Locallab", "Wavcompre_" + std::to_string(i), pedited, spot.wavcompre, spotEdited.wavcompre); assignFromKeyfile(keyFile, "Locallab", "Origlc_" + std::to_string(i), pedited, spot.origlc, spotEdited.origlc); assignFromKeyfile(keyFile, "Locallab", "localcontMethod_" + std::to_string(i), pedited, spot.localcontMethod, spotEdited.localcontMethod); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 3a50632a1..dcc90bcee 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -1282,12 +1282,15 @@ struct LocallabParams { double clarilres; double claricres; double clarisoft; + double strwav; + double angwav; int sensilc; bool fftwlc; bool blurlc; bool wavblur; bool wavcont; bool wavcomp; + bool wavgradl; bool wavcompre; bool origlc; Glib::ustring localcontMethod; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 30fa164af..8bc79385d 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -917,7 +917,10 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, //Evlocallabwavcompre LUMINANCECURVE, //EvlocallabwavCurvecompre LUMINANCECURVE, //Evlocallabresidcomp - LUMINANCECURVE //Evlocallabthreswav + LUMINANCECURVE, //Evlocallabthreswav + LUMINANCECURVE, //Evlocallabstrwav + LUMINANCECURVE, //Evlocallabangwav + LUMINANCECURVE //Evlocallabwavgradl }; diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index 2ccee4df8..fe8d94554 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -591,6 +591,8 @@ fatres(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATRES"), 0., 100., 1., 0.))), blendmasklc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))), radmasklc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), -10.0, 1000.0, 0.1, 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.))), multiplier( [this]() -> std::array { @@ -697,6 +699,7 @@ wavblur(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_BLURLEVELFRA")))), wavcont(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_CONTFRA")))), wavcomp(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_COMPFRA")))), wavcompre(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_COMPREFRA")))), +wavgradl(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_GRALWFRA")))), //CBDL enacbMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), //encoding log @@ -775,6 +778,7 @@ retiFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_RETIFRA")))), 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")))), +gradwavFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_GRADWAVFRA")))), 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")))), @@ -2853,6 +2857,7 @@ pe(nullptr) wavcontConn = wavcont->signal_toggled().connect(sigc::mem_fun(*this, &Locallab::wavcontChanged)); wavcompConn = wavcomp->signal_toggled().connect(sigc::mem_fun(*this, &Locallab::wavcompChanged)); wavcompreConn = wavcompre->signal_toggled().connect(sigc::mem_fun(*this, &Locallab::wavcompreChanged)); + wavgradlConn = wavgradl->signal_toggled().connect(sigc::mem_fun(*this, &Locallab::wavgradlChanged)); origlcConn = origlc->signal_toggled().connect(sigc::mem_fun(*this, &Locallab::origlcChanged)); csThreshold->setAdjusterListener(this); @@ -2969,6 +2974,8 @@ pe(nullptr) radmasklc->setLogScale(10, -10); radmasklc->setAdjusterListener(this); chromasklc->setAdjusterListener(this); + strwav->setAdjusterListener(this); + angwav->setAdjusterListener(this); @@ -2981,6 +2988,13 @@ pe(nullptr) clariFrame->add(*clariBox); + gradwavFrame->set_label_align(0.025, 0.5); + wavgradl->set_active (false); + gradwavFrame->set_label_widget(*wavgradl); + ToolParamBlock* const gradwavBox = Gtk::manage(new ToolParamBlock()); + gradwavBox->pack_start(*strwav); + gradwavBox->pack_start(*angwav); + gradwavFrame->add(*gradwavBox); Gtk::HSeparator* const separatorblu = Gtk::manage(new Gtk::HSeparator()); @@ -3056,6 +3070,7 @@ pe(nullptr) expcontrastpyr->setLevel(2); ToolParamBlock* const blurcontBox = Gtk::manage(new ToolParamBlock()); blurcontBox->pack_start(*clariFrame); + blurcontBox->pack_start(*gradwavFrame); blurcontBox->pack_start(*contFrame); blurcontBox->pack_start(*compreFrame); if (complexsoft < 2) { @@ -5361,7 +5376,10 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pp->locallab.spots.at(pp->locallab.selspot).wavcont = wavcont->get_active(); pp->locallab.spots.at(pp->locallab.selspot).wavcomp = wavcomp->get_active(); pp->locallab.spots.at(pp->locallab.selspot).wavcompre = wavcompre->get_active(); + pp->locallab.spots.at(pp->locallab.selspot).wavgradl = wavgradl->get_active(); pp->locallab.spots.at(pp->locallab.selspot).origlc = origlc->get_active(); + pp->locallab.spots.at(pp->locallab.selspot).strwav = strwav->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).angwav = angwav->getValue(); pp->locallab.spots.at(pp->locallab.selspot).locwavcurve = wavshape->getCurve(); pp->locallab.spots.at(pp->locallab.selspot).csthreshold = csThreshold->getValue(); pp->locallab.spots.at(pp->locallab.selspot).loclevwavcurve = wavshapelev->getCurve(); @@ -5772,12 +5790,15 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pe->locallab.spots.at(pp->locallab.selspot).clarilres = pe->locallab.spots.at(pp->locallab.selspot).clarilres || clarilres->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).claricres = pe->locallab.spots.at(pp->locallab.selspot).claricres || claricres->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).clarisoft = pe->locallab.spots.at(pp->locallab.selspot).clarisoft || clarisoft->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).strwav = pe->locallab.spots.at(pp->locallab.selspot).strwav || strwav->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).angwav = pe->locallab.spots.at(pp->locallab.selspot).angwav || angwav->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).sensilc = pe->locallab.spots.at(pp->locallab.selspot).sensilc || sensilc->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).fftwlc = pe->locallab.spots.at(pp->locallab.selspot).fftwlc || !fftwlc->get_inconsistent(); pe->locallab.spots.at(pp->locallab.selspot).blurlc = pe->locallab.spots.at(pp->locallab.selspot).blurlc || !blurlc->get_inconsistent(); pe->locallab.spots.at(pp->locallab.selspot).wavblur = pe->locallab.spots.at(pp->locallab.selspot).wavblur || !wavblur->get_inconsistent(); pe->locallab.spots.at(pp->locallab.selspot).wavcont = pe->locallab.spots.at(pp->locallab.selspot).wavcont || !wavcont->get_inconsistent(); pe->locallab.spots.at(pp->locallab.selspot).wavcomp = pe->locallab.spots.at(pp->locallab.selspot).wavcomp || !wavcomp->get_inconsistent(); + pe->locallab.spots.at(pp->locallab.selspot).wavgradl = pe->locallab.spots.at(pp->locallab.selspot).wavgradl || !wavgradl->get_inconsistent(); pe->locallab.spots.at(pp->locallab.selspot).wavcompre = pe->locallab.spots.at(pp->locallab.selspot).wavcompre || !wavcompre->get_inconsistent(); pe->locallab.spots.at(pp->locallab.selspot).origlc = pe->locallab.spots.at(pp->locallab.selspot).origlc || !origlc->get_inconsistent(); pe->locallab.spots.at(pp->locallab.selspot).localcontMethod = pe->locallab.spots.at(pp->locallab.selspot).localcontMethod || localcontMethod->get_active_text() != M("GENERAL_UNCHANGED"); @@ -6189,12 +6210,15 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pedited->locallab.spots.at(pp->locallab.selspot).clarilres = pedited->locallab.spots.at(pp->locallab.selspot).clarilres || clarilres->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).claricres = pedited->locallab.spots.at(pp->locallab.selspot).claricres || claricres->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).clarisoft = pedited->locallab.spots.at(pp->locallab.selspot).clarisoft || clarisoft->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).strwav = pedited->locallab.spots.at(pp->locallab.selspot).strwav || strwav->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).angwav = pedited->locallab.spots.at(pp->locallab.selspot).angwav || angwav->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).sensilc = pedited->locallab.spots.at(pp->locallab.selspot).sensilc || sensilc->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).fftwlc = pedited->locallab.spots.at(pp->locallab.selspot).fftwlc || !fftwlc->get_inconsistent(); pedited->locallab.spots.at(pp->locallab.selspot).blurlc = pedited->locallab.spots.at(pp->locallab.selspot).blurlc || !blurlc->get_inconsistent(); pedited->locallab.spots.at(pp->locallab.selspot).wavblur = pedited->locallab.spots.at(pp->locallab.selspot).wavblur || !wavblur->get_inconsistent(); pedited->locallab.spots.at(pp->locallab.selspot).wavcont = pedited->locallab.spots.at(pp->locallab.selspot).wavcont || !wavcont->get_inconsistent(); pedited->locallab.spots.at(pp->locallab.selspot).wavcomp = pedited->locallab.spots.at(pp->locallab.selspot).wavcomp || !wavcomp->get_inconsistent(); + pedited->locallab.spots.at(pp->locallab.selspot).wavgradl = pedited->locallab.spots.at(pp->locallab.selspot).wavgradl || !wavgradl->get_inconsistent(); pedited->locallab.spots.at(pp->locallab.selspot).wavcompre = pedited->locallab.spots.at(pp->locallab.selspot).wavcompre || !wavcompre->get_inconsistent(); pedited->locallab.spots.at(pp->locallab.selspot).origlc = pedited->locallab.spots.at(pp->locallab.selspot).origlc || !origlc->get_inconsistent(); pedited->locallab.spots.at(pp->locallab.selspot).locwavcurve = pedited->locallab.spots.at(pp->locallab.selspot).locwavcurve || !wavshape->isUnChanged(); @@ -6796,6 +6820,8 @@ void Locallab::localcontMethodChanged() blurlc->show(); wavblur->show(); origlc->hide(); + strwav->hide(); + angwav->hide(); } else if (localcontMethod->get_active_row_number() == 1) { levelwav->show(); residcont->show(); @@ -6829,6 +6855,8 @@ void Locallab::localcontMethodChanged() blurlc->show(); wavblur->show(); origlc->show(); + strwav->show(); + angwav->show(); } // printf("localcontMethodChanged\n"); @@ -8447,6 +8475,29 @@ void Locallab::wavcompChanged() } } +void Locallab::wavgradlChanged() +{ + + if (multiImage) { + if (wavgradl->get_inconsistent()) { + wavgradl->set_inconsistent(false); + wavgradlConn.block(true); + wavgradl->set_active(false); + wavgradlConn.block(false); + } + } + + if (getEnabled() && expcontrast->getEnabled()) { + if (listener) { + if (wavgradl->get_active()) { + listener->panelChanged(Evlocallabwavgradl, M("GENERAL_ENABLED")); + } else { + listener->panelChanged(Evlocallabwavgradl, M("GENERAL_DISABLED")); + } + } + } +} + void Locallab::wavcompreChanged() { @@ -8986,6 +9037,8 @@ void Locallab::setDefaults(const rtengine::procparams::ProcParams * defParams, c clarilres->setDefault(defSpot->clarilres); claricres->setDefault(defSpot->claricres); clarisoft->setDefault(defSpot->clarisoft); + strwav->setDefault(defSpot->strwav); + angwav->setDefault(defSpot->angwav); sensilc->setDefault((double)defSpot->sensilc); csThreshold->setDefault(defSpot->csthreshold); blendmasklc->setDefault((double)defSpot->blendmasklc); @@ -9230,6 +9283,8 @@ void Locallab::setDefaults(const rtengine::procparams::ProcParams * defParams, c clarilres->setDefaultEditedState(Irrelevant); claricres->setDefaultEditedState(Irrelevant); clarisoft->setDefaultEditedState(Irrelevant); + strwav->setDefaultEditedState(Irrelevant); + angwav->setDefaultEditedState(Irrelevant); sensilc->setDefaultEditedState(Irrelevant); csThreshold->setDefaultEditedState(Irrelevant); blendmasklc->setDefaultEditedState(Irrelevant); @@ -9479,6 +9534,8 @@ void Locallab::setDefaults(const rtengine::procparams::ProcParams * defParams, c clarilres->setDefaultEditedState(defSpotState->clarilres ? Edited : UnEdited); claricres->setDefaultEditedState(defSpotState->claricres ? Edited : UnEdited); clarisoft->setDefaultEditedState(defSpotState->clarisoft ? Edited : UnEdited); + strwav->setDefaultEditedState(defSpotState->strwav ? Edited : UnEdited); + angwav->setDefaultEditedState(defSpotState->angwav ? Edited : UnEdited); sensilc->setDefaultEditedState(defSpotState->sensilc ? Edited : UnEdited); csThreshold->setDefaultEditedState(defSpotState->csthreshold ? Edited : UnEdited); blendmasklc->setDefaultEditedState(defSpotState->blendmasklc ? Edited : UnEdited); @@ -10717,6 +10774,18 @@ void Locallab::adjusterChanged(Adjuster * a, double newval) } } + if (a == strwav) { + if (listener) { + listener->panelChanged(Evlocallabstrwav, strwav->getTextValue()); + } + } + + if (a == angwav) { + if (listener) { + listener->panelChanged(Evlocallabangwav, angwav->getTextValue()); + } + } + if (a == sensilc) { if (listener) { listener->panelChanged(Evlocallabsensilc, sensilc->getTextValue()); @@ -11201,6 +11270,8 @@ void Locallab::setBatchMode(bool batchMode) clarilres->showEditedCB(); claricres->showEditedCB(); clarisoft->showEditedCB(); + strwav->showEditedCB(); + angwav->showEditedCB(); csThreshold->showEditedCB(); sensilc->showEditedCB(); blendmasklc->showEditedCB(); @@ -11502,6 +11573,7 @@ void Locallab::enableListener() wavblurConn.block(false); wavcontConn.block(false); wavcompConn.block(false); + wavgradlConn.block(false); wavcompreConn.block(false); origlcConn.block(false); showmasklcMethodConn.block(false); @@ -11604,6 +11676,7 @@ void Locallab::disableListener() wavblurConn.block(true); wavcontConn.block(true); wavcompConn.block(true); + wavgradlConn.block(true); wavcompreConn.block(true); origlcConn.block(true); showmasklcMethodConn.block(true); @@ -12276,12 +12349,15 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con clarilres->setValue(pp->locallab.spots.at(index).clarilres); claricres->setValue(pp->locallab.spots.at(index).claricres); clarisoft->setValue(pp->locallab.spots.at(index).clarisoft); + strwav->setValue(pp->locallab.spots.at(index).strwav); + angwav->setValue(pp->locallab.spots.at(index).angwav); sensilc->setValue(pp->locallab.spots.at(index).sensilc); fftwlc->set_active(pp->locallab.spots.at(index).fftwlc); blurlc->set_active(pp->locallab.spots.at(index).blurlc); wavblur->set_active(pp->locallab.spots.at(index).wavblur); wavcont->set_active(pp->locallab.spots.at(index).wavcont); wavcomp->set_active(pp->locallab.spots.at(index).wavcomp); + wavgradl->set_active(pp->locallab.spots.at(index).wavgradl); 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); @@ -12799,12 +12875,15 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con clarilres->setEditedState(spotState->clarilres ? Edited : UnEdited); claricres->setEditedState(spotState->claricres ? Edited : UnEdited); clarisoft->setEditedState(spotState->clarisoft ? Edited : UnEdited); + strwav->setEditedState(spotState->strwav ? Edited : UnEdited); + angwav->setEditedState(spotState->angwav ? Edited : UnEdited); sensilc->setEditedState(spotState->sensilc ? Edited : UnEdited); fftwlc->set_inconsistent(multiImage && !spotState->fftwlc); blurlc->set_inconsistent(multiImage && !spotState->blurlc); wavblur->set_inconsistent(multiImage && !spotState->wavblur); wavcont->set_inconsistent(multiImage && !spotState->wavcont); wavcomp->set_inconsistent(multiImage && !spotState->wavcomp); + wavgradl->set_inconsistent(multiImage && !spotState->wavgradl); wavcompre->set_inconsistent(multiImage && !spotState->wavcompre); origlc->set_inconsistent(multiImage && !spotState->origlc); wavshape->setUnChanged(!spotState->locwavcurve); @@ -13332,6 +13411,8 @@ void Locallab::updateSpecificGUIState() clarilres->hide(); claricres->hide(); clarisoft->hide(); + strwav->hide(); + angwav->hide(); clariFrame->hide(); csThreshold->hide(); lcradius->show(); @@ -13365,6 +13446,8 @@ void Locallab::updateSpecificGUIState() clarilres->show(); claricres->show(); clarisoft->show(); + strwav->show(); + angwav->show(); clariFrame->show(); csThreshold->show(); lcradius->hide(); diff --git a/rtgui/locallab.h b/rtgui/locallab.h index f9b40ba8b..f608ca39f 100644 --- a/rtgui/locallab.h +++ b/rtgui/locallab.h @@ -384,6 +384,8 @@ private: Adjuster* const blendmasklc; Adjuster* const radmasklc; Adjuster* const chromasklc; + Adjuster* const strwav; + Adjuster* const angwav; // Contrast by detail levels const std::array multiplier; Adjuster* const chromacbdl; @@ -503,6 +505,8 @@ private: sigc::connection wavcompConn; Gtk::CheckButton* const wavcompre; sigc::connection wavcompreConn; + Gtk::CheckButton* const wavgradl; + sigc::connection wavgradlConn; //CBDL Gtk::CheckButton* const enacbMask; @@ -616,6 +620,7 @@ private: Gtk::Frame* const retitoolFrame; Gtk::Frame* const residFrame; Gtk::Frame* const clariFrame; + Gtk::Frame* const gradwavFrame; Gtk::Frame* const blurlevelFrame; Gtk::Frame* const contFrame; Gtk::Frame* const compFrame; @@ -714,6 +719,7 @@ private: void wavcontChanged(); void wavcompChanged(); void wavcompreChanged(); + void wavgradlChanged(); //CBDL void enacbMaskChanged(); // ComboBox event functions diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index a598e47ea..9fd02bca9 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -1276,12 +1276,15 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).clarilres = locallab.spots.at(j).clarilres && pSpot.clarilres == otherSpot.clarilres; locallab.spots.at(j).claricres = locallab.spots.at(j).claricres && pSpot.claricres == otherSpot.claricres; 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).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; locallab.spots.at(j).wavblur = locallab.spots.at(j).wavblur && pSpot.wavblur == otherSpot.wavblur; locallab.spots.at(j).wavcont = locallab.spots.at(j).wavcont && pSpot.wavcont == otherSpot.wavcont; locallab.spots.at(j).wavcomp = locallab.spots.at(j).wavcomp && pSpot.wavcomp == otherSpot.wavcomp; + locallab.spots.at(j).wavgradl = locallab.spots.at(j).wavgradl && pSpot.wavgradl == otherSpot.wavgradl; locallab.spots.at(j).wavcompre = locallab.spots.at(j).wavcompre && pSpot.wavcompre == otherSpot.wavcompre; locallab.spots.at(j).origlc = locallab.spots.at(j).origlc && pSpot.origlc == otherSpot.origlc; locallab.spots.at(j).localcontMethod = locallab.spots.at(j).localcontMethod && pSpot.localcontMethod == otherSpot.localcontMethod; @@ -4086,6 +4089,14 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).clarisoft = mods.locallab.spots.at(i).clarisoft; } + if (locallab.spots.at(i).strwav) { + toEdit.locallab.spots.at(i).strwav = mods.locallab.spots.at(i).strwav; + } + + if (locallab.spots.at(i).angwav) { + toEdit.locallab.spots.at(i).angwav = mods.locallab.spots.at(i).angwav; + } + if (locallab.spots.at(i).sensilc) { toEdit.locallab.spots.at(i).sensilc = mods.locallab.spots.at(i).sensilc; } @@ -4110,6 +4121,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).wavcomp = mods.locallab.spots.at(i).wavcomp; } + if (locallab.spots.at(i).wavgradl) { + toEdit.locallab.spots.at(i).wavgradl = mods.locallab.spots.at(i).wavgradl; + } + if (locallab.spots.at(i).wavcompre) { toEdit.locallab.spots.at(i).wavcompre = mods.locallab.spots.at(i).wavcompre; } @@ -5664,12 +5679,15 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : clarilres(v), claricres(v), clarisoft(v), + strwav(v), + angwav(v), sensilc(v), fftwlc(v), blurlc(v), wavblur(v), wavcont(v), wavcomp(v), + wavgradl(v), wavcompre(v), origlc(v), localcontMethod(v), @@ -6069,12 +6087,15 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) clarilres = v; claricres = v; clarisoft = v; + strwav = v; + angwav = v; sensilc = v; fftwlc = v; blurlc = v; wavblur = v; wavcont = v; wavcomp = v; + wavgradl = v; wavcompre = v; origlc = v; localcontMethod = v; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 5470f4b9c..1c6d6f23c 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -708,12 +708,15 @@ public: bool clarilres; bool claricres; bool clarisoft; + bool strwav; + bool angwav; bool sensilc; bool fftwlc; bool blurlc; bool wavblur; bool wavcont; bool wavcomp; + bool wavgradl; bool wavcompre; bool origlc; bool localcontMethod;