From f22482c204f6f2bb9757fdb084ea444a89e23e1b Mon Sep 17 00:00:00 2001 From: Desmis Date: Tue, 4 May 2021 07:27:55 +0200 Subject: [PATCH] Local adjustments - Strength control on Spot - tools - issue 6221 (#6223) * Add strength to local contrast and wavelet * Added strength to Color and Light * Added strength to Denoise * Added strength to shadows highlight Tone equalizer * Added strength to Dynamic Range and exposure * Added strength to Tone mapping * Small improvment to Dynamic Range --- rtdata/languages/default | 12 ++++ rtengine/iplocallab.cc | 133 +++++++++++++++++++++++++++++++++++---- rtengine/procevents.h | 6 ++ rtengine/procparams.cc | 26 +++++++- rtengine/procparams.h | 6 ++ rtengine/refreshmap.cc | 8 ++- rtgui/locallabtools.cc | 82 +++++++++++++++++++++--- rtgui/locallabtools.h | 6 ++ rtgui/locallabtools2.cc | 29 +++++++++ rtgui/paramsedited.cc | 45 ++++++++++++- rtgui/paramsedited.h | 6 ++ 11 files changed, 334 insertions(+), 25 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index 595f03e7e..ba2d13d4f 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1288,6 +1288,12 @@ HISTORY_MSG_1040;Local - Spot - soft radius HISTORY_MSG_1041;Local - Spot - Munsell HISTORY_MSG_1042;Local - Log encoding - threshold HISTORY_MSG_1043;Local - Exp - normalize +HISTORY_MSG_1044;Local - Local contrast strength +HISTORY_MSG_1045;Local - Color and Light strength +HISTORY_MSG_1046;Local - Denoise strength +HISTORY_MSG_1047;Local - SH and Tone Equalizer strength +HISTORY_MSG_1048;Local - DR and Exposure strength +HISTORY_MSG_1049;Local - TM strength HISTORY_MSG_BLSHAPE;Blur by level HISTORY_MSG_BLURCWAV;Blur chroma HISTORY_MSG_BLURWAV;Blur luminance @@ -2992,6 +2998,12 @@ TP_LOCALLAB_RECURS_TOOLTIP;Forces the algorithm to recalculate the references af TP_LOCALLAB_REFLABEL;Ref. (0..1) Chroma=%1 Luma=%2 Hue=%3 TP_LOCALLAB_REN_DIALOG_LAB;Enter the new Control Spot name TP_LOCALLAB_REN_DIALOG_NAME;Renaming Control Spot +TP_LOCALLAB_REPARW_TOOLTIP;Allows you to adjust the relative strength of the local contrast and wavelet image with respect to the original image. +TP_LOCALLAB_REPARCOL_TOOLTIP;Allows you to adjust the relative strength of the Color and Light image with respect to the original image. +TP_LOCALLAB_REPARDEN_TOOLTIP;Allows you to adjust the relative strength of the Denoise image with respect to the original image. +TP_LOCALLAB_REPARSH_TOOLTIP;Allows you to adjust the relative strength of the Shadows/Highlights and Tone Equalizer image with respect to the original image. +TP_LOCALLAB_REPAREXP_TOOLTIP;Allows you to adjust the relative strength of the Dynamic Range and Exposure image with respect to the original image. +TP_LOCALLAB_REPARTM_TOOLTIP;Allows you to adjust the relative strength of the Tone mapping image with respect to the original image. TP_LOCALLAB_RESETSHOW;Reset All Show Modifications TP_LOCALLAB_RESID;Residual Image TP_LOCALLAB_RESIDBLUR;Blur residual image diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 7ff84b632..11887b10c 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -439,6 +439,8 @@ struct local_params { float thr; float stru; int chro, cont, sens, sensh, senscb, sensbn, senstm, sensex, sensexclu, sensden, senslc, senssf, senshs, senscolor; + float reparden; + float repartm; float clarityml; float contresid; bool deltaem; @@ -1124,6 +1126,8 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall int local_noiselequal = locallab.spots.at(sp).noiselequal; float local_noisechrodetail = (float)locallab.spots.at(sp).noisechrodetail; int local_sensiden = locallab.spots.at(sp).sensiden; + float local_reparden = locallab.spots.at(sp).reparden; + float local_repartm = locallab.spots.at(sp).repartm; float local_detailthr = (float)locallab.spots.at(sp).detailthr; float local_recothr = (float)locallab.spots.at(sp).recothres; float local_lowthr = (float)locallab.spots.at(sp).lowthres; @@ -1582,6 +1586,8 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.noisecf = local_noisecf; lp.noisecc = local_noisecc; lp.sensden = local_sensiden; + lp.reparden = local_reparden; + lp.repartm = local_repartm; lp.bilat = locallab.spots.at(sp).bilateral; lp.nldet = locallab.spots.at(sp).nldet; lp.nlstr = locallab.spots.at(sp).nlstr; @@ -3263,6 +3269,11 @@ void ImProcFunctions::DeNoise_Local(int call, const struct local_params& lp, Lab difa = tmp1.a[loy - begy][lox - begx] - original->a[y][x]; difb = tmp1.b[loy - begy][lox - begx] - original->b[y][x]; } else { //dcrop + const float repart = 1.0f - 0.01f * lp.reparden; + tmp1.L[y][x] = intp(repart, original->L[y][x], tmp1.L[y][x]); + tmp1.a[y][x] = intp(repart, original->a[y][x], tmp1.a[y][x]); + tmp1.b[y][x] = intp(repart, original->b[y][x], tmp1.b[y][x]); + difL = tmp1.L[y][x] - original->L[y][x]; difa = tmp1.a[y][x] - original->a[y][x]; difb = tmp1.b[y][x] - original->b[y][x]; @@ -3409,16 +3420,14 @@ void ImProcFunctions::DeNoise_Local2(const struct local_params& lp, LabImage* or float difL, difa, difb; - // if (call == 2 /*|| call == 1 || call == 3 */) { //simpleprocess - // difL = tmp1.L[loy - begy][lox - begx] - original->L[y][x]; - // difa = tmp1.a[loy - begy][lox - begx] - original->a[y][x]; - // difb = tmp1.b[loy - begy][lox - begx] - original->b[y][x]; - // } else { //dcrop + const float repart = 1.0f - 0.01f * lp.reparden; + tmp1.L[y-ystart][x-xstart] = intp(repart, original->L[y][x], tmp1.L[y-ystart][x-xstart]); + tmp1.a[y-ystart][x-xstart] = intp(repart, original->a[y][x], tmp1.a[y-ystart][x-xstart]); + tmp1.b[y-ystart][x-xstart] = intp(repart, original->b[y][x], tmp1.b[y-ystart][x-xstart]); - difL = tmp1.L[y-ystart][x-xstart] - original->L[y][x]; - difa = tmp1.a[y-ystart][x-xstart] - original->a[y][x]; - difb = tmp1.b[y-ystart][x-xstart] - original->b[y][x]; - // } + difL = tmp1.L[y-ystart][x-xstart] - original->L[y][x]; + difa = tmp1.a[y-ystart][x-xstart] - original->a[y][x]; + difb = tmp1.b[y-ystart][x-xstart] - original->b[y][x]; difL *= localFactor * reducdEL; difa *= localFactor * reducdEa; @@ -6937,6 +6946,8 @@ void ImProcFunctions::transit_shapedetect2(int sp, float meantm, float stdtm, in } } + + if (lp.equtm && senstype == 8) { //normalize luminance for Tone mapping , at this place we can use for others senstype! float *datain = new float[bfh * bfw]; float *data = new float[bfh * bfw]; @@ -6976,6 +6987,24 @@ void ImProcFunctions::transit_shapedetect2(int sp, float meantm, float stdtm, in delete [] data; } + + if (senstype == 8) {//strength Tone mapping + const float repart = 1.0f - 0.01f * lp.repartm; + +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if(multiThread) +#endif + + for (int y = ystart; y < yend; y++){ + for (int x = xstart; x < xend; x++) { + bufexpfin->L[y - ystart][x - xstart]= intp(repart, original->L[y][x], bufexpfin->L[y - ystart][x - xstart]); + bufexpfin->a[y - ystart][x - xstart]= intp(repart, original->a[y][x], bufexpfin->a[y - ystart][x - xstart]); + bufexpfin->b[y - ystart][x - xstart]= intp(repart, original->b[y][x], bufexpfin->b[y - ystart][x - xstart]); + } + } + } + + #ifdef _OPENMP #pragma omp parallel if (multiThread) #endif @@ -7078,6 +7107,7 @@ void ImProcFunctions::transit_shapedetect2(int sp, float meantm, float stdtm, in } } + //deltaE float abdelta2 = SQR(refa - maskptr->a[y][x]) + SQR(refb - maskptr->b[y][x]); float chrodelta2 = SQR(std::sqrt(SQR(maskptr->a[y][x]) + SQR(maskptr->b[y][x])) - (chromaref * 327.68f)); @@ -12567,6 +12597,8 @@ void ImProcFunctions::Lab_Local( } // transit_shapedetect_retinex(call, 4, bufgb.get(),bufmaskorigtm.get(), originalmasktm.get(), buflight, bufchro, hueref, chromaref, lumaref, lp, original, transformed, cx, cy, sk); + + transit_shapedetect2(sp, meantm, stdtm, call, 8, bufgb.get(), tmp1.get(), originalmasktm.get(), hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk); // transit_shapedetect(8, tmp1.get(), originalmasktm.get(), bufchro, false, hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk); @@ -13942,6 +13974,21 @@ void ImProcFunctions::Lab_Local( maskrecov(bufexpfin.get(), original, bufmaskorigSH.get(), bfh, bfw, ystart, xstart, hig, low, recoth, decay, invmask, sk, multiThread); } + const float repart = 1.0 - 0.01 * params->locallab.spots.at(sp).reparsh; + int bw = bufexporig->W; + int bh = bufexporig->H; + +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if(multiThread) +#endif + for (int x = 0; x < bh; x++) { + for (int y = 0; y < bw; y++) { + bufexpfin->L[x][y] = intp(repart, bufexporig->L[x][y], bufexpfin->L[x][y]); + bufexpfin->a[x][y] = intp(repart, bufexporig->a[x][y], bufexpfin->a[x][y]); + bufexpfin->b[x][y] = intp(repart, bufexporig->b[x][y], bufexpfin->b[x][y]); + } + } + transit_shapedetect2(sp, 0.f, 0.f, call, 9, bufexporig.get(), bufexpfin.get(), originalmaskSH.get(), hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk); if (lp.recur) { @@ -14567,6 +14614,20 @@ void ImProcFunctions::Lab_Local( bool invmask = false; maskrecov(tmp1.get(), original, bufmaskoriglc.get(), bfh, bfw, ystart, xstart, hig, low, recoth, decay, invmask, sk, multiThread); } + const float repart = 1.0 - 0.01 * params->locallab.spots.at(sp).reparw; + int bw = bufgb->W; + int bh = bufgb->H; + +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if(multiThread) +#endif + for (int x = 0; x < bh; x++) { + for (int y = 0; y < bw; y++) { + tmp1->L[x][y] = intp(repart, bufgb->L[x][y], tmp1->L[x][y]); + tmp1->a[x][y] = intp(repart, bufgb->a[x][y], tmp1->a[x][y]); + tmp1->b[x][y] = intp(repart, bufgb->b[x][y], tmp1->b[x][y]); + } + } transit_shapedetect2(sp, 0.f, 0.f, call, 10, bufgb.get(), tmp1.get(), originalmasklc.get(), hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk); tmp1.reset(); @@ -14865,12 +14926,16 @@ void ImProcFunctions::Lab_Local( fatParams.enabled = true; fatParams.threshold = params->locallab.spots.at(sp).fatdetail; fatParams.amount = params->locallab.spots.at(sp).fatamount; - fatParams.anchor = 50.f; //params->locallab.spots.at(sp).fatanchor; + fatParams.anchor = params->locallab.spots.at(sp).fatanchor; //const float sigm = 1.f; //params->locallab.spots.at(sp).fatlevel; //const float mean = 1.f;// params->locallab.spots.at(sp).fatanchor; const std::unique_ptr tmpImagefat(new Imagefloat(bfwr, bfhr)); lab2rgb(*bufexpfin, *(tmpImagefat.get()), params->icm.workingProfile); - ToneMapFattal02(tmpImagefat.get(), fatParams, 3, 0, nullptr, 0, 0, 1);//last parameter = 1 ==>ART algorithm + int alg = 0; + if(fatParams.anchor == 50.f) { + alg = 1; + } + ToneMapFattal02(tmpImagefat.get(), fatParams, 3, 0, nullptr, 0, 0, alg);//last parameter = 1 ==>ART algorithm rgb2lab(*(tmpImagefat.get()), *bufexpfin, params->icm.workingProfile); } @@ -14982,6 +15047,22 @@ void ImProcFunctions::Lab_Local( } float meansob = 0.f; + + const float repart = 1.0 - 0.01 * params->locallab.spots.at(sp).reparexp; + int bw = bufexporig->W; + int bh = bufexporig->H; + +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if(multiThread) +#endif + for (int x = 0; x < bh; x++) { + for (int y = 0; y < bw; y++) { + bufexpfin->L[x][y] = intp(repart, bufexporig->L[x][y], bufexpfin->L[x][y]); + bufexpfin->a[x][y] = intp(repart, bufexporig->a[x][y], bufexpfin->a[x][y]); + bufexpfin->b[x][y] = intp(repart, bufexporig->b[x][y], bufexpfin->b[x][y]); + } + } + transit_shapedetect2(sp, 0.f, 0.f, call, 1, bufexporig.get(), bufexpfin.get(), originalmaskexp.get(), hueref, chromaref, lumaref, sobelref, meansob, blend2, lp, original, transformed, cx, cy, sk); } @@ -16042,6 +16123,21 @@ void ImProcFunctions::Lab_Local( softproc(bufcolreserv.get(), bufcolfin.get(), lp.softradiuscol, bfh, bfw, 0.001, 0.00001, 0.5f, sk, multiThread, 1); } float meansob = 0.f; + const float repart = 1.0 - 0.01 * params->locallab.spots.at(sp).reparcol; + int bw = bufcolreserv->W; + int bh = bufcolreserv->H; + +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if(multiThread) +#endif + for (int x = 0; x < bh; x++) { + for (int y = 0; y < bw; y++) { + bufcolfin->L[x][y] = intp(repart, bufcolreserv->L[x][y], bufcolfin->L[x][y]); + bufcolfin->a[x][y] = intp(repart, bufcolreserv->a[x][y], bufcolfin->a[x][y]); + bufcolfin->b[x][y] = intp(repart, bufcolreserv->b[x][y], bufcolfin->b[x][y]); + } + } + transit_shapedetect2(sp, 0.f, 0.f, call, 0, bufcolreserv.get(), bufcolfin.get(), originalmaskcol.get(), hueref, chromaref, lumaref, sobelref, meansob, blend2, lp, original, transformed, cx, cy, sk); } @@ -16124,6 +16220,21 @@ void ImProcFunctions::Lab_Local( bool invmask = false; maskrecov(bufcolfin.get(), original, bufmaskblurcol.get(), bfh, bfw, ystart, xstart, hig, low, recoth, decay, invmask, sk, multiThread); } + const float repart = 1.0 - 0.01 * params->locallab.spots.at(sp).reparcol; + int bw = bufcolorig->W; + int bh = bufcolorig->H; + +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if(multiThread) +#endif + for (int x = 0; x < bh; x++) { + for (int y = 0; y < bw; y++) { + bufcolfin->L[x][y] = intp(repart, bufcolorig->L[x][y], bufcolfin->L[x][y]); + bufcolfin->a[x][y] = intp(repart, bufcolorig->a[x][y], bufcolfin->a[x][y]); + bufcolfin->b[x][y] = intp(repart, bufcolorig->b[x][y], bufcolfin->b[x][y]); + } + } + float meansob = 0.f; transit_shapedetect2(sp, 0.f, 0.f, call, 0, bufcolorig.get(), bufcolfin.get(), originalmaskcol.get(), hueref, chromaref, lumaref, sobelref, meansob, blend2, lp, original, transformed, cx, cy, sk); } diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 863fbd6e2..890f3bf4a 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -1066,6 +1066,12 @@ enum ProcEventCode { EvLocallabSpotavoidmun = 1040, Evlocallabcontthres = 1041, Evlocallabnorm = 1042, + Evlocallabreparw = 1043, + Evlocallabreparcol = 1044, + Evlocallabreparden = 1045, + Evlocallabreparsh = 1046, + Evlocallabreparexp = 1047, + Evlocallabrepartm = 1048, NUMOFEVENTS }; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 9b371a1c8..e01247471 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2795,6 +2795,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : complexcolor(2), curvactiv(false), lightness(0), + reparcol(100.), contrast(0), chroma(0), labgridALow(0.0), @@ -3127,12 +3128,13 @@ LocallabParams::LocallabSpot::LocallabSpot() : expMethod("std"), exnoiseMethod("none"), laplacexp(0.0), + reparexp(100.0), balanexp(1.0), linear(0.05), gamm(0.4), fatamount(1.0), fatdetail(40.0), - fatanchor(1.0), + fatanchor(50.0), fatlevel(1.), recothrese(1.), lowthrese(12.), @@ -3207,6 +3209,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : slomaskSH(0.0), lapmaskSH(0.0), detailSH(0), + reparsh(100.), LmaskSHcurve{ static_cast(DCT_NURBS), 0.0, @@ -3365,6 +3368,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : nlrad(5), nlgam(3.), sensiden(60), + reparden(100.), detailthr(50), locwavcurveden{ static_cast(FCT_MinMaxCPoints), @@ -3494,6 +3498,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : gamma(1.0), estop(1.4), scaltm(1.0), + repartm(100.0), rewei(0), satur(0.), sensitm(60), @@ -3739,6 +3744,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : edgw(60.0), basew(10.0), sensilc(60), + reparw(100.), fftwlc(false), blurlc(true), wavblur(false), @@ -4219,6 +4225,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && complexcolor == other.complexcolor && curvactiv == other.curvactiv && lightness == other.lightness + && reparcol == other.reparcol && contrast == other.contrast && chroma == other.chroma && labgridALow == other.labgridALow @@ -4318,6 +4325,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && expMethod == other.expMethod && exnoiseMethod == other.exnoiseMethod && laplacexp == other.laplacexp + && reparexp == other.reparexp && balanexp == other.balanexp && linear == other.linear && gamm == other.gamm @@ -4364,6 +4372,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && slomaskSH == other.slomaskSH && lapmaskSH == other.lapmaskSH && detailSH == other.detailSH + && reparsh == other.reparsh && LmaskSHcurve == other.LmaskSHcurve && fatamountSH == other.fatamountSH && fatanchorSH == other.fatanchorSH @@ -4466,6 +4475,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && nlrad == other.nlrad && nlgam == other.nlgam && sensiden == other.sensiden + && reparden == other.reparden && detailthr == other.detailthr && locwavcurveden == other.locwavcurveden && locwavcurvehue == other.locwavcurvehue @@ -4497,6 +4507,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && gamma == other.gamma && estop == other.estop && scaltm == other.scaltm + && repartm == other.repartm && rewei == other.rewei && satur == other.satur && sensitm == other.sensitm @@ -4618,6 +4629,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && edgw == other.edgw && basew == other.basew && sensilc == other.sensilc + && reparw == other.reparw && fftwlc == other.fftwlc && blurlc == other.blurlc && wavblur == other.wavblur @@ -5864,6 +5876,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || spot_edited->complexcolor, "Locallab", "Complexcolor_" + index_str, spot.complexcolor, keyFile); saveToKeyfile(!pedited || spot_edited->curvactiv, "Locallab", "Curvactiv_" + index_str, spot.curvactiv, keyFile); saveToKeyfile(!pedited || spot_edited->lightness, "Locallab", "Lightness_" + index_str, spot.lightness, keyFile); + saveToKeyfile(!pedited || spot_edited->reparcol, "Locallab", "Reparcol_" + index_str, spot.reparcol, keyFile); saveToKeyfile(!pedited || spot_edited->contrast, "Locallab", "Contrast_" + index_str, spot.contrast, keyFile); saveToKeyfile(!pedited || spot_edited->chroma, "Locallab", "Chroma_" + index_str, spot.chroma, keyFile); saveToKeyfile(!pedited || spot_edited->labgridALow, "Locallab", "labgridALow_" + index_str, spot.labgridALow, keyFile); @@ -5964,6 +5977,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || spot_edited->expMethod, "Locallab", "ExpMethod_" + index_str, spot.expMethod, keyFile); saveToKeyfile(!pedited || spot_edited->exnoiseMethod, "Locallab", "ExnoiseMethod_" + index_str, spot.exnoiseMethod, keyFile); saveToKeyfile(!pedited || spot_edited->laplacexp, "Locallab", "Laplacexp_" + index_str, spot.laplacexp, keyFile); + saveToKeyfile(!pedited || spot_edited->reparexp, "Locallab", "Reparexp_" + index_str, spot.reparexp, keyFile); saveToKeyfile(!pedited || spot_edited->balanexp, "Locallab", "Balanexp_" + index_str, spot.balanexp, keyFile); saveToKeyfile(!pedited || spot_edited->linear, "Locallab", "Linearexp_" + index_str, spot.linear, keyFile); saveToKeyfile(!pedited || spot_edited->gamm, "Locallab", "Gamm_" + index_str, spot.gamm, keyFile); @@ -6006,6 +6020,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || spot_edited->gammaskSH, "Locallab", "GammaskSH_" + index_str, spot.gammaskSH, keyFile); saveToKeyfile(!pedited || spot_edited->slomaskSH, "Locallab", "SlomaskSH_" + index_str, spot.slomaskSH, keyFile); saveToKeyfile(!pedited || spot_edited->detailSH, "Locallab", "DetailSH_" + index_str, spot.detailSH, keyFile); + saveToKeyfile(!pedited || spot_edited->reparsh, "Locallab", "Reparsh_" + index_str, spot.reparsh, keyFile); saveToKeyfile(!pedited || spot_edited->LmaskSHcurve, "Locallab", "LmaskSHCurve_" + index_str, spot.LmaskSHcurve, keyFile); saveToKeyfile(!pedited || spot_edited->fatamountSH, "Locallab", "FatamountSH_" + index_str, spot.fatamountSH, keyFile); saveToKeyfile(!pedited || spot_edited->fatanchorSH, "Locallab", "FatanchorSH_" + index_str, spot.fatanchorSH, keyFile); @@ -6111,6 +6126,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || spot_edited->nlrad, "Locallab", "Nlrad_" + index_str, spot.nlrad, keyFile); saveToKeyfile(!pedited || spot_edited->nlgam, "Locallab", "Nlgam_" + index_str, spot.nlgam, keyFile); saveToKeyfile(!pedited || spot_edited->sensiden, "Locallab", "Sensiden_" + index_str, spot.sensiden, keyFile); + saveToKeyfile(!pedited || spot_edited->reparden, "Locallab", "Reparden_" + index_str, spot.reparden, keyFile); saveToKeyfile(!pedited || spot_edited->detailthr, "Locallab", "Detailthr_" + index_str, spot.detailthr, keyFile); saveToKeyfile(!pedited || spot_edited->locwavcurveden, "Locallab", "LocwavCurveden_" + index_str, spot.locwavcurveden, keyFile); saveToKeyfile(!pedited || spot_edited->locwavcurvehue, "Locallab", "LocwavCurvehue_" + index_str, spot.locwavcurvehue, keyFile); @@ -6143,6 +6159,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || spot_edited->gamma, "Locallab", "Gamma_" + index_str, spot.gamma, keyFile); saveToKeyfile(!pedited || spot_edited->estop, "Locallab", "Estop_" + index_str, spot.estop, keyFile); saveToKeyfile(!pedited || spot_edited->scaltm, "Locallab", "Scaltm_" + index_str, spot.scaltm, keyFile); + saveToKeyfile(!pedited || spot_edited->repartm, "Locallab", "Repartm_" + index_str, spot.repartm, keyFile); saveToKeyfile(!pedited || spot_edited->rewei, "Locallab", "Rewei_" + index_str, spot.rewei, keyFile); saveToKeyfile(!pedited || spot_edited->satur, "Locallab", "Satur_" + index_str, spot.satur, keyFile); saveToKeyfile(!pedited || spot_edited->sensitm, "Locallab", "Sensitm_" + index_str, spot.sensitm, keyFile); @@ -6267,6 +6284,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || spot_edited->edgw, "Locallab", "Edgw_" + index_str, spot.edgw, keyFile); saveToKeyfile(!pedited || spot_edited->basew, "Locallab", "Basew_" + index_str, spot.basew, keyFile); saveToKeyfile(!pedited || spot_edited->sensilc, "Locallab", "Sensilc_" + index_str, spot.sensilc, keyFile); + saveToKeyfile(!pedited || spot_edited->reparw, "Locallab", "Reparw_" + index_str, spot.reparw, keyFile); saveToKeyfile(!pedited || spot_edited->fftwlc, "Locallab", "Fftwlc_" + index_str, spot.fftwlc, keyFile); saveToKeyfile(!pedited || spot_edited->blurlc, "Locallab", "Blurlc_" + index_str, spot.blurlc, keyFile); saveToKeyfile(!pedited || spot_edited->wavblur, "Locallab", "Wavblur_" + index_str, spot.wavblur, keyFile); @@ -7688,6 +7706,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Complexcolor_" + index_str, pedited, spot.complexcolor, spotEdited.complexcolor); assignFromKeyfile(keyFile, "Locallab", "Curvactiv_" + index_str, pedited, spot.curvactiv, spotEdited.curvactiv); assignFromKeyfile(keyFile, "Locallab", "Lightness_" + index_str, pedited, spot.lightness, spotEdited.lightness); + assignFromKeyfile(keyFile, "Locallab", "Reparcol_" + index_str, pedited, spot.reparcol, spotEdited.reparcol); assignFromKeyfile(keyFile, "Locallab", "Contrast_" + index_str, pedited, spot.contrast, spotEdited.contrast); assignFromKeyfile(keyFile, "Locallab", "Chroma_" + index_str, pedited, spot.chroma, spotEdited.chroma); assignFromKeyfile(keyFile, "Locallab", "labgridALow_" + index_str, pedited, spot.labgridALow, spotEdited.labgridALow); @@ -7801,6 +7820,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "ExpMethod_" + index_str, pedited, spot.expMethod, spotEdited.expMethod); assignFromKeyfile(keyFile, "Locallab", "ExnoiseMethod_" + index_str, pedited, spot.exnoiseMethod, spotEdited.exnoiseMethod); assignFromKeyfile(keyFile, "Locallab", "Laplacexp_" + index_str, pedited, spot.laplacexp, spotEdited.laplacexp); + assignFromKeyfile(keyFile, "Locallab", "Reparexp_" + index_str, pedited, spot.reparexp, spotEdited.reparexp); assignFromKeyfile(keyFile, "Locallab", "Balanexp_" + index_str, pedited, spot.balanexp, spotEdited.balanexp); assignFromKeyfile(keyFile, "Locallab", "Linearexp_" + index_str, pedited, spot.linear, spotEdited.linear); assignFromKeyfile(keyFile, "Locallab", "Gamm_" + index_str, pedited, spot.gamm, spotEdited.gamm); @@ -7848,6 +7868,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "SlomaskSH_" + index_str, pedited, spot.slomaskSH, spotEdited.slomaskSH); assignFromKeyfile(keyFile, "Locallab", "LapmaskSH_" + index_str, pedited, spot.lapmaskSH, spotEdited.lapmaskSH); assignFromKeyfile(keyFile, "Locallab", "DetailSH_" + index_str, pedited, spot.detailSH, spotEdited.detailSH); + assignFromKeyfile(keyFile, "Locallab", "Reparsh_" + index_str, pedited, spot.reparsh, spotEdited.reparsh); assignFromKeyfile(keyFile, "Locallab", "LmaskSHCurve_" + index_str, pedited, spot.LmaskSHcurve, spotEdited.LmaskSHcurve); assignFromKeyfile(keyFile, "Locallab", "FatamountSH_" + index_str, pedited, spot.fatamountSH, spotEdited.fatamountSH); assignFromKeyfile(keyFile, "Locallab", "FatanchorSH_" + index_str, pedited, spot.fatanchorSH, spotEdited.fatanchorSH); @@ -7972,6 +7993,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Nlrad_" + index_str, pedited, spot.nlrad, spotEdited.nlrad); assignFromKeyfile(keyFile, "Locallab", "Nlgam_" + index_str, pedited, spot.nlgam, spotEdited.nlgam); assignFromKeyfile(keyFile, "Locallab", "Sensiden_" + index_str, pedited, spot.sensiden, spotEdited.sensiden); + assignFromKeyfile(keyFile, "Locallab", "Reparden_" + index_str, pedited, spot.reparden, spotEdited.reparden); assignFromKeyfile(keyFile, "Locallab", "Detailthr_" + index_str, pedited, spot.detailthr, spotEdited.detailthr); assignFromKeyfile(keyFile, "Locallab", "LocwavCurveden_" + index_str, pedited, spot.locwavcurveden, spotEdited.locwavcurveden); assignFromKeyfile(keyFile, "Locallab", "LocwavCurvehue_" + index_str, pedited, spot.locwavcurvehue, spotEdited.locwavcurvehue); @@ -8016,6 +8038,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Gamma_" + index_str, pedited, spot.gamma, spotEdited.gamma); assignFromKeyfile(keyFile, "Locallab", "Estop_" + index_str, pedited, spot.estop, spotEdited.estop); assignFromKeyfile(keyFile, "Locallab", "Scaltm_" + index_str, pedited, spot.scaltm, spotEdited.scaltm); + assignFromKeyfile(keyFile, "Locallab", "Repartm_" + index_str, pedited, spot.repartm, spotEdited.repartm); assignFromKeyfile(keyFile, "Locallab", "Rewei_" + index_str, pedited, spot.rewei, spotEdited.rewei); assignFromKeyfile(keyFile, "Locallab", "Satur_" + index_str, pedited, spot.satur, spotEdited.satur); assignFromKeyfile(keyFile, "Locallab", "Sensitm_" + index_str, pedited, spot.sensitm, spotEdited.sensitm); @@ -8149,6 +8172,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Edgw_" + index_str, pedited, spot.edgw, spotEdited.edgw); assignFromKeyfile(keyFile, "Locallab", "Basew_" + index_str, pedited, spot.basew, spotEdited.basew); assignFromKeyfile(keyFile, "Locallab", "Sensilc_" + index_str, pedited, spot.sensilc, spotEdited.sensilc); + assignFromKeyfile(keyFile, "Locallab", "Reparw_" + index_str, pedited, spot.reparw, spotEdited.reparw); assignFromKeyfile(keyFile, "Locallab", "Fftwlc_" + index_str, pedited, spot.fftwlc, spotEdited.fftwlc); assignFromKeyfile(keyFile, "Locallab", "Blurlc_" + index_str, pedited, spot.blurlc, spotEdited.blurlc); assignFromKeyfile(keyFile, "Locallab", "Wavblur_" + index_str, pedited, spot.wavblur, spotEdited.wavblur); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 0df63b2fa..ea6b94d73 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -1030,6 +1030,7 @@ struct LocallabParams { int complexcolor; bool curvactiv; int lightness; + double reparcol; int contrast; int chroma; double labgridALow; @@ -1129,6 +1130,7 @@ struct LocallabParams { Glib::ustring expMethod; // std, pde Glib::ustring exnoiseMethod; // none, med, medhi double laplacexp; + double reparexp; double balanexp; double linear; double gamm; @@ -1167,6 +1169,7 @@ struct LocallabParams { double slomaskSH; double lapmaskSH; int detailSH; + double reparsh; std::vector LmaskSHcurve; double fatamountSH; double fatanchorSH; @@ -1269,6 +1272,7 @@ struct LocallabParams { int nlrad; double nlgam; int sensiden; + double reparden; int detailthr; std::vector locwavcurveden; std::vector locwavcurvehue; @@ -1300,6 +1304,7 @@ struct LocallabParams { double gamma; double estop; double scaltm; + double repartm; int rewei; double satur; int sensitm; @@ -1421,6 +1426,7 @@ struct LocallabParams { double edgw; double basew; int sensilc; + double reparw; bool fftwlc; bool blurlc; bool wavblur; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index cb5353054..e5446dfb1 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -1069,7 +1069,13 @@ int refreshmap[rtengine::NUMOFEVENTS] = { AUTOEXP, // EvLocallabSpotavoidrad AUTOEXP, // EvLocallabSpotavoidmun AUTOEXP, // Evlocallabcontthres - AUTOEXP // Evlocallabnorm + AUTOEXP, // Evlocallabnorm + AUTOEXP, // Evlocallabreparw + AUTOEXP, // Evlocallabreparcol + AUTOEXP, // Evlocallabreparden + AUTOEXP, // Evlocallabreparsh + AUTOEXP, // Evlocallabreparexp + AUTOEXP // Evlocallabrepartm }; diff --git a/rtgui/locallabtools.cc b/rtgui/locallabtools.cc index 2edb7db82..6f8ccea7a 100644 --- a/rtgui/locallabtools.cc +++ b/rtgui/locallabtools.cc @@ -416,6 +416,7 @@ LocallabColor::LocallabColor(): // Color & Light specific widgets lumFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LUMFRA")))), + reparcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LOGREPART"), 1.0, 100.0, 1., 100.0))), lightness(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LIGHTNESS"), -100, 500, 1, 0))), contrast(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CONTRAST"), -100, 100, 1, 0))), chroma(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMA"), -100, 150, 1, 0))), @@ -525,6 +526,8 @@ LocallabColor::LocallabColor(): lightness->setAdjusterListener(this); + reparcol->setAdjusterListener(this); + contrast->setAdjusterListener(this); chroma->setAdjusterListener(this); @@ -787,6 +790,7 @@ LocallabColor::LocallabColor(): csThresholdcol->setAdjusterListener(this); // Add Color & Light specific widgets to GUI + pack_start(*reparcol); ToolParamBlock* const lumBox = Gtk::manage(new ToolParamBlock()); lumBox->pack_start(*lightness); lumBox->pack_start(*contrast); @@ -957,6 +961,7 @@ void LocallabColor::updateAdviceTooltips(const bool showTooltips) if (showTooltips) { lumFrame->set_tooltip_text(M("TP_LOCALLAB_EXPCOLOR_TOOLTIP")); lightness->set_tooltip_text(M("TP_LOCALLAB_LIGHTN_TOOLTIP")); + reparcol->set_tooltip_text(M("TP_LOCALLAB_REPARCOL_TOOLTIP")); gridMethod->set_tooltip_text(M("TP_LOCALLAB_GRIDMETH_TOOLTIP")); strengthgrid->set_tooltip_text(M("TP_LOCALLAB_STRENGRID_TOOLTIP")); blurcolde->set_tooltip_text(M("TP_LOCALLAB_BLURCOLDE_TOOLTIP")); @@ -1008,6 +1013,7 @@ void LocallabColor::updateAdviceTooltips(const bool showTooltips) } else { lumFrame->set_tooltip_text(""); lightness->set_tooltip_text(""); + reparcol->set_tooltip_text(""); gridMethod->set_tooltip_text(""); strengthgrid->set_tooltip_text(""); blurcolde->set_tooltip_text(""); @@ -1124,6 +1130,7 @@ void LocallabColor::read(const rtengine::procparams::ProcParams* pp, const Param complexity->set_active(spot.complexcolor); lightness->setValue(spot.lightness); + reparcol->setValue(spot.reparcol); contrast->setValue(spot.contrast); chroma->setValue(spot.chroma); curvactiv->set_active(spot.curvactiv); @@ -1298,6 +1305,7 @@ void LocallabColor::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pe spot.complexcolor = complexity->get_active_row_number(); spot.lightness = lightness->getIntValue(); + spot.reparcol = reparcol->getValue(); spot.contrast = contrast->getIntValue(); spot.chroma = chroma->getIntValue(); spot.curvactiv = curvactiv->get_active(); @@ -1461,6 +1469,7 @@ void LocallabColor::setDefaults(const rtengine::procparams::ProcParams* defParam // Set default value for adjuster, labgrid and threshold adjuster widgets lightness->setDefault((double)defSpot.lightness); + reparcol->setDefault(defSpot.reparcol); contrast->setDefault((double)defSpot.contrast); chroma->setDefault((double)defSpot.chroma); labgrid->setDefault(defSpot.labgridALow / LocallabParams::LABGRIDL_CORR_MAX, @@ -1515,6 +1524,13 @@ void LocallabColor::adjusterChanged(Adjuster* a, double newval) } } + if (a == reparcol) { + if (listener) { + listener->panelChanged(Evlocallabreparcol, + reparcol->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + if (a == contrast) { if (listener) { listener->panelChanged(Evlocallabcontrast, @@ -2376,6 +2392,7 @@ void LocallabColor::updateColorGUI1() showmaskcolMethodinv->show(); contcol->hide(); blurcol->hide(); + reparcol->hide(); } else { gridFrame->show(); @@ -2407,6 +2424,7 @@ void LocallabColor::updateColorGUI1() showmaskcolMethodConninv.block(false); contcol->show(); blurcol->show(); + reparcol->show(); } } @@ -2488,6 +2506,7 @@ LocallabExposure::LocallabExposure(): // pdeFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_PDEFRA")))), exppde(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_PDEFRA")))), laplacexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPLACEXP"), 0.0, 100.0, 0.1, 0.))), + reparexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LOGREPART"), 1.0, 100.0, 1., 100.0))), linear(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LINEAR"), 0.01, 1., 0.01, 0.05))), balanexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BALANEXP"), 0.5, 1.5, 0.01, 1.0))), gamm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMM"), 0.2, 1.3, 0.01, 0.4))), @@ -2499,7 +2518,7 @@ LocallabExposure::LocallabExposure(): fatdetail(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATDETAIL"), -100., 300., 1., 0.))), norm(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_EQUIL")))), fatlevel(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATLEVEL"), 0.5, 2.0, 0.01, 1.))), - fatanchor(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATANCHORA"), 0.5, 2.0, 0.01, 1.))), + fatanchor(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATANCHOR"), 0.1, 100.0, 0.01, 50., Gtk::manage(new RTImage("circle-black-small.png")), Gtk::manage(new RTImage("circle-white-small.png"))))), sensiex(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 60))), structexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRUCCOL"), 0, 100, 1, 0))), blurexpde(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURDE"), 2, 100, 1, 5))), @@ -2562,6 +2581,7 @@ LocallabExposure::LocallabExposure(): setExpandAlignProperties(expfat, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); laplacexp->setAdjusterListener(this); + reparexp->setAdjusterListener(this); linear->setAdjusterListener(this); @@ -2701,7 +2721,8 @@ LocallabExposure::LocallabExposure(): mask2expCurveEditorG->curveListComplete(); // Add Color & Light specific widgets to GUI -// pack_start(*expMethod); + pack_start(*sensiex); + pack_start(*reparexp); ToolParamBlock* const pdeBox = Gtk::manage(new ToolParamBlock()); pdeBox->pack_start(*laplacexp); pdeBox->pack_start(*linear); @@ -2721,13 +2742,12 @@ LocallabExposure::LocallabExposure(): fatBox->pack_start(*fatdetail); // fatBox->pack_start(*norm); // fatBox->pack_start(*fatlevel); -// fatBox->pack_start(*fatanchor); + fatBox->pack_start(*fatanchor); // fatFrame->add(*fatBox); expfat->add(*fatBox, false); // pack_start(*fatFrame); pack_start(*expfat); pack_start(*expcomp); - pack_start(*sensiex); pack_start(*structexp); pack_start(*blurexpde); ToolParamBlock* const toolBox = Gtk::manage(new ToolParamBlock()); @@ -2822,6 +2842,7 @@ void LocallabExposure::updateAdviceTooltips(const bool showTooltips) higthrese->set_tooltip_text(M("TP_LOCALLAB_MASKHIGTHRESE_TOOLTIP")); blurexpde->set_tooltip_text(M("TP_LOCALLAB_BLURCOLDE_TOOLTIP")); laplacexp->set_tooltip_text(M("TP_LOCALLAB_EXPLAP_TOOLTIP")); + reparexp->set_tooltip_text(M("TP_LOCALLAB_REPAREXP_TOOLTIP")); linear->set_tooltip_text(M("TP_LOCALLAB_EXPLAPLIN_TOOLTIP")); balanexp->set_tooltip_text(M("TP_LOCALLAB_EXPLAPBAL_TOOLTIP")); gamm->set_tooltip_text(M("TP_LOCALLAB_EXPLAPGAMM_TOOLTIP")); @@ -2856,6 +2877,7 @@ void LocallabExposure::updateAdviceTooltips(const bool showTooltips) blurexpde->set_tooltip_text(""); exprecove->set_tooltip_markup(""); laplacexp->set_tooltip_text(""); + reparexp->set_tooltip_text(""); linear->set_tooltip_text(""); balanexp->set_tooltip_text(""); gamm->set_tooltip_text(""); @@ -2946,6 +2968,7 @@ void LocallabExposure::read(const rtengine::procparams::ProcParams* pp, const Pa } */ laplacexp->setValue(spot.laplacexp); + reparexp->setValue(spot.reparexp); linear->setValue(spot.linear); balanexp->setValue(spot.balanexp); gamm->setValue(spot.gamm); @@ -3037,6 +3060,7 @@ void LocallabExposure::write(rtengine::procparams::ProcParams* pp, ParamsEdited* } */ spot.laplacexp = laplacexp->getValue(); + spot.reparexp = reparexp->getValue(); spot.linear = linear->getValue(); spot.balanexp = balanexp->getValue(); spot.gamm = gamm->getValue(); @@ -3101,6 +3125,7 @@ void LocallabExposure::setDefaults(const rtengine::procparams::ProcParams* defPa // Set default values for adjuster widgets laplacexp->setDefault(defSpot.laplacexp); + reparexp->setDefault(defSpot.reparexp); linear->setDefault(defSpot.linear); balanexp->setDefault(defSpot.balanexp); gamm->setDefault(defSpot.gamm); @@ -3153,6 +3178,13 @@ void LocallabExposure::adjusterChanged(Adjuster* a, double newval) } } + if (a == reparexp) { + if (listener) { + listener->panelChanged(Evlocallabreparexp, + reparexp->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + if (a == linear) { if (listener) { listener->panelChanged(Evlocallablinear, @@ -3449,12 +3481,9 @@ void LocallabExposure::convertParamToNormal() slomaskexp->setValue(defSpot.slomaskexp); strmaskexp->setValue(defSpot.strmaskexp); angmaskexp->setValue(defSpot.angmaskexp); -// fatlevel->setValue(defSpot.fatlevel); -// fatanchor->setValue(defSpot.fatanchor); decaye->setValue(defSpot.decaye); // norm->set_active(defSpot.enaExpMask); fatlevel->setValue(defSpot.fatlevel); - fatanchor->setValue(defSpot.fatanchor); // Enable all listeners enableListener(); @@ -3530,7 +3559,7 @@ void LocallabExposure::updateGUIToMode(const modeType new_type) } norm->show(); fatlevel->hide(); - fatanchor->hide(); + fatanchor->show(); // Specific Simple mode widgets are shown in Normal mode if (!inversex->get_active()) { // Keep widget hidden when invers is toggled @@ -3774,6 +3803,7 @@ void LocallabExposure::updateExposureGUI3() expMethod->hide(); expcomp->setLabel(M("TP_LOCALLAB_EXPCOMPINV")); exprecove->hide(); + reparexp->hide(); // Manage specific case where expMethod is different from 0 if (expMethod->get_active_row_number() > 0) { @@ -3802,6 +3832,7 @@ void LocallabExposure::updateExposureGUI3() expgradexp->show(); exprecove->show(); } + reparexp->show(); showmaskexpMethodinv->hide(); // Reset hidden mask combobox @@ -3818,6 +3849,7 @@ LocallabShadow::LocallabShadow(): // Shadow highlight specific widgets shMethod(Gtk::manage(new MyComboBoxText())), + reparsh(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LOGREPART"), 1.0, 100.0, 1., 100.0))), multipliersh([]() -> std::array { std::array res = {}; @@ -3895,6 +3927,7 @@ LocallabShadow::LocallabShadow(): } detailSH->setAdjusterListener(this); + reparsh->setAdjusterListener(this); highlights->setAdjusterListener(this); @@ -3995,6 +4028,7 @@ LocallabShadow::LocallabShadow(): fatanchorSH->setAdjusterListener(this); // Add Shadow highlight specific widgets to GUI + pack_start(*reparsh); pack_start(*shMethod); for (const auto multiplier : multipliersh) { @@ -4091,6 +4125,7 @@ void LocallabShadow::updateAdviceTooltips(const bool showTooltips) } gamSH->set_tooltip_text(M("TP_LOCALLAB_SHTRC_TOOLTIP")); + reparsh->set_tooltip_text(M("TP_LOCALLAB_REPARSH_TOOLTIP")); sloSH->set_tooltip_text(M("TP_LOCALLAB_SHTRC_TOOLTIP")); strSH->set_tooltip_text(M("TP_LOCALLAB_GRADGEN_TOOLTIP")); exprecovs->set_tooltip_markup(M("TP_LOCALLAB_MASKRESH_TOOLTIP")); @@ -4131,6 +4166,7 @@ void LocallabShadow::updateAdviceTooltips(const bool showTooltips) multiplier->set_tooltip_text(""); } gamSH->set_tooltip_text(""); + reparsh->set_tooltip_text(""); sloSH->set_tooltip_text(""); strSH->set_tooltip_text(""); blurSHde->set_tooltip_text(""); @@ -4221,6 +4257,7 @@ void LocallabShadow::read(const rtengine::procparams::ProcParams* pp, const Para decays->setValue((double)spot.decays); detailSH->setValue((double)spot.detailSH); + reparsh->setValue(spot.reparsh); highlights->setValue((double)spot.highlights); h_tonalwidth->setValue((double)spot.h_tonalwidth); shadows->setValue(spot.shadows); @@ -4285,6 +4322,7 @@ void LocallabShadow::write(rtengine::procparams::ProcParams* pp, ParamsEdited* p } spot.detailSH = detailSH->getIntValue(); + spot.reparsh = reparsh->getValue(); spot.highlights = highlights->getIntValue(); spot.h_tonalwidth = h_tonalwidth->getIntValue(); spot.shadows = shadows->getIntValue(); @@ -4332,6 +4370,7 @@ void LocallabShadow::setDefaults(const rtengine::procparams::ProcParams* defPara } detailSH->setDefault((double)defSpot.detailSH); + reparsh->setDefault(defSpot.reparsh); highlights->setDefault((double)defSpot.highlights); h_tonalwidth->setDefault((double)defSpot.h_tonalwidth); shadows->setDefault((double)defSpot.shadows); @@ -4382,6 +4421,13 @@ void LocallabShadow::adjusterChanged(Adjuster* a, double newval) } } + if (a == reparsh) { + if (listener) { + listener->panelChanged(Evlocallabreparsh, + reparsh->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + if (a == highlights) { if (listener) { listener->panelChanged(Evlocallabhighlights, @@ -4858,11 +4904,13 @@ void LocallabShadow::updateShadowGUI1() showmaskSHMethodConn.block(false); showmaskSHMethodinv->show(); exprecovs->hide(); + reparsh->hide(); } else { if (mode == Expert || mode == Normal) { // Keep widget hidden in Simple mode expgradsh->show(); exprecovs->show(); } + reparsh->show(); showmaskSHMethod->show(); showmaskSHMethodinv->hide(); @@ -6337,6 +6385,7 @@ LocallabBlur::LocallabBlur(): nlgam(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NLGAM"), 2., 5., 0.1, 3.))), bilateral(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BILATERAL"), 0, 100, 1, 0))), sensiden(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 60))), + reparden(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LOGREPART"), 1.0, 100.0, 1., 100.0))), neutral(Gtk::manage (new Gtk::Button (M ("TP_RETINEX_NEUTRAL")))), expmaskbl(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_SHOWPLUS")))), showmaskblMethod(Gtk::manage(new MyComboBoxText())), @@ -6522,6 +6571,7 @@ LocallabBlur::LocallabBlur(): nlgam->setAdjusterListener(this); sensiden->setAdjusterListener(this); + reparden->setAdjusterListener(this); setExpandAlignProperties (neutral, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); @@ -6670,7 +6720,8 @@ LocallabBlur::LocallabBlur(): detailFrame->add(*detailBox); wavBox->pack_start(*detailFrame); denoisebox->pack_start(*sensiden); - + denoisebox->pack_start(*reparden); + ToolParamBlock* const nlbox = Gtk::manage(new ToolParamBlock()); nlbox->pack_start(*nlstr); nlbox->pack_start(*nldet); @@ -6770,6 +6821,7 @@ void LocallabBlur::updateAdviceTooltips(const bool showTooltips) strength->set_tooltip_text(M("TP_LOCALLAB_NOISE_TOOLTIP")); grainFrame->set_tooltip_text(M("TP_LOCALLAB_GRAIN_TOOLTIP")); sensibn->set_tooltip_text(M("TP_LOCALLAB_SENSI_TOOLTIP")); + reparden->set_tooltip_text(M("TP_LOCALLAB_REPARDEN_TOOLTIP")); medMethod->set_tooltip_text(M("TP_LOCALLAB_MEDIAN_TOOLTIP")); itera->set_tooltip_text(M("TP_LOCALLAB_MEDIANITER_TOOLTIP")); fftwbl->set_tooltip_text(M("TP_LOCALLAB_FFTMASK_TOOLTIP")); @@ -6838,6 +6890,7 @@ void LocallabBlur::updateAdviceTooltips(const bool showTooltips) strength->set_tooltip_text(""); grainFrame->set_tooltip_text(""); sensibn->set_tooltip_text(""); + reparden->set_tooltip_text(""); medMethod->set_tooltip_text(""); itera->set_tooltip_text(""); fftwbl->set_tooltip_text(""); @@ -6867,7 +6920,6 @@ void LocallabBlur::updateAdviceTooltips(const bool showTooltips) nlpat->set_tooltip_text(""); nlrad->set_tooltip_text(""); nlgam->set_tooltip_text(""); - sensibn->set_tooltip_text(""); blurMethod->set_tooltip_markup(""); expdenoise->set_tooltip_markup(""); wavshapeden->setTooltip(""); @@ -7052,6 +7104,7 @@ void LocallabBlur::read(const rtengine::procparams::ProcParams* pp, const Params higthres->setValue((double)spot.higthres); epsbl->setValue((double)spot.epsbl); sensibn->setValue((double)spot.sensibn); + reparden->setValue(spot.reparden); recothresd->setValue((double)spot.recothresd); lowthresd->setValue((double)spot.lowthresd); midthresd->setValue((double)spot.midthresd); @@ -7198,6 +7251,7 @@ void LocallabBlur::write(rtengine::procparams::ProcParams* pp, ParamsEdited* ped spot.higthres = higthres->getValue(); spot.epsbl = epsbl->getIntValue(); spot.sensibn = sensibn->getIntValue(); + spot.reparden = reparden->getValue(); spot.recothresd = recothresd->getValue(); spot.lowthresd = lowthresd->getValue(); spot.midthresd = midthresd->getValue(); @@ -7307,6 +7361,7 @@ void LocallabBlur::setDefaults(const rtengine::procparams::ProcParams* defParams higthres->setDefault((double)defSpot.higthres); epsbl->setDefault((double)defSpot.epsbl); sensibn->setDefault((double)defSpot.sensibn); + reparden->setDefault(defSpot.reparden); recothresd->setDefault((double)defSpot.recothresd); lowthresd->setDefault((double)defSpot.lowthresd); midthresd->setDefault((double)defSpot.midthresd); @@ -7656,6 +7711,13 @@ void LocallabBlur::adjusterChanged(Adjuster* a, double newval) } } + if (a == reparden) { + if (listener) { + listener->panelChanged(Evlocallabreparden, + reparden->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + if (a == strumaskbl) { if (listener) { listener->panelChanged(Evlocallabstrumaskbl, diff --git a/rtgui/locallabtools.h b/rtgui/locallabtools.h index 53eafd6f8..d9d3a11f8 100644 --- a/rtgui/locallabtools.h +++ b/rtgui/locallabtools.h @@ -177,6 +177,7 @@ class LocallabColor: private: // Color & Light specific widgets Gtk::Frame* const lumFrame; + Adjuster* const reparcol; Adjuster* const lightness; Adjuster* const contrast; Adjuster* const chroma; @@ -331,6 +332,7 @@ private: // Gtk::Frame* const pdeFrame; MyExpander* const exppde; Adjuster* const laplacexp; + Adjuster* const reparexp; Adjuster* const linear; Adjuster* const balanexp; Adjuster* const gamm; @@ -442,6 +444,7 @@ class LocallabShadow: private: // Shadow highlight specific widgets MyComboBoxText* const shMethod; + Adjuster* const reparsh; const std::array multipliersh; Adjuster* const detailSH; Adjuster* const highlights; @@ -745,6 +748,7 @@ private: Adjuster* const nlgam; Adjuster* const bilateral; Adjuster* const sensiden; + Adjuster* const reparden; Gtk::Button* neutral; MyExpander* const expmaskbl; MyComboBoxText* const showmaskblMethod; @@ -835,6 +839,7 @@ class LocallabTone: { private: // Tone Mapping specific widgets + Adjuster* const repartm; Adjuster* const amount; Adjuster* const stren; Gtk::CheckButton* const equiltm; @@ -1083,6 +1088,7 @@ private: Adjuster* const residhi; Adjuster* const residhithr; Adjuster* const sensilc; + Adjuster* const reparw; Gtk::Frame* const clariFrame; Adjuster* const clarilres; Adjuster* const claricres; diff --git a/rtgui/locallabtools2.cc b/rtgui/locallabtools2.cc index d0ed30a8a..f7d68e5a1 100644 --- a/rtgui/locallabtools2.cc +++ b/rtgui/locallabtools2.cc @@ -118,6 +118,7 @@ LocallabTone::LocallabTone(): LocallabTool(this, M("TP_LOCALLAB_TONE_TOOLNAME"), M("TP_LOCALLAB_TM"), true), // Tone mapping specific widgets + repartm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LOGREPART"), 1.0, 100.0, 1., 100.0))), amount(Gtk::manage(new Adjuster(M("TP_LOCALLAB_AMOUNT"), 50., 100.0, 0.5, 95.))), stren(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STREN"), -0.5, 2.0, 0.01, 0.5))), equiltm(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_EQUIL")))), @@ -160,6 +161,8 @@ LocallabTone::LocallabTone(): // Parameter Tone Mapping specific widgets amount->setAdjusterListener(this); + repartm->setAdjusterListener(this); + stren->setAdjusterListener(this); equiltmConn = equiltm->signal_toggled().connect(sigc::mem_fun(*this, &LocallabTone::equiltmChanged)); @@ -235,10 +238,13 @@ LocallabTone::LocallabTone(): Lmasktmshape->setLeftBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); mask2tmCurveEditorG->curveListComplete(); + Gtk::Separator* const separatortm = Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_HORIZONTAL)); // Add Tone Mapping specific widgets to GUI // pack_start(*amount); // To use if we change transit_shapedetect parameters pack_start(*sensitm); + pack_start(*repartm); + pack_start(*separatortm); pack_start(*stren); pack_start(*equiltm); pack_start(*gamma); @@ -304,6 +310,7 @@ void LocallabTone::updateAdviceTooltips(const bool showTooltips) exp->set_tooltip_text(M("TP_LOCALLAB_TONEMAP_TOOLTIP")); exprecovt->set_tooltip_markup(M("TP_LOCALLAB_MASKRESTM_TOOLTIP")); equiltm->set_tooltip_text(M("TP_LOCALLAB_EQUILTM_TOOLTIP")); + repartm->set_tooltip_text(M("TP_LOCALLAB_REPARTM_TOOLTIP")); gamma->set_tooltip_text(M("TP_LOCALLAB_TONEMAPGAM_TOOLTIP")); estop->set_tooltip_text(M("TP_LOCALLAB_TONEMAPESTOP_TOOLTIP")); scaltm->set_tooltip_text(M("TP_LOCALLAB_TONEMASCALE_TOOLTIP")); @@ -329,6 +336,7 @@ void LocallabTone::updateAdviceTooltips(const bool showTooltips) } else { exp->set_tooltip_text(""); equiltm->set_tooltip_text(""); + repartm->set_tooltip_text(""); gamma->set_tooltip_text(""); estop->set_tooltip_text(""); scaltm->set_tooltip_text(""); @@ -401,6 +409,7 @@ void LocallabTone::read(const rtengine::procparams::ProcParams* pp, const Params amount->setValue(spot.amount); stren->setValue(spot.stren); + repartm->setValue(spot.repartm); equiltm->set_active(spot.equiltm); gamma->setValue(spot.gamma); satur->setValue(spot.satur); @@ -449,6 +458,7 @@ void LocallabTone::write(rtengine::procparams::ProcParams* pp, ParamsEdited* ped spot.amount = amount->getValue(); spot.stren = stren->getValue(); + spot.repartm = repartm->getValue(); spot.equiltm = equiltm->get_active(); spot.gamma = gamma->getValue(); spot.satur = satur->getValue(); @@ -492,6 +502,7 @@ void LocallabTone::setDefaults(const rtengine::procparams::ProcParams* defParams satur->setDefault(defSpot.satur); estop->setDefault(defSpot.estop); scaltm->setDefault(defSpot.scaltm); + repartm->setDefault(defSpot.repartm); rewei->setDefault((double)defSpot.rewei); softradiustm->setDefault(defSpot.softradiustm); sensitm->setDefault((double)defSpot.sensitm); @@ -527,6 +538,8 @@ void LocallabTone::adjusterChanged(Adjuster* a, double newval) listener->panelChanged(Evlocallabestop, estop->getTextValue() + spName); } else if (a == scaltm) { listener->panelChanged(Evlocallabscaltm, scaltm->getTextValue() + spName); + } else if (a == repartm) { + listener->panelChanged(Evlocallabrepartm, repartm->getTextValue() + spName); } else if (a == rewei) { listener->panelChanged(Evlocallabrewei, rewei->getTextValue() + spName); } else if (a == softradiustm) { @@ -2333,6 +2346,7 @@ LocallabContrast::LocallabContrast(): residhi(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RESIDHI"), -100., 100., 1., 0.))), residhithr(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RESIDHITHR"), 0., 100., 1., 70.))), sensilc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 60))), + reparw(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LOGREPART"), 1.0, 100.0, 1., 100.0))), clariFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_CLARIFRA")))), clarilres(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CLARILRES"), -20., 100., 0.5, 0.))), claricres(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CLARICRES"), -20., 100., 0.5, 0.))), @@ -2465,6 +2479,8 @@ LocallabContrast::LocallabContrast(): sensilc->setAdjusterListener(this); + reparw->setAdjusterListener(this); + clariFrame->set_label_align(0.025, 0.5); clarilres->setAdjusterListener(this); @@ -2689,6 +2705,7 @@ LocallabContrast::LocallabContrast(): // Add Local contrast specific widgets to GUI pack_start(*sensilc); + pack_start(*reparw); pack_start(*localcontMethod); pack_start(*lcradius); pack_start(*lcamount); @@ -2945,6 +2962,7 @@ void LocallabContrast::updateAdviceTooltips(const bool showTooltips) masklcCurveEditorG->set_tooltip_markup(M("TP_LOCALLAB_MASKCURVE_TOOLTIP")); chromasklc->set_tooltip_text(M("TP_LOCALLAB_CHROMASK_TOOLTIP")); sensilc->set_tooltip_text(M("TP_LOCALLAB_SENSI_TOOLTIP")); + reparw->set_tooltip_text(M("TP_LOCALLAB_REPARW_TOOLTIP")); decayw->set_tooltip_text(M("TP_LOCALLAB_MASKDECAY_TOOLTIP")); lowthresw->set_tooltip_text(M("TP_LOCALLAB_MASKLOWTHRESWAV_TOOLTIP")); higthresw->set_tooltip_text(M("TP_LOCALLAB_MASKHIGTHRESWAV_TOOLTIP")); @@ -2977,6 +2995,7 @@ void LocallabContrast::updateAdviceTooltips(const bool showTooltips) masklcCurveEditorG->set_tooltip_markup(""); chromasklc->set_tooltip_text(""); sensilc->set_tooltip_text(""); + reparw->set_tooltip_text(""); wavshape->setTooltip(""); clarilres->set_tooltip_text(""); @@ -3113,6 +3132,7 @@ void LocallabContrast::read(const rtengine::procparams::ProcParams* pp, const Pa residhi->setValue(spot.residhi); residhithr->setValue(spot.residhithr); sensilc->setValue((double)spot.sensilc); + reparw->setValue(spot.reparw); clarilres->setValue(spot.clarilres); claricres->setValue(spot.claricres); clarisoft->setValue(spot.clarisoft); @@ -3234,6 +3254,7 @@ void LocallabContrast::write(rtengine::procparams::ProcParams* pp, ParamsEdited* spot.residhi = residhi->getValue(); spot.residhithr = residhithr->getValue(); spot.sensilc = sensilc->getIntValue(); + spot.reparw = reparw->getValue(); spot.clarilres = clarilres->getValue(); spot.claricres = claricres->getValue(); spot.clarisoft = clarisoft->getValue(); @@ -3334,6 +3355,7 @@ void LocallabContrast::setDefaults(const rtengine::procparams::ProcParams* defPa residhi->setDefault(defSpot.residhi); residhithr->setDefault(defSpot.residhithr); sensilc->setDefault((double)defSpot.sensilc); + reparw->setDefault(defSpot.reparw); clarilres->setDefault(defSpot.clarilres); claricres->setDefault(defSpot.claricres); clarisoft->setDefault(defSpot.clarisoft); @@ -3468,6 +3490,13 @@ void LocallabContrast::adjusterChanged(Adjuster* a, double newval) } } + if (a == reparw) { + if (listener) { + listener->panelChanged(Evlocallabreparw, + reparw->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + if (a == clarilres) { if (listener) { listener->panelChanged(Evlocallabclarilres, diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 1fdefc0a3..8fdd44bb6 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -1198,6 +1198,7 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).expMethod = locallab.spots.at(j).expMethod && pSpot.expMethod == otherSpot.expMethod; locallab.spots.at(j).exnoiseMethod = locallab.spots.at(j).exnoiseMethod && pSpot.exnoiseMethod == otherSpot.exnoiseMethod; locallab.spots.at(j).laplacexp = locallab.spots.at(j).laplacexp && pSpot.laplacexp == otherSpot.laplacexp; + locallab.spots.at(j).reparexp = locallab.spots.at(j).reparexp && pSpot.reparexp == otherSpot.reparexp; locallab.spots.at(j).balanexp = locallab.spots.at(j).balanexp && pSpot.balanexp == otherSpot.balanexp; locallab.spots.at(j).linear = locallab.spots.at(j).linear && pSpot.linear == otherSpot.linear; locallab.spots.at(j).gamm = locallab.spots.at(j).gamm && pSpot.gamm == otherSpot.gamm; @@ -1240,6 +1241,7 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).slomaskSH = locallab.spots.at(j).slomaskSH && pSpot.slomaskSH == otherSpot.slomaskSH; locallab.spots.at(j).lapmaskSH = locallab.spots.at(j).lapmaskSH && pSpot.lapmaskSH == otherSpot.lapmaskSH; locallab.spots.at(j).detailSH = locallab.spots.at(j).detailSH && pSpot.detailSH == otherSpot.detailSH; + locallab.spots.at(j).reparsh = locallab.spots.at(j).reparsh && pSpot.reparsh == otherSpot.reparsh; locallab.spots.at(j).LmaskSHcurve = locallab.spots.at(j).LmaskSHcurve && pSpot.LmaskSHcurve == otherSpot.LmaskSHcurve; locallab.spots.at(j).fatamountSH = locallab.spots.at(j).fatamountSH && pSpot.fatamountSH == otherSpot.fatamountSH; locallab.spots.at(j).fatanchorSH = locallab.spots.at(j).fatanchorSH && pSpot.fatanchorSH == otherSpot.fatanchorSH; @@ -1342,6 +1344,7 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).nlrad = locallab.spots.at(j).nlrad && pSpot.nlrad == otherSpot.nlrad; locallab.spots.at(j).nlgam = locallab.spots.at(j).nlgam && pSpot.nlgam == otherSpot.nlgam; locallab.spots.at(j).sensiden = locallab.spots.at(j).sensiden && pSpot.sensiden == otherSpot.sensiden; + locallab.spots.at(j).reparden = locallab.spots.at(j).reparden && pSpot.reparden == otherSpot.reparden; locallab.spots.at(j).detailthr = locallab.spots.at(j).detailthr && pSpot.detailthr == otherSpot.detailthr; locallab.spots.at(j).locwavcurveden = locallab.spots.at(j).locwavcurveden && pSpot.locwavcurveden == otherSpot.locwavcurveden; locallab.spots.at(j).locwavcurvehue = locallab.spots.at(j).locwavcurvehue && pSpot.locwavcurvehue == otherSpot.locwavcurvehue; @@ -1373,6 +1376,7 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).gamma = locallab.spots.at(j).gamma && pSpot.gamma == otherSpot.gamma; locallab.spots.at(j).estop = locallab.spots.at(j).estop && pSpot.estop == otherSpot.estop; locallab.spots.at(j).scaltm = locallab.spots.at(j).scaltm && pSpot.scaltm == otherSpot.scaltm; + locallab.spots.at(j).repartm = locallab.spots.at(j).repartm && pSpot.repartm == otherSpot.repartm; locallab.spots.at(j).rewei = locallab.spots.at(j).rewei && pSpot.rewei == otherSpot.rewei; locallab.spots.at(j).satur = locallab.spots.at(j).satur && pSpot.satur == otherSpot.satur; locallab.spots.at(j).sensitm = locallab.spots.at(j).sensitm && pSpot.sensitm == otherSpot.sensitm; @@ -1494,6 +1498,7 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).edgw = locallab.spots.at(j).edgw && pSpot.edgw == otherSpot.edgw; locallab.spots.at(j).basew = locallab.spots.at(j).basew && pSpot.basew == otherSpot.basew; locallab.spots.at(j).sensilc = locallab.spots.at(j).sensilc && pSpot.sensilc == otherSpot.sensilc; + locallab.spots.at(j).reparw = locallab.spots.at(j).reparw && pSpot.reparw == otherSpot.reparw; 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; @@ -3398,6 +3403,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).lightness = mods.locallab.spots.at(i).lightness; } + if (locallab.spots.at(i).reparcol) { + toEdit.locallab.spots.at(i).reparcol = mods.locallab.spots.at(i).reparcol; + } + if (locallab.spots.at(i).contrast) { toEdit.locallab.spots.at(i).contrast = mods.locallab.spots.at(i).contrast; } @@ -3791,8 +3800,12 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).laplacexp = mods.locallab.spots.at(i).laplacexp; } - if (locallab.spots.at(i).balanexp) { - toEdit.locallab.spots.at(i).balanexp = mods.locallab.spots.at(i).balanexp; + if (locallab.spots.at(i).laplacexp) { + toEdit.locallab.spots.at(i).laplacexp = mods.locallab.spots.at(i).laplacexp; + } + + if (locallab.spots.at(i).reparexp) { + toEdit.locallab.spots.at(i).reparexp = mods.locallab.spots.at(i).reparexp; } if (locallab.spots.at(i).linear) { @@ -3942,6 +3955,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).detailSH = mods.locallab.spots.at(i).detailSH; } + if (locallab.spots.at(i).reparsh) { + toEdit.locallab.spots.at(i).reparsh = mods.locallab.spots.at(i).reparsh; + } + if (locallab.spots.at(i).LmaskSHcurve) { toEdit.locallab.spots.at(i).LmaskSHcurve = mods.locallab.spots.at(i).LmaskSHcurve; } @@ -4341,6 +4358,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).sensiden = mods.locallab.spots.at(i).sensiden; } + if (locallab.spots.at(i).reparden) { + toEdit.locallab.spots.at(i).reparden = mods.locallab.spots.at(i).reparden; + } + if (locallab.spots.at(i).detailthr) { toEdit.locallab.spots.at(i).detailthr = mods.locallab.spots.at(i).detailthr; } @@ -4463,6 +4484,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).scaltm = mods.locallab.spots.at(i).scaltm; } + if (locallab.spots.at(i).repartm) { + toEdit.locallab.spots.at(i).repartm = mods.locallab.spots.at(i).repartm; + } + if (locallab.spots.at(i).rewei) { toEdit.locallab.spots.at(i).rewei = mods.locallab.spots.at(i).rewei; } @@ -4939,6 +4964,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).sensilc = mods.locallab.spots.at(i).sensilc; } + if (locallab.spots.at(i).reparw) { + toEdit.locallab.spots.at(i).reparw = mods.locallab.spots.at(i).reparw; + } + if (locallab.spots.at(i).fftwlc) { toEdit.locallab.spots.at(i).fftwlc = mods.locallab.spots.at(i).fftwlc; } @@ -6700,6 +6729,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : complexcolor(v), curvactiv(v), lightness(v), + reparcol(v), contrast(v), chroma(v), labgridALow(v), @@ -6799,6 +6829,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : expMethod(v), exnoiseMethod(v), laplacexp(v), + reparexp(v), balanexp(v), linear(v), gamm(v), @@ -6837,6 +6868,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : slomaskSH(v), lapmaskSH(v), detailSH(v), + reparsh(v), LmaskSHcurve(v), fatamountSH(v), fatanchorSH(v), @@ -6939,6 +6971,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : nlrad(v), nlgam(v), sensiden(v), + reparden(v), detailthr(v), locwavcurveden(v), locwavcurvehue(v), @@ -6970,6 +7003,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : gamma(v), estop(v), scaltm(v), + repartm(v), rewei(v), satur(v), sensitm(v), @@ -7091,6 +7125,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : edgw(v), basew(v), sensilc(v), + reparw(v), fftwlc(v), blurlc(v), wavblur(v), @@ -7272,6 +7307,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) complexcolor = v; curvactiv = v; lightness = v; + reparcol = v; contrast = v; chroma = v; labgridALow = v; @@ -7371,6 +7407,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) expMethod = v; exnoiseMethod = v; laplacexp = v; + reparexp = v; balanexp = v; linear = v; gamm = v; @@ -7413,6 +7450,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) slomaskSH = v; lapmaskSH = v; detailSH = v; + reparsh = v; LmaskSHcurve = v; fatamountSH = v; fatanchorSH = v; @@ -7515,6 +7553,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) nlrad = v; nlgam = v; sensiden = v; + reparden = v; detailthr = v; locwavcurveden = v; showmaskblMethodtyp = v; @@ -7545,6 +7584,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) gamma = v; estop = v; scaltm = v; + repartm = v; rewei = v; satur = v; sensitm = v; @@ -7666,6 +7706,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) edgw = v; basew = v; sensilc = v; + reparw = v; fftwlc = v; blurlc = v; wavblur = v; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 95fc76407..ff3702c7e 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -438,6 +438,7 @@ public: bool complexcolor; bool curvactiv; bool lightness; + bool reparcol; bool contrast; bool chroma; bool labgridALow; @@ -537,6 +538,7 @@ public: bool expMethod; bool exnoiseMethod; bool laplacexp; + bool reparexp; bool balanexp; bool linear; bool gamm; @@ -575,6 +577,7 @@ public: bool slomaskSH; bool lapmaskSH; bool detailSH; + bool reparsh; bool LmaskSHcurve; bool fatamountSH; bool fatanchorSH; @@ -677,6 +680,7 @@ public: bool nlrad; bool nlgam; bool sensiden; + bool reparden; bool detailthr; bool locwavcurveden; bool locwavcurvehue; @@ -708,6 +712,7 @@ public: bool gamma; bool estop; bool scaltm; + bool repartm; bool rewei; bool satur; bool sensitm; @@ -829,6 +834,7 @@ public: bool edgw; bool basew; bool sensilc; + bool reparw; bool fftwlc; bool blurlc; bool wavblur;