From 9d18ccc5857ac9292463ee0d878cc08d577f0f4d Mon Sep 17 00:00:00 2001 From: Pandagrapher Date: Mon, 20 Aug 2018 19:40:43 +0200 Subject: [PATCH] Saving of Locallab tool parameters in .pp3 file #3 All Locallab tool parameters are now saved in .pp3 file Limitation: - Locallab tools are temporary deactivated (time to merge with procparam update) --- rtengine/procparams.cc | 827 ++++++++--------- rtengine/procparams.h | 154 ++-- rtgui/locallab.cc | 1977 ++++++++++++++++++++++------------------ rtgui/paramsedited.cc | 580 +++++------- rtgui/paramsedited.h | 114 ++- 5 files changed, 1836 insertions(+), 1816 deletions(-) diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index b351aed71..c0480318a 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2296,201 +2296,76 @@ LocallabParams::LocallabParams() : HHcurve(), invers(), // Exposure - - /* - llcurve{ - DCT_NURBS, - 0.0, - 0.0, - 1.0, - 1.0, - }, - cccurve{ - DCT_NURBS, - 0.0, - 0.0, - 1.0, - 1.0, - }, - */ - excurve{ - DCT_NURBS, - 0.0, - 0.0, - 1.0, - 1.0, -}, -localTgaincurve{ - static_cast(FCT_MinMaxCPoints), - 0.0, - 0.12, - 0.35, - 0.35, - 0.70, - 0.50, - 0.35, - 0.35, - 1.00, - 0.12, - 0.35, - 0.35 -}, -localTgaincurverab{ - static_cast(FCT_MinMaxCPoints), - 0.0, - 0.12, - 0.35, - 0.35, - 0.70, - 0.50, - 0.35, - 0.35, - 1.00, - 0.12, - 0.35, - 0.35 -}, -/* -LHcurve{ - static_cast(FCT_MinMaxCPoints), - 0.0, - 0.50, - 0.35, - 0.35, - 0.166, - 0.50, - 0.35, - 0.35, - 0.333, - 0.50, - 0.35, - 0.35, - 0.50, - 0.50, - 0.35, - 0.35, - 0.666, - 0.50, - 0.35, - 0.35, - 0.833, - 0.50, - 0.35, - 0.35 -}, -HHcurve{ - static_cast(FCT_MinMaxCPoints), - 0.0, - 0.50, - 0.35, - 0.35, - 0.166, - 0.50, - 0.35, - 0.35, - 0.333, - 0.50, - 0.35, - 0.35, - 0.50, - 0.50, - 0.35, - 0.35, - 0.666, - 0.50, - 0.35, - 0.35, - 0.833, - 0.50, - 0.35, - 0.35 -}, -*/ -skintonescurve { - DCT_Linear -} -/* -adjblur(0), -warm(0), -expcomp(0), -black(0), -hlcompr(20), -hlcomprthresh(33), -shcompr(50), -pastels(0), -saturated(0), -psthreshold(0, 75, false), -protectskins(false), -avoidcolorshift(true), -pastsattog(true), -sensiv(19), -noiselumf(0), -noiselumc(0), -noiselumdetail(0), -noiselequal(7), -noisechrodetail(0), -bilateral(0), -sensiden(30), -noisechrof(0), -noisechroc(0), -sharradius(40), -sharamount(75), -shardamping(75), -shariter(30), -sensiex(19), -sensih(19), -retrab(500), -sensicb(19), -sensiexclu(19), -struc(0), -sensibn(40), -sensitm(19), -sensisha(19), -radius(1), -strength(0), -stren(0), -gamma(100), -estop(140), -scaltm(10), -rewei(0), -transit(60), -avoid(false), -retinexMethod("high"), -cutpast(false), -lastdust(false), -activlum(false), -inversrad(false), -inversret(false), -inverssha(false), -hueref(1.), -huerefblur(1.), -chromaref(50.), -lumaref(50.), -sobelref(0.), -str(0), -neigh(50), -nbspot(1), -anbspot(0), -vart(200), -chrrt(0), -mult{ - 1.0, - 1.0, - 1.0, - 1.0, - 1.0, -}, -expexpose(false), -expvibrance(false), -expblur(false), -exptonemap(false), -expreti(false), -expsharp(false), -expcbdl(false), -expdenoi(false), -threshold(20), -chromacbdl(0) -*/ + expexpose(), + expcomp(), + hlcompr(), + hlcomprthresh(), + black(), + shcompr(), + warm(), + sensiex(), + excurve(), + // Vibrance + expvibrance(), + saturated(), + pastels(), + psthreshold(), + protectskins(), + avoidcolorshift(), + pastsattog(), + sensiv(), + skintonescurve(), + // Blur & Noise + expblur(), + radius(), + strength(), + sensibn(), + blurMethod(), + activlum(), + // Tone Mapping + exptonemap(), + stren(), + gamma(), + estop(), + scaltm(), + rewei(), + sensitm(), + // Retinex + expreti(), + retinexMethod(), + str(), + chrrt(), + neigh(), + vart(), + sensih(), + localTgaincurve(), + inversret(), + // Sharpening + expsharp(), + sharradius(), + sharamount(), + shardamping(), + shariter(), + sensisha(), + inverssha(), + // Contrast by detail levels + expcbdl(), + mult(), + chromacbdl(), + threshold(), + sensicb(), + // Denoise + expdenoi(), + noiselumf(), + noiselumc(), + noiselumdetail(), + noiselequal(), + noisechrof(), + noisechroc(), + adjblur(), + bilateral(), + sensiden(), + avoid() { } @@ -2533,87 +2408,85 @@ bool LocallabParams::operator ==(const LocallabParams& other) const && HHcurve == other.HHcurve && invers == other.invers // Exposure - ; - /* - && adjblur == other.adjblur - && warm == other.warm - && expcomp == other.expcomp - && hlcompr == other.hlcompr - && hlcomprthresh == other.hlcomprthresh - && shcompr == other.shcompr - && black == other.black - && pastels == other.pastels - && sensiv == other.sensiv - && saturated == other.saturated - && psthreshold == other.psthreshold - && [this, &other]() -> bool { - for (unsigned int i = 0; i < 5; ++i) - { - if (mult[i] != other.mult[i]) { - return false; + && expexpose == other.expexpose + && expcomp == other.expcomp + && hlcompr == other.hlcompr + && hlcomprthresh == other.hlcomprthresh + && black == other.black + && shcompr == other.shcompr + && warm == other.warm + && sensiex == other.sensiex + && excurve == other.excurve + // Vibrance + && expvibrance == other.expvibrance + && saturated == other.saturated + && pastels == other.pastels + && psthreshold == other.psthreshold + && protectskins == other.protectskins + && avoidcolorshift == other.avoidcolorshift + && pastsattog == other.pastsattog + && sensiv == other.sensiv + && skintonescurve == other.skintonescurve + // Blur & Noise + && expblur == other.expblur + && radius == other.radius + && strength == other.strength + && sensibn == other.sensibn + && blurMethod == other.blurMethod + && activlum == other.activlum + // Tone Mapping + && exptonemap == other.exptonemap + && stren == other.stren + && gamma == other.gamma + && estop == other.estop + && scaltm == other.scaltm + && rewei == other.rewei + && sensitm == other.sensitm + // Retinex + && expreti == other.expreti + && retinexMethod == other.retinexMethod + && str == other.str + && chrrt == other.chrrt + && neigh == other.neigh + && vart == other.vart + && sensih == other.sensih + && localTgaincurve == other.localTgaincurve + && inversret == other.inversret + // Sharpening + && expsharp == other.expsharp + && sharradius == other.sharradius + && sharamount == other.sharamount + && shardamping == other.shardamping + && shariter == other.shariter + && sensisha == other.sensisha + && inverssha == other.inverssha + // Constrast by detail levels + && expcbdl == other.expcbdl + && [this, &other]()->bool { + for (int i = 0; i < 5; i++) + { + if (mult[i] != other.mult[i]) { + return false; + } } - } - return true; + return true; }() - && protectskins == other.protectskins - && avoidcolorshift == other.avoidcolorshift - && pastsattog == other.pastsattog - && skintonescurve == other.skintonescurve - && excurve == other.excurve + && chromacbdl == other.chromacbdl + && threshold == other.threshold + && sensicb == other.sensicb + // Denoise + && expdenoi == other.expdenoi && noiselumf == other.noiselumf && noiselumc == other.noiselumc && noiselumdetail == other.noiselumdetail && noiselequal == other.noiselequal - && noisechrodetail == other.noisechrodetail - && bilateral == other.bilateral - && sensiden == other.sensiden && noisechrof == other.noisechrof && noisechroc == other.noisechroc - && sharradius == other.sharradius - && sharamount == other.sharamount - && shardamping == other.shardamping - && shariter == other.shariter - && sensi == other.sensi - && sensiex == other.sensiex - && sensitm == other.sensitm - && sensih == other.sensih - && retrab == other.retrab - && sensicb == other.sensicb - && sensiexclu == other.sensiexclu - && struc == other.struc - && sensibn == other.sensibn - && sensisha == other.sensisha - && radius == other.radius - && strength == other.strength - && stren == other.stren - && gamma == other.gamma - && estop == other.estop - && scaltm == other.scaltm - && rewei == other.rewei - && chrrt == other.chrrt - && str == other.str - && neigh == other.neigh - && hueref == other.hueref - && huerefblur == other.huerefblur - && chromaref == other.chromaref - && lumaref == other.lumaref - && sobelref == other.sobelref - && vart == other.vart - && threshold == other.threshold - && chromacbdl == other.chromacbdl - && expexpose == other.expexpose - && expvibrance == other.expvibrance - && expblur == other.expblur - && exptonemap == other.exptonemap - && expreti == other.expreti - && expsharp == other.expsharp - && expcbdl == other.expcbdl - && expdenoi == other.expdenoi - && localTgaincurve == other.localTgaincurve - && localTgaincurverab == other.localTgaincurverab - */ - + && adjblur == other.adjblur + && bilateral == other.bilateral + && sensiden == other.sensiden + && avoid == other.avoid; } bool LocallabParams::operator !=(const LocallabParams& other) const @@ -3523,99 +3396,82 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->locallab.HHcurve, "Locallab", "HHCurve_" + std::to_string(i), locallab.HHcurve.at(i), keyFile); saveToKeyfile(!pedited || pedited->locallab.invers, "Locallab", "Invers_" + std::to_string(i), locallab.invers.at(i), keyFile); // Exposure + saveToKeyfile(!pedited || pedited->locallab.expexpose, "Locallab", "Expexpose_" + std::to_string(i), locallab.expexpose.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.expcomp, "Locallab", "Expcomp_" + std::to_string(i), locallab.expcomp.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.hlcompr, "Locallab", "Hlcompr_" + std::to_string(i), locallab.hlcompr.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.hlcomprthresh, "Locallab", "Hlcomprthresh_" + std::to_string(i), locallab.hlcomprthresh.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.black, "Locallab", "Black_" + std::to_string(i), locallab.black.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.shcompr, "Locallab", "Shcompr_" + std::to_string(i), locallab.shcompr.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.warm, "Locallab", "Warm_" + std::to_string(i), locallab.warm.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.sensiex, "Locallab", "Sensiex_" + std::to_string(i), locallab.sensiex.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.excurve, "Locallab", "ExCurve_" + std::to_string(i), locallab.excurve.at(i), keyFile); + // Vibrance + saveToKeyfile(!pedited || pedited->locallab.expvibrance, "Locallab", "Expvibrance_" + std::to_string(i), locallab.expvibrance.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.saturated, "Locallab", "Saturated_" + std::to_string(i), locallab.saturated.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.pastels, "Locallab", "Pastels_" + std::to_string(i), locallab.pastels.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.psthreshold, "Locallab", "PSThreshold_" + std::to_string(i), locallab.psthreshold.at(i).toVector(), keyFile); + saveToKeyfile(!pedited || pedited->locallab.protectskins, "Locallab", "ProtectSkins_" + std::to_string(i), locallab.protectskins.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.avoidcolorshift, "Locallab", "AvoidColorShift_" + std::to_string(i), locallab.avoidcolorshift.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.pastsattog, "Locallab", "PastSatTog_" + std::to_string(i), locallab.pastsattog.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.sensiv, "Locallab", "Sensiv_" + std::to_string(i), locallab.sensiv.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.skintonescurve, "Locallab", "SkinTonesCurve_" + std::to_string(i), locallab.skintonescurve.at(i), keyFile); + // Blur & Noise + saveToKeyfile(!pedited || pedited->locallab.expblur, "Locallab", "Expblur_" + std::to_string(i), locallab.expblur.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.radius, "Locallab", "Radius_" + std::to_string(i), locallab.radius.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.strength, "Locallab", "Strength_" + std::to_string(i), locallab.strength.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.sensibn, "Locallab", "Sensibn_" + std::to_string(i), locallab.sensibn.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.blurMethod, "Locallab", "BlurMethod_" + std::to_string(i), locallab.blurMethod.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.activlum, "Locallab", "activlum_" + std::to_string(i), locallab.activlum.at(i), keyFile); + // Tone Mapping + saveToKeyfile(!pedited || pedited->locallab.exptonemap, "Locallab", "Exptonemap_" + std::to_string(i), locallab.exptonemap.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.stren, "Locallab", "Stren_" + std::to_string(i), locallab.stren.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.gamma, "Locallab", "Gamma_" + std::to_string(i), locallab.gamma.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.estop, "Locallab", "Estop_" + std::to_string(i), locallab.estop.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.scaltm, "Locallab", "Scaltm_" + std::to_string(i), locallab.scaltm.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.rewei, "Locallab", "Rewei_" + std::to_string(i), locallab.rewei.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.sensitm, "Locallab", "Sensitm_" + std::to_string(i), locallab.sensitm.at(i), keyFile); + // Retinex + saveToKeyfile(!pedited || pedited->locallab.expreti, "Locallab", "Expreti_" + std::to_string(i), locallab.expreti.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.retinexMethod, "Locallab", "retinexMethod_" + std::to_string(i), locallab.retinexMethod.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.str, "Locallab", "Str_" + std::to_string(i), locallab.str.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.chrrt, "Locallab", "Chrrt_" + std::to_string(i), locallab.chrrt.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.neigh, "Locallab", "Neigh_" + std::to_string(i), locallab.neigh.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.vart, "Locallab", "Vart_" + std::to_string(i), locallab.vart.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.sensih, "Locallab", "Sensih_" + std::to_string(i), locallab.sensih.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.localTgaincurve, "Locallab", "TgainCurve_" + std::to_string(i), locallab.localTgaincurve.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.inversret, "Locallab", "Inversret_" + std::to_string(i), locallab.inversret.at(i), keyFile); + // Sharpening + saveToKeyfile(!pedited || pedited->locallab.expsharp, "Locallab", "Expsharp_" + std::to_string(i), locallab.expsharp.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.sharradius, "Locallab", "Sharradius_" + std::to_string(i), locallab.sharradius.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.sharamount, "Locallab", "Sharamount_" + std::to_string(i), locallab.sharamount.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.shardamping, "Locallab", "Shardamping_" + std::to_string(i), locallab.shardamping.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.shariter, "Locallab", "Shariter_" + std::to_string(i), locallab.shariter.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.sensisha, "Locallab", "Sensisha_" + std::to_string(i), locallab.sensisha.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.inverssha, "Locallab", "Inverssha_" + std::to_string(i), locallab.inverssha.at(i), keyFile); + // Contrast by detail levels + saveToKeyfile(!pedited || pedited->locallab.expcbdl, "Locallab", "Expcbdl_" + std::to_string(i), locallab.expcbdl.at(i), keyFile); + + for (int j = 0; j < 5; j++) { + saveToKeyfile(!pedited || pedited->locallab.mult[j], "Locallab", "Mult" + std::to_string(j) + "_" + std::to_string(i), locallab.mult[j].at(i), keyFile); + } + + saveToKeyfile(!pedited || pedited->locallab.chromacbdl, "Locallab", "Chromacbdl_" + std::to_string(i), locallab.chromacbdl.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.threshold, "Locallab", "Threshold_" + std::to_string(i), locallab.threshold.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.sensicb, "Locallab", "Sensicb_" + std::to_string(i), locallab.sensicb.at(i), keyFile); + // Denoise + saveToKeyfile(!pedited || pedited->locallab.expdenoi, "Locallab", "Expdenoi_" + std::to_string(i), locallab.expdenoi.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.noiselumf, "Locallab", "noiselumf_" + std::to_string(i), locallab.noiselumf.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.noiselumc, "Locallab", "noiselumc_" + std::to_string(i), locallab.noiselumc.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.noiselumdetail, "Locallab", "noiselumdetail_" + std::to_string(i), locallab.noiselumdetail.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.noiselequal, "Locallab", "noiselequal_" + std::to_string(i), locallab.noiselequal.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.noisechrof, "Locallab", "noisechrof_" + std::to_string(i), locallab.noisechrof.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.noisechroc, "Locallab", "noisechroc_" + std::to_string(i), locallab.noisechroc.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.adjblur, "Locallab", "Adjblur_" + std::to_string(i), locallab.adjblur.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.bilateral, "Locallab", "Bilateral_" + std::to_string(i), locallab.bilateral.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.sensiden, "Locallab", "Sensiden_" + std::to_string(i), locallab.sensiden.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.avoid, "Locallab", "Avoid_" + std::to_string(i), locallab.avoid.at(i), keyFile); } - /* - saveToKeyfile(!pedited || pedited->locallab.expexpose, "Locallab", "Expexpose", locallab.expexpose, keyFile); - saveToKeyfile(!pedited || pedited->locallab.expvibrance, "Locallab", "Expvibrance", locallab.expvibrance, keyFile); - saveToKeyfile(!pedited || pedited->locallab.expblur, "Locallab", "Expblur", locallab.expblur, keyFile); - saveToKeyfile(!pedited || pedited->locallab.exptonemap, "Locallab", "Exptonemap", locallab.exptonemap, keyFile); - saveToKeyfile(!pedited || pedited->locallab.expreti, "Locallab", "Expreti", locallab.expreti, keyFile); - saveToKeyfile(!pedited || pedited->locallab.expsharp, "Locallab", "Expsharp", locallab.expsharp, keyFile); - saveToKeyfile(!pedited || pedited->locallab.expcbdl, "Locallab", "Expcbdl", locallab.expcbdl, keyFile); - saveToKeyfile(!pedited || pedited->locallab.expdenoi, "Locallab", "Expdenoi", locallab.expdenoi, keyFile); - saveToKeyfile(!pedited || pedited->locallab.localTgaincurve, "Locallab", "TgainCurve", locallab.localTgaincurve, keyFile); - saveToKeyfile(!pedited || pedited->locallab.localTgaincurverab, "Locallab", "TgainCurverab", locallab.localTgaincurverab, keyFile); - saveToKeyfile(!pedited || pedited->locallab.avoid, "Locallab", "Avoid", locallab.avoid, keyFile); - saveToKeyfile(!pedited || pedited->locallab.cutpast, "Locallab", "Cutpast", locallab.cutpast, keyFile); - saveToKeyfile(!pedited || pedited->locallab.lastdust, "Locallab", "Lastdust", locallab.lastdust, keyFile); - saveToKeyfile(!pedited || pedited->locallab.activlum, "Locallab", "activlum", locallab.activlum, keyFile); - saveToKeyfile(!pedited || pedited->locallab.inversrad, "Locallab", "Inversrad", locallab.inversrad, keyFile); - saveToKeyfile(!pedited || pedited->locallab.inverssha, "Locallab", "Inverssha", locallab.inverssha, keyFile); - saveToKeyfile(!pedited || pedited->locallab.inversret, "Locallab", "Inversret", locallab.inversret, keyFile); - saveToKeyfile(!pedited || pedited->locallab.Exclumethod, "Locallab", "Exclumethod", locallab.Exclumethod, keyFile); - saveToKeyfile(!pedited || pedited->locallab.shapemethod, "Locallab", "Shapemethod", locallab.shapemethod, keyFile); - saveToKeyfile(!pedited || pedited->locallab.retinexMethod, "Locallab", "retinexMethod", locallab.retinexMethod, keyFile); - saveToKeyfile(!pedited || pedited->locallab.blurMethod, "Locallab", "BlurMethod", locallab.blurMethod, keyFile); - saveToKeyfile(!pedited || pedited->locallab.dustMethod, "Locallab", "DustMethod", locallab.dustMethod, keyFile); - saveToKeyfile(!pedited || pedited->locallab.adjblur, "Locallab", "Adjblur", locallab.adjblur, keyFile); - saveToKeyfile(!pedited || pedited->locallab.warm, "Locallab", "Warm", locallab.warm, keyFile); - saveToKeyfile(!pedited || pedited->locallab.expcomp, "Locallab", "Expcomp", locallab.expcomp, keyFile); - saveToKeyfile(!pedited || pedited->locallab.hlcompr, "Locallab", "Hlcompr", locallab.hlcompr, keyFile); - saveToKeyfile(!pedited || pedited->locallab.hlcomprthresh, "Locallab", "Hlcomprthresh", locallab.hlcomprthresh, keyFile); - saveToKeyfile(!pedited || pedited->locallab.black, "Locallab", "Black", locallab.black, keyFile); - saveToKeyfile(!pedited || pedited->locallab.shcompr, "Locallab", "Shcompr", locallab.shcompr, keyFile); - saveToKeyfile(!pedited || pedited->locallab.pastels, "Locallab", "Pastels", locallab.pastels, keyFile); - saveToKeyfile(!pedited || pedited->locallab.saturated, "Locallab", "Saturated", locallab.saturated, keyFile); - saveToKeyfile(!pedited || pedited->locallab.hlcompr, "Locallab", "Hlcompr", locallab.hlcompr, keyFile); - saveToKeyfile(!pedited || pedited->locallab.psthreshold, "Locallab", "PSThreshold", locallab.psthreshold.toVector(), keyFile); - saveToKeyfile(!pedited || pedited->locallab.sensiv, "Locallab", "Sensiv", locallab.sensiv, keyFile); - saveToKeyfile(!pedited || pedited->locallab.protectskins, "Locallab", "ProtectSkins", locallab.protectskins, keyFile); - saveToKeyfile(!pedited || pedited->locallab.avoidcolorshift, "Locallab", "AvoidColorShift", locallab.avoidcolorshift, keyFile); - saveToKeyfile(!pedited || pedited->locallab.pastsattog, "Locallab", "PastSatTog", locallab.pastsattog, keyFile); - saveToKeyfile(!pedited || pedited->locallab.skintonescurve, "Locallab", "SkinTonesCurve", locallab.skintonescurve, keyFile); - saveToKeyfile(!pedited || pedited->locallab.excurve, "Locallab", "ExCurve", locallab.excurve, keyFile); - saveToKeyfile(!pedited || pedited->locallab.noiselumf, "Locallab", "noiselumf", locallab.noiselumf, keyFile); - saveToKeyfile(!pedited || pedited->locallab.noiselumc, "Locallab", "noiselumc", locallab.noiselumc, keyFile); - saveToKeyfile(!pedited || pedited->locallab.noiselumdetail, "Locallab", "noiselumdetail", locallab.noiselumdetail, keyFile); - saveToKeyfile(!pedited || pedited->locallab.noiselequal, "Locallab", "noiselequal", locallab.noiselequal, keyFile); - saveToKeyfile(!pedited || pedited->locallab.noisechrodetail, "Locallab", "noisechrodetail", locallab.noisechrodetail, keyFile); - saveToKeyfile(!pedited || pedited->locallab.bilateral, "Locallab", "Bilateral", locallab.bilateral, keyFile); - saveToKeyfile(!pedited || pedited->locallab.sensiden, "Locallab", "Sensiden", locallab.sensiden, keyFile); - saveToKeyfile(!pedited || pedited->locallab.noisechrof, "Locallab", "noisechrof", locallab.noisechrof, keyFile); - saveToKeyfile(!pedited || pedited->locallab.noisechroc, "Locallab", "noisechroc", locallab.noisechroc, keyFile); - saveToKeyfile(!pedited || pedited->locallab.sharradius, "Locallab", "Sharradius", locallab.sharradius, keyFile); - saveToKeyfile(!pedited || pedited->locallab.sharamount, "Locallab", "Sharamount", locallab.sharamount, keyFile); - saveToKeyfile(!pedited || pedited->locallab.shardamping, "Locallab", "Shardamping", locallab.shardamping, keyFile); - saveToKeyfile(!pedited || pedited->locallab.shariter, "Locallab", "Shariter", locallab.shariter, keyFile); - saveToKeyfile(!pedited || pedited->locallab.sensiex, "Locallab", "Sensiex", locallab.sensiex, keyFile); - saveToKeyfile(!pedited || pedited->locallab.sensitm, "Locallab", "Sensitm", locallab.sensitm, keyFile); - saveToKeyfile(!pedited || pedited->locallab.sensisha, "Locallab", "Sensisha", locallab.sensisha, keyFile); - saveToKeyfile(!pedited || pedited->locallab.sensih, "Locallab", "Sensih", locallab.sensih, keyFile); - saveToKeyfile(!pedited || pedited->locallab.retrab, "Locallab", "Retrab", locallab.retrab, keyFile); - saveToKeyfile(!pedited || pedited->locallab.sensiexclu, "Locallab", "Sensiexclu", locallab.sensiexclu, keyFile); - saveToKeyfile(!pedited || pedited->locallab.struc, "Locallab", "Struc", locallab.struc, keyFile); - saveToKeyfile(!pedited || pedited->locallab.sensicb, "Locallab", "Sensicb", locallab.sensicb, keyFile); - saveToKeyfile(!pedited || pedited->locallab.sensibn, "Locallab", "Sensibn", locallab.sensibn, keyFile); - saveToKeyfile(!pedited || pedited->locallab.transit, "Locallab", "Transit", locallab.transit, keyFile); - saveToKeyfile(!pedited || pedited->locallab.chrrt, "Locallab", "Chrrt", locallab.chrrt, keyFile); - saveToKeyfile(!pedited || pedited->locallab.str, "Locallab", "Str", locallab.str, keyFile); - saveToKeyfile(!pedited || pedited->locallab.neigh, "Locallab", "Neigh", locallab.neigh, keyFile); - saveToKeyfile(!pedited || pedited->locallab.hueref, "Locallab", "Hueref", locallab.hueref, keyFile); - saveToKeyfile(!pedited || pedited->locallab.huerefblur, "Locallab", "Huerefblur", locallab.huerefblur, keyFile); - saveToKeyfile(!pedited || pedited->locallab.chromaref, "Locallab", "Chromaref", locallab.chromaref, keyFile); - saveToKeyfile(!pedited || pedited->locallab.lumaref, "Locallab", "Lumaref", locallab.lumaref, keyFile); - saveToKeyfile(!pedited || pedited->locallab.sobelref, "Locallab", "Sobelref", locallab.sobelref, keyFile); - saveToKeyfile(!pedited || pedited->locallab.vart, "Locallab", "Vart", locallab.vart, keyFile); - saveToKeyfile(!pedited || pedited->locallab.radius, "Locallab", "Radius", locallab.radius, keyFile); - saveToKeyfile(!pedited || pedited->locallab.strength, "Locallab", "Strength", locallab.strength, keyFile); - - for (int i = 0; i < 5; i++) { - std::stringstream ss; - ss << "Mult" << i; - - saveToKeyfile(!pedited || pedited->locallab.mult[i], "Locallab", ss.str(), locallab.mult[i], keyFile); - } - - saveToKeyfile(!pedited || pedited->locallab.threshold, "Locallab", "Threshold", locallab.threshold, keyFile); - saveToKeyfile(!pedited || pedited->locallab.chromacbdl, "Locallab", "Chromacbdl", locallab.chromacbdl, keyFile); - saveToKeyfile(!pedited || pedited->locallab.stren, "Locallab", "Stren", locallab.stren, keyFile); - saveToKeyfile(!pedited || pedited->locallab.gamma, "Locallab", "Gamma", locallab.gamma, keyFile); - saveToKeyfile(!pedited || pedited->locallab.estop, "Locallab", "Estop", locallab.estop, keyFile); - saveToKeyfile(!pedited || pedited->locallab.scaltm, "Locallab", "Scaltm", locallab.scaltm, keyFile); - saveToKeyfile(!pedited || pedited->locallab.rewei, "Locallab", "Rewei", locallab.rewei, keyFile); - */ - // Post-crop vignette saveToKeyfile(!pedited || pedited->pcvignette.enabled, "PCVignette", "Enabled", pcvignette.enabled, keyFile); saveToKeyfile(!pedited || pedited->pcvignette.strength, "PCVignette", "Strength", pcvignette.strength, keyFile); @@ -4666,6 +4522,81 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) locallab.HHcurve.resize(locallab.nbspot); locallab.invers.resize(locallab.nbspot); // Exposure + locallab.expexpose.resize(locallab.nbspot); + locallab.expcomp.resize(locallab.nbspot); + locallab.hlcompr.resize(locallab.nbspot); + locallab.hlcomprthresh.resize(locallab.nbspot); + locallab.black.resize(locallab.nbspot); + locallab.shcompr.resize(locallab.nbspot); + locallab.warm.resize(locallab.nbspot); + locallab.sensiex.resize(locallab.nbspot); + locallab.excurve.resize(locallab.nbspot); + // Vibrance + locallab.expvibrance.resize(locallab.nbspot); + locallab.saturated.resize(locallab.nbspot); + locallab.pastels.resize(locallab.nbspot); + Threshold val(0, 0, false); // Default value (initialization values not important) for resize function as Threshold does not have constructor Threshold() + locallab.psthreshold.resize(locallab.nbspot, val); + locallab.protectskins.resize(locallab.nbspot); + locallab.avoidcolorshift.resize(locallab.nbspot); + locallab.pastsattog.resize(locallab.nbspot); + locallab.sensiv.resize(locallab.nbspot); + locallab.skintonescurve.resize(locallab.nbspot); + // Blur & Noise + locallab.expblur.resize(locallab.nbspot); + locallab.radius.resize(locallab.nbspot); + locallab.strength.resize(locallab.nbspot); + locallab.sensibn.resize(locallab.nbspot); + locallab.blurMethod.resize(locallab.nbspot); + locallab.activlum.resize(locallab.nbspot); + // Tone Mapping + locallab.exptonemap.resize(locallab.nbspot); + locallab.stren.resize(locallab.nbspot); + locallab.gamma.resize(locallab.nbspot); + locallab.estop.resize(locallab.nbspot); + locallab.scaltm.resize(locallab.nbspot); + locallab.rewei.resize(locallab.nbspot); + locallab.sensitm.resize(locallab.nbspot); + // Retinex + locallab.expreti.resize(locallab.nbspot); + locallab.retinexMethod.resize(locallab.nbspot); + locallab.str.resize(locallab.nbspot); + locallab.chrrt.resize(locallab.nbspot); + locallab.neigh.resize(locallab.nbspot); + locallab.vart.resize(locallab.nbspot); + locallab.sensih.resize(locallab.nbspot); + locallab.localTgaincurve.resize(locallab.nbspot); + locallab.inversret.resize(locallab.nbspot); + // Sharpening + locallab.expsharp.resize(locallab.nbspot); + locallab.sharradius.resize(locallab.nbspot); + locallab.sharamount.resize(locallab.nbspot); + locallab.shardamping.resize(locallab.nbspot); + locallab.shariter.resize(locallab.nbspot); + locallab.sensisha.resize(locallab.nbspot); + locallab.inverssha.resize(locallab.nbspot); + // Contrast by detail levels + locallab.expcbdl.resize(locallab.nbspot); + + for (int i = 0; i < 5; i++) { + locallab.mult[i].resize(locallab.nbspot); + } + + locallab.chromacbdl.resize(locallab.nbspot); + locallab.threshold.resize(locallab.nbspot); + locallab.sensicb.resize(locallab.nbspot); + // Denoise + locallab.expdenoi.resize(locallab.nbspot); + locallab.noiselumf.resize(locallab.nbspot); + locallab.noiselumc.resize(locallab.nbspot); + locallab.noiselumdetail.resize(locallab.nbspot); + locallab.noiselequal.resize(locallab.nbspot); + locallab.noisechrof.resize(locallab.nbspot); + locallab.noisechroc.resize(locallab.nbspot); + locallab.adjblur.resize(locallab.nbspot); + locallab.bilateral.resize(locallab.nbspot); + locallab.sensiden.resize(locallab.nbspot); + locallab.avoid.resize(locallab.nbspot); } for (int i = 0; i < locallab.nbspot; i++) { @@ -4701,113 +4632,93 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "HHCurve_" + std::to_string(i), pedited, locallab.HHcurve.at(i), pedited->locallab.HHcurve); assignFromKeyfile(keyFile, "Locallab", "Invers_" + std::to_string(i), pedited, locallab.invers.at(i), pedited->locallab.invers); // Exposure - } + assignFromKeyfile(keyFile, "Locallab", "Expexpose_" + std::to_string(i), pedited, locallab.expexpose.at(i), pedited->locallab.expexpose); + assignFromKeyfile(keyFile, "Locallab", "Expcomp_" + std::to_string(i), pedited, locallab.expcomp.at(i), pedited->locallab.expcomp); + assignFromKeyfile(keyFile, "Locallab", "Hlcompr_" + std::to_string(i), pedited, locallab.hlcompr.at(i), pedited->locallab.hlcompr); + assignFromKeyfile(keyFile, "Locallab", "Hlcomprthresh_" + std::to_string(i), pedited, locallab.hlcomprthresh.at(i), pedited->locallab.hlcomprthresh); + assignFromKeyfile(keyFile, "Locallab", "Black_" + std::to_string(i), pedited, locallab.black.at(i), pedited->locallab.black); + assignFromKeyfile(keyFile, "Locallab", "Shcompr_" + std::to_string(i), pedited, locallab.shcompr.at(i), pedited->locallab.shcompr); + assignFromKeyfile(keyFile, "Locallab", "Warm_" + std::to_string(i), pedited, locallab.warm.at(i), pedited->locallab.warm); + assignFromKeyfile(keyFile, "Locallab", "Sensiex_" + std::to_string(i), pedited, locallab.sensiex.at(i), pedited->locallab.sensiex); + assignFromKeyfile(keyFile, "Locallab", "ExCurve_" + std::to_string(i), pedited, locallab.excurve.at(i), pedited->locallab.excurve); + // Vibrance + assignFromKeyfile(keyFile, "Locallab", "Expvibrance_" + std::to_string(i), pedited, locallab.expvibrance.at(i), pedited->locallab.expvibrance); + assignFromKeyfile(keyFile, "Locallab", "Saturated_" + std::to_string(i), pedited, locallab.saturated.at(i), pedited->locallab.saturated); + assignFromKeyfile(keyFile, "Locallab", "Pastels_" + std::to_string(i), pedited, locallab.pastels.at(i), pedited->locallab.pastels); - /* - assignFromKeyfile(keyFile, "Locallab", "Expcbdl", pedited, locallab.expcbdl, pedited->locallab.expcbdl); - assignFromKeyfile(keyFile, "Locallab", "Expexpose", pedited, locallab.expexpose, pedited->locallab.expexpose); - assignFromKeyfile(keyFile, "Locallab", "Expvibrance", pedited, locallab.expvibrance, pedited->locallab.expvibrance); - assignFromKeyfile(keyFile, "Locallab", "Expblur", pedited, locallab.expblur, pedited->locallab.expblur); - assignFromKeyfile(keyFile, "Locallab", "Exptonemap", pedited, locallab.exptonemap, pedited->locallab.exptonemap); - assignFromKeyfile(keyFile, "Locallab", "Expreti", pedited, locallab.expreti, pedited->locallab.expreti); - assignFromKeyfile(keyFile, "Locallab", "Expsharp", pedited, locallab.expsharp, pedited->locallab.expsharp); - assignFromKeyfile(keyFile, "Locallab", "Expdenoi", pedited, locallab.expdenoi, pedited->locallab.expdenoi); - assignFromKeyfile(keyFile, "Locallab", "Avoid", pedited, locallab.avoid, pedited->locallab.avoid); - assignFromKeyfile(keyFile, "Locallab", "TgainCurve", pedited, locallab.localTgaincurve, pedited->locallab.localTgaincurve); - assignFromKeyfile(keyFile, "Locallab", "TgainCurverab", pedited, locallab.localTgaincurverab, pedited->locallab.localTgaincurverab); - assignFromKeyfile(keyFile, "Locallab", "Cutpast", pedited, locallab.cutpast, pedited->locallab.cutpast); - assignFromKeyfile(keyFile, "Locallab", "Lastdust", pedited, locallab.lastdust, pedited->locallab.lastdust); - assignFromKeyfile(keyFile, "Locallab", "activlum", pedited, locallab.activlum, pedited->locallab.activlum); - assignFromKeyfile(keyFile, "Locallab", "Inversrad", pedited, locallab.inversrad, pedited->locallab.inversrad); - assignFromKeyfile(keyFile, "Locallab", "Inverssha", pedited, locallab.inverssha, pedited->locallab.inverssha); - assignFromKeyfile(keyFile, "Locallab", "Inversret", pedited, locallab.inversret, pedited->locallab.inversret); - assignFromKeyfile(keyFile, "Locallab", "Exclumethod", pedited, locallab.Exclumethod, pedited->locallab.Exclumethod); - assignFromKeyfile(keyFile, "Locallab", "retinexMethod", pedited, locallab.retinexMethod, pedited->locallab.retinexMethod); - assignFromKeyfile(keyFile, "Locallab", "Adjblur", pedited, locallab.adjblur, pedited->locallab.adjblur); - assignFromKeyfile(keyFile, "Locallab", "Warm", pedited, locallab.warm, pedited->locallab.warm); - assignFromKeyfile(keyFile, "Locallab", "Expcomp", pedited, locallab.expcomp, pedited->locallab.expcomp); - assignFromKeyfile(keyFile, "Locallab", "Hlcompr", pedited, locallab.hlcompr, pedited->locallab.hlcompr); - assignFromKeyfile(keyFile, "Locallab", "Hlcomprthresh", pedited, locallab.hlcomprthresh, pedited->locallab.hlcomprthresh); - assignFromKeyfile(keyFile, "Locallab", "Black", pedited, locallab.black, pedited->locallab.black); - assignFromKeyfile(keyFile, "Locallab", "Shcompr", pedited, locallab.shcompr, pedited->locallab.shcompr); - assignFromKeyfile(keyFile, "Locallab", "noiselumf", pedited, locallab.noiselumf, pedited->locallab.noiselumf); - assignFromKeyfile(keyFile, "Locallab", "noiselumc", pedited, locallab.noiselumc, pedited->locallab.noiselumc); - assignFromKeyfile(keyFile, "Locallab", "noiselumdetail", pedited, locallab.noiselumdetail, pedited->locallab.noiselumdetail); - assignFromKeyfile(keyFile, "Locallab", "noiselequal", pedited, locallab.noiselequal, pedited->locallab.noiselequal); - assignFromKeyfile(keyFile, "Locallab", "noisechrodetail", pedited, locallab.noisechrodetail, pedited->locallab.noisechrodetail); - assignFromKeyfile(keyFile, "Locallab", "Bilateral", pedited, locallab.bilateral, pedited->locallab.bilateral); - assignFromKeyfile(keyFile, "Locallab", "Sensiden", pedited, locallab.sensiden, pedited->locallab.sensiden); - assignFromKeyfile(keyFile, "Locallab", "noisechrof", pedited, locallab.noisechrof, pedited->locallab.noisechrof); - assignFromKeyfile(keyFile, "Locallab", "noisechroc", pedited, locallab.noisechroc, pedited->locallab.noisechroc); - assignFromKeyfile(keyFile, "Locallab", "Sharradius", pedited, locallab.sharradius, pedited->locallab.sharradius); - assignFromKeyfile(keyFile, "Locallab", "Sharamount", pedited, locallab.sharamount, pedited->locallab.sharamount); - assignFromKeyfile(keyFile, "Locallab", "Shardamping", pedited, locallab.shardamping, pedited->locallab.shardamping); - assignFromKeyfile(keyFile, "Locallab", "Shariter", pedited, locallab.shariter, pedited->locallab.shariter); - assignFromKeyfile(keyFile, "Locallab", "Sensiex", pedited, locallab.sensiex, pedited->locallab.sensiex); - assignFromKeyfile(keyFile, "Locallab", "Sensitm", pedited, locallab.sensitm, pedited->locallab.sensitm); - assignFromKeyfile(keyFile, "Locallab", "Sensisha", pedited, locallab.sensisha, pedited->locallab.sensisha); - assignFromKeyfile(keyFile, "Locallab", "Sensih", pedited, locallab.sensih, pedited->locallab.sensih); - assignFromKeyfile(keyFile, "Locallab", "Retrab", pedited, locallab.retrab, pedited->locallab.retrab); - assignFromKeyfile(keyFile, "Locallab", "Sensi", pedited, locallab.sensi, pedited->locallab.sensi); - assignFromKeyfile(keyFile, "Locallab", "Sensiexclu", pedited, locallab.sensiexclu, pedited->locallab.sensiexclu); - assignFromKeyfile(keyFile, "Locallab", "Struc", pedited, locallab.struc, pedited->locallab.struc); - assignFromKeyfile(keyFile, "Locallab", "Sensicb", pedited, locallab.sensicb, pedited->locallab.sensicb); - assignFromKeyfile(keyFile, "Locallab", "Sensibn", pedited, locallab.sensibn, pedited->locallab.sensibn); - assignFromKeyfile(keyFile, "Locallab", "Transit", pedited, locallab.transit, pedited->locallab.transit); - assignFromKeyfile(keyFile, "Locallab", "Chrrt", pedited, locallab.chrrt, pedited->locallab.chrrt); - assignFromKeyfile(keyFile, "Locallab", "Str", pedited, locallab.str, pedited->locallab.str); - assignFromKeyfile(keyFile, "Locallab", "Neigh", pedited, locallab.neigh, pedited->locallab.neigh); - assignFromKeyfile(keyFile, "Locallab", "Hueref", pedited, locallab.hueref, pedited->locallab.hueref); - assignFromKeyfile(keyFile, "Locallab", "Huerefblur", pedited, locallab.huerefblur, pedited->locallab.huerefblur); - assignFromKeyfile(keyFile, "Locallab", "Chromaref", pedited, locallab.chromaref, pedited->locallab.chromaref); - assignFromKeyfile(keyFile, "Locallab", "Lumaref", pedited, locallab.lumaref, pedited->locallab.lumaref); - assignFromKeyfile(keyFile, "Locallab", "Sobelref", pedited, locallab.sobelref, pedited->locallab.sobelref); - assignFromKeyfile(keyFile, "Locallab", "Vart", pedited, locallab.vart, pedited->locallab.vart); - assignFromKeyfile(keyFile, "Locallab", "Sensiv", pedited, locallab.sensiv, pedited->locallab.sensiv); - assignFromKeyfile(keyFile, "Locallab", "Pastels", pedited, locallab.pastels, pedited->locallab.pastels); - assignFromKeyfile(keyFile, "Locallab", "Saturated", pedited, locallab.saturated, pedited->locallab.saturated); + if (keyFile.has_key("Locallab", "PSThreshold_" + std::to_string(i))) { + const std::vector thresh = keyFile.get_integer_list("Locallab", "PSThreshold_" + std::to_string(i)); - if (keyFile.has_key("Locallab", "PSThreshold")) { - const std::vector thresh = keyFile.get_integer_list("Locallab", "PSThreshold"); - - if (thresh.size() >= 2) { - locallab.psthreshold.setValues(thresh[0], thresh[1]); - } - - if (pedited) { - pedited->locallab.psthreshold = true; - } - } - - assignFromKeyfile(keyFile, "Locallab", "ProtectSkins", pedited, locallab.protectskins, pedited->locallab.protectskins); - assignFromKeyfile(keyFile, "Locallab", "AvoidColorShift", pedited, locallab.avoidcolorshift, pedited->locallab.avoidcolorshift); - assignFromKeyfile(keyFile, "Locallab", "PastSatTog", pedited, locallab.pastsattog, pedited->locallab.pastsattog); - assignFromKeyfile(keyFile, "Locallab", "SkinTonesCurve", pedited, locallab.skintonescurve, pedited->locallab.skintonescurve); - assignFromKeyfile(keyFile, "Locallab", "ExCurve", pedited, locallab.excurve, pedited->locallab.excurve); - assignFromKeyfile(keyFile, "Locallab", "Radius", pedited, locallab.radius, pedited->locallab.radius); - assignFromKeyfile(keyFile, "Locallab", "Strength", pedited, locallab.strength, pedited->locallab.strength); - assignFromKeyfile(keyFile, "Locallab", "Stren", pedited, locallab.stren, pedited->locallab.stren); - assignFromKeyfile(keyFile, "Locallab", "Gamma", pedited, locallab.gamma, pedited->locallab.gamma); - assignFromKeyfile(keyFile, "Locallab", "Estop", pedited, locallab.estop, pedited->locallab.estop); - assignFromKeyfile(keyFile, "Locallab", "Scaltm", pedited, locallab.scaltm, pedited->locallab.scaltm); - assignFromKeyfile(keyFile, "Locallab", "Rewei", pedited, locallab.rewei, pedited->locallab.rewei); - - for (int i = 0; i < 5; i ++) { - std::stringstream ss; - ss << "Mult" << i; - - if (keyFile.has_key("Locallab", ss.str())) { - locallab.mult[i] = keyFile.get_double("Locallab", ss.str()); + if (thresh.size() >= 2) { + locallab.psthreshold.at(i).setValues(thresh[0], thresh[1]); + } if (pedited) { - pedited->locallab.mult[i] = true; + pedited->locallab.psthreshold = true; } } - } - assignFromKeyfile(keyFile, "Locallab", "Threshold", pedited, locallab.threshold, pedited->locallab.threshold); - assignFromKeyfile(keyFile, "Locallab", "Chromacbdl", pedited, locallab.chromacbdl, pedited->locallab.chromacbdl); - */ + assignFromKeyfile(keyFile, "Locallab", "ProtectSkins_" + std::to_string(i), pedited, locallab.protectskins.at(i), pedited->locallab.protectskins); + assignFromKeyfile(keyFile, "Locallab", "AvoidColorShift_" + std::to_string(i), pedited, locallab.avoidcolorshift.at(i), pedited->locallab.avoidcolorshift); + assignFromKeyfile(keyFile, "Locallab", "PastSatTog_" + std::to_string(i), pedited, locallab.pastsattog.at(i), pedited->locallab.pastsattog); + assignFromKeyfile(keyFile, "Locallab", "Sensiv_" + std::to_string(i), pedited, locallab.sensiv.at(i), pedited->locallab.sensiv); + assignFromKeyfile(keyFile, "Locallab", "SkinTonesCurve_" + std::to_string(i), pedited, locallab.skintonescurve.at(i), pedited->locallab.skintonescurve); + // Blur & Noise + assignFromKeyfile(keyFile, "Locallab", "Expblur_" + std::to_string(i), pedited, locallab.expblur.at(i), pedited->locallab.expblur); + assignFromKeyfile(keyFile, "Locallab", "Radius_" + std::to_string(i), pedited, locallab.radius.at(i), pedited->locallab.radius); + assignFromKeyfile(keyFile, "Locallab", "Strength_" + std::to_string(i), pedited, locallab.strength.at(i), pedited->locallab.strength); + assignFromKeyfile(keyFile, "Locallab", "Sensibn_" + std::to_string(i), pedited, locallab.sensibn.at(i), pedited->locallab.sensibn); + assignFromKeyfile(keyFile, "Locallab", "BlurMethod_" + std::to_string(i), pedited, locallab.blurMethod.at(i), pedited->locallab.blurMethod); + assignFromKeyfile(keyFile, "Locallab", "activlum_" + std::to_string(i), pedited, locallab.activlum.at(i), pedited->locallab.activlum); + // Tone Mapping + assignFromKeyfile(keyFile, "Locallab", "Exptonemap_" + std::to_string(i), pedited, locallab.exptonemap.at(i), pedited->locallab.exptonemap); + assignFromKeyfile(keyFile, "Locallab", "Stren_" + std::to_string(i), pedited, locallab.stren.at(i), pedited->locallab.stren); + assignFromKeyfile(keyFile, "Locallab", "Gamma_" + std::to_string(i), pedited, locallab.gamma.at(i), pedited->locallab.gamma); + assignFromKeyfile(keyFile, "Locallab", "Estop_" + std::to_string(i), pedited, locallab.estop.at(i), pedited->locallab.estop); + assignFromKeyfile(keyFile, "Locallab", "Scaltm_" + std::to_string(i), pedited, locallab.scaltm.at(i), pedited->locallab.scaltm); + assignFromKeyfile(keyFile, "Locallab", "Rewei_" + std::to_string(i), pedited, locallab.rewei.at(i), pedited->locallab.rewei); + assignFromKeyfile(keyFile, "Locallab", "Sensitm_" + std::to_string(i), pedited, locallab.sensitm.at(i), pedited->locallab.sensitm); + // Retinex + assignFromKeyfile(keyFile, "Locallab", "Expreti_" + std::to_string(i), pedited, locallab.expreti.at(i), pedited->locallab.expreti); + assignFromKeyfile(keyFile, "Locallab", "retinexMethod_" + std::to_string(i), pedited, locallab.retinexMethod.at(i), pedited->locallab.retinexMethod); + assignFromKeyfile(keyFile, "Locallab", "Str_" + std::to_string(i), pedited, locallab.str.at(i), pedited->locallab.str); + assignFromKeyfile(keyFile, "Locallab", "Chrrt_" + std::to_string(i), pedited, locallab.chrrt.at(i), pedited->locallab.chrrt); + assignFromKeyfile(keyFile, "Locallab", "Neigh_" + std::to_string(i), pedited, locallab.neigh.at(i), pedited->locallab.neigh); + assignFromKeyfile(keyFile, "Locallab", "Vart_" + std::to_string(i), pedited, locallab.vart.at(i), pedited->locallab.vart); + assignFromKeyfile(keyFile, "Locallab", "Sensih_" + std::to_string(i), pedited, locallab.sensih.at(i), pedited->locallab.sensih); + assignFromKeyfile(keyFile, "Locallab", "TgainCurve_" + std::to_string(i), pedited, locallab.localTgaincurve.at(i), pedited->locallab.localTgaincurve); + assignFromKeyfile(keyFile, "Locallab", "Inversret_" + std::to_string(i), pedited, locallab.inversret.at(i), pedited->locallab.inversret); + // Sharpening + assignFromKeyfile(keyFile, "Locallab", "Expsharp_" + std::to_string(i), pedited, locallab.expsharp.at(i), pedited->locallab.expsharp); + assignFromKeyfile(keyFile, "Locallab", "Sharradius_" + std::to_string(i), pedited, locallab.sharradius.at(i), pedited->locallab.sharradius); + assignFromKeyfile(keyFile, "Locallab", "Sharamount_" + std::to_string(i), pedited, locallab.sharamount.at(i), pedited->locallab.sharamount); + assignFromKeyfile(keyFile, "Locallab", "Shardamping_" + std::to_string(i), pedited, locallab.shardamping.at(i), pedited->locallab.shardamping); + assignFromKeyfile(keyFile, "Locallab", "Shariter_" + std::to_string(i), pedited, locallab.shariter.at(i), pedited->locallab.shariter); + assignFromKeyfile(keyFile, "Locallab", "Sensisha_" + std::to_string(i), pedited, locallab.sensisha.at(i), pedited->locallab.sensisha); + assignFromKeyfile(keyFile, "Locallab", "Inverssha_" + std::to_string(i), pedited, locallab.inverssha.at(i), pedited->locallab.inverssha); + // Contrast by detail levels + assignFromKeyfile(keyFile, "Locallab", "Expcbdl_" + std::to_string(i), pedited, locallab.expcbdl.at(i), pedited->locallab.expcbdl); + + for (int j = 0; j < 5; j ++) { + assignFromKeyfile(keyFile, "Locallab", "Mult" + std::to_string(j) + "_" + std::to_string(i), pedited, locallab.mult[j].at(i), pedited->locallab.mult[j]); + } + + assignFromKeyfile(keyFile, "Locallab", "Chromacbdl_" + std::to_string(i), pedited, locallab.chromacbdl.at(i), pedited->locallab.chromacbdl); + assignFromKeyfile(keyFile, "Locallab", "Threshold_" + std::to_string(i), pedited, locallab.threshold.at(i), pedited->locallab.threshold); + assignFromKeyfile(keyFile, "Locallab", "Sensicb_" + std::to_string(i), pedited, locallab.sensicb.at(i), pedited->locallab.sensicb); + // Denoise + assignFromKeyfile(keyFile, "Locallab", "Expdenoi_" + std::to_string(i), pedited, locallab.expdenoi.at(i), pedited->locallab.expdenoi); + assignFromKeyfile(keyFile, "Locallab", "noiselumf_" + std::to_string(i), pedited, locallab.noiselumf.at(i), pedited->locallab.noiselumf); + assignFromKeyfile(keyFile, "Locallab", "noiselumc_" + std::to_string(i), pedited, locallab.noiselumc.at(i), pedited->locallab.noiselumc); + assignFromKeyfile(keyFile, "Locallab", "noiselumdetail_" + std::to_string(i), pedited, locallab.noiselumdetail.at(i), pedited->locallab.noiselumdetail); + assignFromKeyfile(keyFile, "Locallab", "noiselequal_" + std::to_string(i), pedited, locallab.noiselequal.at(i), pedited->locallab.noiselequal); + assignFromKeyfile(keyFile, "Locallab", "noisechrof_" + std::to_string(i), pedited, locallab.noisechrof.at(i), pedited->locallab.noisechrof); + assignFromKeyfile(keyFile, "Locallab", "noisechroc_" + std::to_string(i), pedited, locallab.noisechroc.at(i), pedited->locallab.noisechroc); + assignFromKeyfile(keyFile, "Locallab", "Adjblur_" + std::to_string(i), pedited, locallab.adjblur.at(i), pedited->locallab.adjblur); + assignFromKeyfile(keyFile, "Locallab", "Bilateral_" + std::to_string(i), pedited, locallab.bilateral.at(i), pedited->locallab.bilateral); + assignFromKeyfile(keyFile, "Locallab", "Sensiden_" + std::to_string(i), pedited, locallab.sensiden.at(i), pedited->locallab.sensiden); + assignFromKeyfile(keyFile, "Locallab", "Avoid_" + std::to_string(i), pedited, locallab.avoid.at(i), pedited->locallab.avoid); + } } diff --git a/rtengine/procparams.h b/rtengine/procparams.h index d09de3e99..beebca62d 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -934,90 +934,76 @@ struct LocallabParams { std::vector> HHcurve; std::vector invers; // Exposure - - std::vector excurve; - std::vector localTgaincurve; - std::vector localTgaincurverab; - std::vector skintonescurve; - - /* - - int adjblur; - int warm; - int expcomp; - int black; - int hlcompr; - int hlcomprthresh; - int shcompr; - int pastels; - int saturated; - Threshold psthreshold; - bool protectskins; - bool avoidcolorshift; - bool pastsattog; - int sensiv; - int noiselumf; - int noiselumc; - int noiselumdetail; - int noiselequal; - int noisechrodetail; - int bilateral; - int sensiden; - int noisechrof; - int noisechroc; - int sharradius; - int sharamount; - int shardamping; - int shariter; - int sensiex; - int sensih; - int retrab; - int sensicb; - int sensiexclu; - int struc; - int sensibn; - int sensitm; - int sensisha; - int radius; - int strength; - int stren; - int gamma; - int estop; - int scaltm; - int rewei; - bool avoid; - Glib::ustring retinexMethod; - Glib::ustring blurMethod; - Glib::ustring dustMethod; - bool cutpast; - bool lastdust; - bool activlum; - bool inversrad; - bool inversret; - bool inverssha; - double hueref; - double huerefblur; - double chromaref; - double lumaref; - double sobelref; - int str; - int neigh; - int nbspot; - int anbspot; - int vart; - int chrrt; - double mult[5]; - bool expexpose; - bool expvibrance; - bool expblur; - bool exptonemap; - bool expreti; - bool expsharp; - bool expcbdl; - bool expdenoi; - double threshold; - int chromacbdl; - */ + std::vector expexpose; + std::vector expcomp; + std::vector hlcompr; + std::vector hlcomprthresh; + std::vector black; + std::vector shcompr; + std::vector warm; + std::vector sensiex; + std::vector> excurve; + // Vibrance + std::vector expvibrance; + std::vector saturated; + std::vector pastels; + std::vector> psthreshold; + std::vector protectskins; + std::vector avoidcolorshift; + std::vector pastsattog; + std::vector sensiv; + std::vector> skintonescurve; + // Blur & Noise + std::vector expblur; + std::vector radius; + std::vector strength; + std::vector sensibn; + std::vector blurMethod; + std::vector activlum; + // Tone Mapping + std::vector exptonemap; + std::vector stren; + std::vector gamma; + std::vector estop; + std::vector scaltm; + std::vector rewei; + std::vector sensitm; + // Retinex + std::vector expreti; + std::vector retinexMethod; + std::vector str; + std::vector chrrt; + std::vector neigh; + std::vector vart; + std::vector sensih; + std::vector> localTgaincurve; + std::vector inversret; + // Sharpening + std::vector expsharp; + std::vector sharradius; + std::vector sharamount; + std::vector shardamping; + std::vector shariter; + std::vector sensisha; + std::vector inverssha; + // Contrast by detail levels + std::vector expcbdl; + std::vector mult[5]; + std::vector chromacbdl; + std::vector threshold; + std::vector sensicb; + // Denoise + std::vector expdenoi; + std::vector noiselumf; + std::vector noiselumc; + std::vector noiselumdetail; + std::vector noiselequal; + std::vector noisechrof; + std::vector noisechroc; + std::vector adjblur; + std::vector bilateral; + std::vector sensiden; + std::vector avoid; LocallabParams(); diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index 33168b055..473494193 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -521,7 +521,7 @@ Locallab::Locallab(): cTgainshape = static_cast(LocalcurveEditorgainT->addCurve(CT_Flat, "", nullptr, false, false)); cTgainshape->setIdentityValue(0.); - cTgainshape->setResetCurve(FlatCurveType(default_params.localTgaincurve.at(0)), default_params.localTgaincurve); + cTgainshape->setResetCurve(FCT_MinMaxCPoints, {(double)FCT_MinMaxCPoints, 0.0, 0.12, 0.35, 0.35, 0.70, 0.50, 0.35, 0.35, 1.00, 0.12, 0.35, 0.35}); cTgainshape->setTooltip(M("TP_RETINEX_GAINTRANSMISSION_TOOLTIP")); LocalcurveEditorgainTrab->setCurveListener(this); @@ -532,7 +532,7 @@ Locallab::Locallab(): cTgainshaperab->setIdentityValue(0.); - cTgainshaperab->setResetCurve(FlatCurveType(default_params.localTgaincurverab.at(0)), default_params.localTgaincurverab); + // cTgainshaperab->setResetCurve(FlatCurveType(default_params.localTgaincurverab.at(0)), default_params.localTgaincurverab); cTgainshaperab->setTooltip(M("TP_RETINEX_GAINTRANSMISSIONRAB_TOOLTIP")); LocalcurveEditorgainT->curveListComplete(); @@ -1002,7 +1002,10 @@ void Locallab::foldAllButMe(GdkEventButton* event, MyExpander *expander) void Locallab::enableToggled(MyExpander *expander) { - if (listener) { + // TODO Locallab printf + printf("enableToggled\n"); + + if (getEnabled() && listener) { rtengine::ProcEvent event = NUMOFEVENTS; if (expander == expcolor) { @@ -1073,6 +1076,11 @@ void Locallab::updateToolState(std::vector &tpOpen) void Locallab::neutral_pressed() { + // TODO Locallab printf + printf("neutral_pressed\n"); + + // TODO Locallab To be deleted + /* Smethod->set_active(0); shapemethod->set_active(0); Exclumethod->set_active(0); @@ -1171,73 +1179,89 @@ void Locallab::neutral_pressed() noisechrodetail->resetValue(false); bilateral->resetValue(false); sensiden->resetValue(false); + */ } void Locallab::lumaneutralPressed() { + // TODO Locallab printf + printf("lumaneutralPressed\n"); for (int i = 0; i < 5; i++) { multiplier[i]->setValue(100); - adjusterChanged(multiplier[i], 100); } + + // Raise event (only for first multiplier because associated event concerns all multipliers) + adjusterChanged(multiplier[0], multiplier[0]->getValue()); // Value isn't used } void Locallab::lumacontrastPlusPressed() { + // TODO Locallab printf + printf("lumacontrastPlusPressed\n"); for (int i = 0; i < 5; i++) { float inc = (5 - i); multiplier[i]->setValue(multiplier[i]->getValue() + inc); - adjusterChanged(multiplier[i], multiplier[i]->getValue()); } + + // Raise event (only for first multiplier because associated event concerns all multipliers) + adjusterChanged(multiplier[0], multiplier[0]->getValue()); // Value isn't used } void Locallab::lumacontrastMinusPressed() { + // TODO Locallab printf + printf("lumacontrastMinusPressed\n"); for (int i = 0; i < 5; i++) { float inc = - (5 - i); multiplier[i]->setValue(multiplier[i]->getValue() + inc); - adjusterChanged(multiplier[i], multiplier[i]->getValue()); } + + // Raise event (only for first multiplier because associated event concerns all multipliers) + adjusterChanged(multiplier[0], multiplier[0]->getValue()); // Value isn't used } - -/* -void Locallab::autoOpenCurve() -{ - cTgainshape->openIfNonlinear(); - -} -*/ - int localChangedUI(void* data) { + // TODO Locallab printf + printf("localChangedUI\n"); + /* GThreadLock lock; (static_cast(data))->localComputed_(); + */ return 0; } int localretChangedUI(void* data) { + // TODO Locallab printf + printf("localretChangedUI\n"); + /* GThreadLock lock; (static_cast(data))->localretComputed_(); + */ return 0; } bool Locallab::localretComputed_() { + // TODO Locallab printf + printf("localretComputed_\n"); + + /* disableListener(); //Reticurv -//update GUI and MIP specially for curve + //update GUI and MIP specially for curve int *s_datc; s_datc = new int[70]; @@ -1393,7 +1417,7 @@ bool Locallab::localretComputed_() } -// printf("G2 anbspot=%i\n", anbspot->getValue()); + // printf("G2 anbspot=%i\n", anbspot->getValue()); if (listener) { //for all sliders listener->panelChanged(Evlocallabanbspot, ""); //anbspot->getTextValue()); @@ -1434,7 +1458,7 @@ bool Locallab::localretComputed_() if (listener) {//for excurve listener->panelChanged(Evlocallabshapeexpos, M("")); } - + */ return false; @@ -1442,7 +1466,11 @@ bool Locallab::localretComputed_() bool Locallab::localComputed_() { -//update GUI and MIP + // TODO Locallab printf + printf("localComputed_\n"); + + /* + //update GUI and MIP disableListener(); //size spot @@ -1563,7 +1591,7 @@ bool Locallab::localComputed_() activlum->set_active(true); } -//TM + //TM stren->setValue(nextdatasp[49]); gamma->setValue(nextdatasp[50]); estop->setValue(nextdatasp[51]); @@ -1915,7 +1943,7 @@ bool Locallab::localComputed_() // -// printf("G1 maj anbspot=%i cretirab=%f\n", anbspot->getValue(), cretirab.at(5)); + // printf("G1 maj anbspot=%i cretirab=%f\n", anbspot->getValue(), cretirab.at(5)); //add events for each cases whitout that localalb does not work... @@ -2065,6 +2093,7 @@ bool Locallab::localComputed_() if (listener) {//for expander cbdl listener->panelChanged(EvLocenaexpose, M("")); } + */ return false; @@ -2072,7 +2101,10 @@ bool Locallab::localComputed_() void Locallab::localChanged(int **datasp, std::string datastr, std::string ll_str, std::string lh_str, std::string cc_str, std::string hh_str, std::string sk_str, std::string ps_str, std::string ex_str, int sp, int maxdat) { + // TODO Locallab printf + printf("localChanged\n"); + /* nextstr = datastr; nextll_str = ll_str; nextlh_str = lh_str; @@ -2088,10 +2120,15 @@ void Locallab::localChanged(int **datasp, std::string datastr, std::string ll_st } g_idle_add(localChangedUI, this); + */ } void Locallab::localretChanged(int **datasp, std::string datastr, std::string ll_str, std::string lh_str, std::string cc_str, std::string hh_str, std::string sk_str, std::string ps_str, std::string ex_str, int sp, int maxdat) { + // TODO Locallab printf + printf("localretChanged\n"); + + /* nextlength = maxdat; nextstr2 = datastr; nextll_str2 = ll_str; @@ -2103,6 +2140,7 @@ void Locallab::localretChanged(int **datasp, std::string datastr, std::string ll nextex_str2 = ex_str; g_idle_add(localretChangedUI, this); + */ } @@ -2155,7 +2193,7 @@ void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited) sensi->setEditedState(pedited->locallab.sensi ? Edited : UnEdited); if (!pedited->locallab.qualitycurveMethod) { - qualitycurveMethod->set_active(3); + qualitycurveMethod->set_active_text(M("GENERAL_UNCHANGED")); } llshape->setUnChanged(!pedited->locallab.llcurve); @@ -2165,7 +2203,95 @@ void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited) invers->set_inconsistent(multiImage && !pedited->locallab.invers); // Exposure + expexpose->set_inconsistent(!pedited->locallab.expexpose); + expcomp->setEditedState(pedited->locallab.expcomp ? Edited : UnEdited); + hlcompr->setEditedState(pedited->locallab.hlcompr ? Edited : UnEdited); + hlcomprthresh->setEditedState(pedited->locallab.hlcomprthresh ? Edited : UnEdited); + black->setEditedState(pedited->locallab.black ? Edited : UnEdited); + warm->setEditedState(pedited->locallab.warm ? Edited : UnEdited); + shcompr->setEditedState(pedited->locallab.shcompr ? Edited : UnEdited); + sensiex->setEditedState(pedited->locallab.sensiex ? Edited : UnEdited); + shapeexpos->setUnChanged(!pedited->locallab.excurve); + // Vibrance + expvibrance->set_inconsistent(!pedited->locallab.expvibrance); + saturated->setEditedState(pedited->locallab.saturated ? Edited : UnEdited); + pastels->setEditedState(pedited->locallab.pastels ? Edited : UnEdited); + psThreshold->setEditedState(pedited->locallab.psthreshold ? Edited : UnEdited); + protectSkins->set_inconsistent(!pedited->locallab.protectskins); + avoidColorShift->set_inconsistent(!pedited->locallab.avoidcolorshift); + pastSatTog->set_inconsistent(!pedited->locallab.pastsattog); + sensiv->setEditedState(pedited->locallab.sensiv ? Edited : UnEdited); + skinTonesCurve->setUnChanged(!pedited->locallab.skintonescurve); + + // Blur & Noise + expblur->set_inconsistent(!pedited->locallab.expblur); + radius->setEditedState(pedited->locallab.radius ? Edited : UnEdited); + strength->setEditedState(pedited->locallab.strength ? Edited : UnEdited); + sensibn->setEditedState(pedited->locallab.sensibn ? Edited : UnEdited); + + if (!pedited->locallab.blurMethod) { + blurMethod->set_active_text(M("GENERAL_UNCHANGED")); + } + + activlum->set_inconsistent(multiImage && !pedited->locallab.activlum); + + // Tone Mapping + exptonemap->set_inconsistent(!pedited->locallab.exptonemap); + stren->setEditedState(pedited->locallab.stren ? Edited : UnEdited); + gamma->setEditedState(pedited->locallab.gamma ? Edited : UnEdited); + estop->setEditedState(pedited->locallab.estop ? Edited : UnEdited); + scaltm->setEditedState(pedited->locallab.scaltm ? Edited : UnEdited); + rewei->setEditedState(pedited->locallab.rewei ? Edited : UnEdited); + sensitm->setEditedState(pedited->locallab.sensitm ? Edited : UnEdited); + + // Retinex + expreti->set_inconsistent(!pedited->locallab.expreti); + + if (!pedited->locallab.retinexMethod) { + retinexMethod->set_active_text(M("GENERAL_UNCHANGED")); + } + + str->setEditedState(pedited->locallab.str ? Edited : UnEdited); + chrrt->setEditedState(pedited->locallab.chrrt ? Edited : UnEdited); + neigh->setEditedState(pedited->locallab.neigh ? Edited : UnEdited); + vart->setEditedState(pedited->locallab.vart ? Edited : UnEdited); + sensih->setEditedState(pedited->locallab.sensih ? Edited : UnEdited); + cTgainshape->setUnChanged(!pedited->locallab.localTgaincurve); + inversret->set_inconsistent(multiImage && !pedited->locallab.inversret); + + // Sharpening + expsharp->set_inconsistent(!pedited->locallab.expsharp); + sharradius->setEditedState(pedited->locallab.sharradius ? Edited : UnEdited); + sharamount->setEditedState(pedited->locallab.sharamount ? Edited : UnEdited); + shardamping->setEditedState(pedited->locallab.shardamping ? Edited : UnEdited); + shariter->setEditedState(pedited->locallab.shariter ? Edited : UnEdited); + sensisha->setEditedState(pedited->locallab.sensisha ? Edited : UnEdited); + inverssha->set_inconsistent(multiImage && !pedited->locallab.inverssha); + + // Contrast by detail levels + expcbdl->set_inconsistent(!pedited->locallab.expcbdl); + + for (int i = 0; i < 5; i++) { + multiplier[i]->setEditedState(pedited->locallab.mult[i] ? Edited : UnEdited); + } + + chromacbdl->setEditedState(pedited->locallab.chromacbdl ? Edited : UnEdited); + threshold->setEditedState(pedited->locallab.threshold ? Edited : UnEdited); + sensicb->setEditedState(pedited->locallab.sensicb ? Edited : UnEdited); + + // Denoise + expdenoi->set_inconsistent(!pedited->locallab.expdenoi); + noiselumf->setEditedState(pedited->locallab.noiselumf ? Edited : UnEdited); + noiselumc->setEditedState(pedited->locallab.noiselumc ? Edited : UnEdited); + noiselumdetail->setEditedState(pedited->locallab.noiselumdetail ? Edited : UnEdited); + noiselequal->setEditedState(pedited->locallab.noiselequal ? Edited : UnEdited); + noisechrof->setEditedState(pedited->locallab.noisechrof ? Edited : UnEdited); + noisechroc->setEditedState(pedited->locallab.noisechroc ? Edited : UnEdited); + adjblur->setEditedState(pedited->locallab.adjblur ? Edited : UnEdited); + bilateral->setEditedState(pedited->locallab.bilateral ? Edited : UnEdited); + sensiden->setEditedState(pedited->locallab.sensiden ? Edited : UnEdited); + avoid->set_inconsistent(multiImage && !pedited->locallab.avoid); } setEnabled(pp->locallab.enabled); @@ -2254,384 +2380,6 @@ void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited) // Enable all listeners enableListener(); - - /* - anbspot->hide(); - hueref->hide(); - huerefblur->hide(); - chromaref->hide(); - lumaref->hide(); - sobelref->hide(); - centerXbuf->hide(); - centerYbuf->hide(); - - if (pedited) { - adjblur->setEditedState(pedited->locallab.adjblur ? Edited : UnEdited); - warm->setEditedState(pedited->locallab.warm ? Edited : UnEdited); - expcomp->setEditedState(pedited->locallab.expcomp ? Edited : UnEdited); - hlcompr->setEditedState(pedited->locallab.hlcompr ? Edited : UnEdited); - hlcomprthresh->setEditedState(pedited->locallab.hlcomprthresh ? Edited : UnEdited); - black->setEditedState(pedited->locallab.black ? Edited : UnEdited); - shcompr->setEditedState(pedited->locallab.shcompr ? Edited : UnEdited); - sensiex->setEditedState(pedited->locallab.sensiex ? Edited : UnEdited); - sharradius->setEditedState(pedited->locallab.sharradius ? Edited : UnEdited); - sharamount->setEditedState(pedited->locallab.sharamount ? Edited : UnEdited); - shardamping->setEditedState(pedited->locallab.shardamping ? Edited : UnEdited); - shariter->setEditedState(pedited->locallab.shariter ? Edited : UnEdited); - sensisha->setEditedState(pedited->locallab.sensisha ? Edited : UnEdited); - noiselumf->setEditedState(pedited->locallab.noiselumf ? Edited : UnEdited); - noiselumc->setEditedState(pedited->locallab.noiselumc ? Edited : UnEdited); - noiselumdetail->setEditedState(pedited->locallab.noiselumdetail ? Edited : UnEdited); - noiselequal->setEditedState(pedited->locallab.noiselequal ? Edited : UnEdited); - noisechrof->setEditedState(pedited->locallab.noisechrof ? Edited : UnEdited); - noisechroc->setEditedState(pedited->locallab.noisechroc ? Edited : UnEdited); - noisechrodetail->setEditedState(pedited->locallab.noisechrodetail ? Edited : UnEdited); - bilateral->setEditedState(pedited->locallab.bilateral ? Edited : UnEdited); - sensiden->setEditedState(pedited->locallab.sensiden ? Edited : UnEdited); - - pastels->setEditedState(pedited->locallab.pastels ? Edited : UnEdited); - saturated->setEditedState(pedited->locallab.saturated ? Edited : UnEdited); - psThreshold->setEditedState(pedited->locallab.psthreshold ? Edited : UnEdited); - protectSkins->set_inconsistent(!pedited->locallab.protectskins); - avoidColorShift->set_inconsistent(!pedited->locallab.avoidcolorshift); - pastSatTog->set_inconsistent(!pedited->locallab.pastsattog); - skinTonesCurve->setUnChanged(!pedited->locallab.skintonescurve); - sensiv->setEditedState(pedited->locallab.sensiv ? Edited : UnEdited); - - for (int i = 0; i < 5; i++) { - multiplier[i]->setEditedState(pedited->locallab.mult[i] ? Edited : UnEdited); - } - - threshold->setEditedState(pedited->locallab.threshold ? Edited : UnEdited); - chromacbdl->setEditedState(pedited->locallab.chromacbdl ? Edited : UnEdited); - sensiexclu->setEditedState(pedited->locallab.sensiexclu ? Edited : UnEdited); - struc->setEditedState(pedited->locallab.struc ? Edited : UnEdited); - sensih->setEditedState(pedited->locallab.sensih ? Edited : UnEdited); - retrab->setEditedState(pedited->locallab.retrab ? Edited : UnEdited); - sensicb->setEditedState(pedited->locallab.sensicb ? Edited : UnEdited); - sensibn->setEditedState(pedited->locallab.sensibn ? Edited : UnEdited); - sensitm->setEditedState(pedited->locallab.sensitm ? Edited : UnEdited); - radius->setEditedState(pedited->locallab.radius ? Edited : UnEdited); - strength->setEditedState(pedited->locallab.strength ? Edited : UnEdited); - stren->setEditedState(pedited->locallab.stren ? Edited : UnEdited); - gamma->setEditedState(pedited->locallab.gamma ? Edited : UnEdited); - estop->setEditedState(pedited->locallab.estop ? Edited : UnEdited); - scaltm->setEditedState(pedited->locallab.scaltm ? Edited : UnEdited); - rewei->setEditedState(pedited->locallab.rewei ? Edited : UnEdited); - hueref->setEditedState(pedited->locallab.hueref ? Edited : UnEdited); - huerefblur->setEditedState(pedited->locallab.huerefblur ? Edited : UnEdited); - chromaref->setEditedState(pedited->locallab.chromaref ? Edited : UnEdited); - lumaref->setEditedState(pedited->locallab.lumaref ? Edited : UnEdited); - sobelref->setEditedState(pedited->locallab.sobelref ? Edited : UnEdited); - transit->setEditedState(pedited->locallab.transit ? Edited : UnEdited); - str->setEditedState(pedited->locallab.str ? Edited : UnEdited); - neigh->setEditedState(pedited->locallab.neigh ? Edited : UnEdited); - vart->setEditedState(pedited->locallab.vart ? Edited : UnEdited); - chrrt->setEditedState(pedited->locallab.chrrt ? Edited : UnEdited); - set_inconsistent(multiImage && !pedited->locallab.enabled); - avoid->set_inconsistent(multiImage && !pedited->locallab.avoid); - activlum->set_inconsistent(multiImage && !pedited->locallab.activlum); - cutpast->set_inconsistent(multiImage && !pedited->locallab.cutpast); - lastdust->set_inconsistent(multiImage && !pedited->locallab.lastdust); - inversrad->set_inconsistent(multiImage && !pedited->locallab.inversrad); - inverssha->set_inconsistent(multiImage && !pedited->locallab.inverssha); - cTgainshape->setUnChanged(!pedited->locallab.localTgaincurve); - shapeexpos->setUnChanged(!pedited->locallab.excurve); - inversret->set_inconsistent(multiImage && !pedited->locallab.inversret); - cTgainshaperab->setUnChanged(!pedited->locallab.localTgaincurverab); - - expexpose->set_inconsistent(!pedited->locallab.expexpose); - expvibrance->set_inconsistent(!pedited->locallab.expvibrance); - expblur->set_inconsistent(!pedited->locallab.expblur); - exptonemap->set_inconsistent(!pedited->locallab.exptonemap); - expreti->set_inconsistent(!pedited->locallab.expreti); - expsharp->set_inconsistent(!pedited->locallab.expsharp); - expcbdl->set_inconsistent(!pedited->locallab.expcbdl); - expdenoi->set_inconsistent(!pedited->locallab.expdenoi); - - if (!pedited->locallab.Smethod) { - Smethod->set_active_text(M("GENERAL_UNCHANGED")); - } - - if (!pedited->locallab.shapemethod) { - shapemethod->set_active_text(M("GENERAL_UNCHANGED")); - } - - if (!pedited->locallab.Exclumethod) { - Exclumethod->set_active_text(M("GENERAL_UNCHANGED")); - } - - if (!pedited->locallab.retinexMethod) { - retinexMethod->set_active_text(M("GENERAL_UNCHANGED")); - } - - if (!pedited->locallab.blurMethod) { - blurMethod->set_active_text(M("GENERAL_UNCHANGED")); - } - - if (!pedited->locallab.dustMethod) { - dustMethod->set_active_text(M("GENERAL_UNCHANGED")); - } - - if (!pedited->locallab.qualityMethod) { - qualityMethod->set_active_text(M("GENERAL_UNCHANGED")); - } - - } - - setEnabled(pp->locallab.enabled); - - retinexMethodConn.block(true); - qualitycurveMethodConn.block(true); - blurMethodConn.block(true); - dustMethodConn.block(true); - - avoidConn.block(true); - avoid->set_active(pp->locallab.avoid); - avoidConn.block(false); - activlumConn.block(true); - activlum->set_active(pp->locallab.activlum); - activlumConn.block(false); - cutpastConn.block(true); - cutpast->set_active(pp->locallab.cutpast); - cutpastConn.block(false); - lastdustConn.block(true); - lastdust->set_active(pp->locallab.lastdust); - lastdustConn.block(false); - inversradConn.block(true); - inversrad->set_active(pp->locallab.inversrad); - inversradConn.block(false); - inversretConn.block(true); - inversret->set_active(pp->locallab.inversret); - inversretConn.block(false); - inversshaConn.block(true); - inverssha->set_active(pp->locallab.inverssha); - inversshaConn.block(false); - - adjblur->setValue(pp->locallab.adjblur); - warm->setValue(pp->locallab.warm); - expcomp->setValue(pp->locallab.expcomp); - hlcompr->setValue(pp->locallab.hlcompr); - hlcomprthresh->setValue(pp->locallab.hlcomprthresh); - black->setValue(pp->locallab.black); - shcompr->setValue(pp->locallab.shcompr); - shcompr->set_sensitive(!((int)black->getValue() == 0)); //at black=0 shcompr value has no effect - sensiexclu->setValue(pp->locallab.sensiexclu); - struc->setValue(pp->locallab.struc); - - sharradius->setValue(pp->locallab.sharradius); - sharamount->setValue(pp->locallab.sharamount); - shardamping->setValue(pp->locallab.shardamping); - shariter->setValue(pp->locallab.shariter); - sensisha->setValue(pp->locallab.sensisha); - sensi->setValue(pp->locallab.sensi); - sensiex->setValue(pp->locallab.sensiex); - sensih->setValue(pp->locallab.sensih); - retrab->setValue(pp->locallab.retrab); - sensicb->setValue(pp->locallab.sensicb); - sensibn->setValue(pp->locallab.sensibn); - sensitm->setValue(pp->locallab.sensitm); - transit->setValue(pp->locallab.transit); - radius->setValue(pp->locallab.radius); - strength->setValue(pp->locallab.strength); - stren->setValue(pp->locallab.stren); - gamma->setValue(pp->locallab.gamma); - estop->setValue(pp->locallab.estop); - scaltm->setValue(pp->locallab.scaltm); - rewei->setValue(pp->locallab.rewei); - str->setValue(pp->locallab.str); - neigh->setValue(pp->locallab.neigh); - nbspot->setValue(pp->locallab.nbspot); - anbspot->setValue(pp->locallab.anbspot); - hueref->setValue(pp->locallab.hueref); - huerefblur->setValue(pp->locallab.huerefblur); - chromaref->setValue(pp->locallab.chromaref); - lumaref->setValue(pp->locallab.lumaref); - sobelref->setValue(pp->locallab.sobelref); - vart->setValue(pp->locallab.vart); - chrrt->setValue(pp->locallab.chrrt); - cTgainshape->setCurve(pp->locallab.localTgaincurve); - cTgainshaperab->setCurve(pp->locallab.localTgaincurverab); - shapeexpos->setCurve(pp->locallab.excurve); - lastactivlum = pp->locallab.activlum; - lastanbspot = pp->locallab.anbspot; - noiselumf->setValue(pp->locallab.noiselumf); - noiselumc->setValue(pp->locallab.noiselumc); - noiselumdetail->setValue(pp->locallab.noiselumdetail); - noiselequal->setValue(pp->locallab.noiselequal); - noisechrof->setValue(pp->locallab.noisechrof); - noisechroc->setValue(pp->locallab.noisechroc); - noisechrodetail->setValue(pp->locallab.noisechrodetail); - bilateral->setValue(pp->locallab.bilateral); - sensiden->setValue(pp->locallab.sensiden); - expexpose->setEnabled(pp->locallab.expexpose); - expvibrance->setEnabled(pp->locallab.expvibrance); - sensiv->setValue(pp->locallab.sensiv); - - pskinsconn.block(true); - protectSkins->set_active(pp->locallab.protectskins); - pskinsconn.block(false); - lastProtectSkins = pp->locallab.protectskins; - - ashiftconn.block(true); - avoidColorShift->set_active(pp->locallab.avoidcolorshift); - ashiftconn.block(false); - lastAvoidColorShift = pp->locallab.avoidcolorshift; - - // spotduplicated->set_active(pp->locallab.spotduplicated); - lastspotduplicated = pp->locallab.spotduplicated; - - pastsattogconn.block(true); - pastSatTog->set_active(pp->locallab.pastsattog); - pastsattogconn.block(false); - lastPastSatTog = pp->locallab.pastsattog; - - pastels->setValue(pp->locallab.pastels); - psThreshold->setValue (pp->locallab.psthreshold); - - if (lastPastSatTog) { - // Link both slider, so we set saturated and psThresholds unsensitive - psThreshold->set_sensitive(false); - saturated->set_sensitive(false); - saturated->setValue(pp->locallab.pastels); // Pastels and Saturated are linked - } else { - // Separate sliders, so we set saturated and psThresholds sensitive again - psThreshold->set_sensitive(true); - saturated->set_sensitive(true); - saturated->setValue(pp->locallab.saturated); // Pastels and Saturated are separate - } - - skinTonesCurve->setCurve(pp->locallab.skintonescurve); - - - - expblur->setEnabled(pp->locallab.expblur); - exptonemap->setEnabled(pp->locallab.exptonemap); - expreti->setEnabled(pp->locallab.expreti); - expsharp->setEnabled(pp->locallab.expsharp); - expcbdl->setEnabled(pp->locallab.expcbdl); - expdenoi->setEnabled(pp->locallab.expdenoi); - - for (int i = 0; i < 5; i++) { - multiplier[i]->setValue(pp->locallab.mult[i]); - } - - threshold->setValue(pp->locallab.threshold); - chromacbdl->setValue(pp->locallab.chromacbdl); - - lastavoid = pp->locallab.avoid; - lastinvers = pp->locallab.invers; - lastcutpast = pp->locallab.cutpast; - lastlastdust = pp->locallab.lastdust; - lastcurvactiv = pp->locallab.curvactiv; - lastinversrad = pp->locallab.inversrad; - lastinversret = pp->locallab.inversret; - lastinverssha = pp->locallab.inverssha; - activlumChanged(); - inversChanged(); - cutpastChanged(); - lastdustChanged(); - curvactivChanged(); - inversradChanged(); - inversretChanged(); - inversshaChanged(); - - // updateGeometry(pp->locallab.centerX, pp->locallab.centerY, pp->locallab.circrad, pp->locallab.locY, pp->locallab.degree, pp->locallab.locX, pp->locallab.locYT, pp->locallab.locXL); - - if (pp->locallab.shapemethod == "ELI") { - shapemethod->set_active(0); - } else if (pp->locallab.shapemethod == "RECT") { - shapemethod->set_active(1); - } - - shapemethodChanged(); - - if (pp->locallab.Smethod == "IND") { - Smethod->set_active(0); - } else if (pp->locallab.Smethod == "SYM") { - Smethod->set_active(1); - } else if (pp->locallab.Smethod == "INDSL") { - Smethod->set_active(2); - } else if (pp->locallab.Smethod == "SYMSL") { - Smethod->set_active(3); - } - - - SmethodChanged(); - - if (pp->locallab.Exclumethod == "norm") { - Exclumethod->set_active(0); - } else if (pp->locallab.Exclumethod == "exc") { - Exclumethod->set_active(1); - } - - ExclumethodChanged(); - - if (pp->locallab.retinexMethod == "low") { - retinexMethod->set_active(0); - } else if (pp->locallab.retinexMethod == "uni") { - retinexMethod->set_active(1); - } else if (pp->locallab.retinexMethod == "high") { - retinexMethod->set_active(2); - } - - retinexMethodChanged(); - - if (pp->locallab.blurMethod == "norm") { - blurMethod->set_active(0); - } else if (pp->locallab.blurMethod == "inv") { - blurMethod->set_active(1); - } else if (pp->locallab.blurMethod == "sym") { - blurMethod->set_active(2); - } - - blurMethodChanged(); - blurMethodConn.block(false); - - if (pp->locallab.dustMethod == "cop") { - dustMethod->set_active(0); - } else if (pp->locallab.dustMethod == "mov") { - dustMethod->set_active(1); - } else if (pp->locallab.dustMethod == "pas") { - dustMethod->set_active(2); - } - - dustMethodChanged(); - - if (pp->locallab.qualityMethod == "std") { - qualityMethod->set_active(0); - } else if (pp->locallab.qualityMethod == "enh") { - qualityMethod->set_active(1); - } else if (pp->locallab.qualityMethod == "enhden") { - qualityMethod->set_active(2); - } - - qualityMethodChanged(); - - anbspot->hide(); - hueref->hide(); - huerefblur->hide(); - chromaref->hide(); - lumaref->hide(); - sobelref->hide(); - centerXbuf->hide(); - centerYbuf->hide(); - - if (pp->locallab.Smethod == "SYM" || pp->locallab.Smethod == "SYMSL") { - locXL->setValue(locX->getValue()); - locYT->setValue(locY->getValue()); - } else if (pp->locallab.Smethod == "LOC") { - locXL->setValue(locX->getValue()); - locYT->setValue(locX->getValue()); - locY->setValue(locX->getValue()); - } else if (pp->locallab.Smethod == "INDSL" || pp->locallab.Smethod == "IND") { - locX->setValue(pp->locallab.locX); - locY->setValue(pp->locallab.locY); - locXL->setValue(pp->locallab.locXL); - locYT->setValue(pp->locallab.locYT); - - } - */ } void Locallab::write(ProcParams* pp, ParamsEdited* pedited) @@ -2703,6 +2451,80 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pp->locallab.HHcurve.push_back({(double)FCT_MinMaxCPoints, 0.0, 0.50, 0.35, 0.35, 0.166, 0.50, 0.35, 0.35, 0.333, 0.50, 0.35, 0.35, 0.50, 0.50, 0.35, 0.35, 0.666, 0.50, 0.35, 0.35, 0.833, 0.50, 0.35, 0.35}); pp->locallab.invers.push_back(0); // Exposure + pp->locallab.expexpose.push_back(0); + pp->locallab.expcomp.push_back(0); + pp->locallab.hlcompr.push_back(20); + pp->locallab.hlcomprthresh.push_back(33); + pp->locallab.black.push_back(0); + pp->locallab.shcompr.push_back(50); + pp->locallab.warm.push_back(0); + pp->locallab.sensiex.push_back(19); + pp->locallab.excurve.push_back({(double)DCT_NURBS, 0.0, 0.0, 1.0, 1.0}); + // Vibrance + pp->locallab.expvibrance.push_back(0); + pp->locallab.saturated.push_back(0); + pp->locallab.pastels.push_back(0); + pp->locallab.psthreshold.push_back({0, 75, false}); + pp->locallab.protectskins.push_back(0); + pp->locallab.avoidcolorshift.push_back(1); + pp->locallab.pastsattog.push_back(1); + pp->locallab.sensiv.push_back(19); + pp->locallab.skintonescurve.push_back({(double)DCT_Linear}); + // Blur & Noise + pp->locallab.expblur.push_back(0); + pp->locallab.radius.push_back(1); + pp->locallab.strength.push_back(0); + pp->locallab.sensibn.push_back(40); + pp->locallab.blurMethod.push_back("norm"); + pp->locallab.activlum.push_back(0); + // Tone Mapping + pp->locallab.exptonemap.push_back(0); + pp->locallab.stren.push_back(1); + pp->locallab.gamma.push_back(100); + pp->locallab.estop.push_back(140); + pp->locallab.scaltm.push_back(10); + pp->locallab.rewei.push_back(0); + pp->locallab.sensitm.push_back(19); + // Retinex + pp->locallab.expreti.push_back(0); + pp->locallab.retinexMethod.push_back("high"); + pp->locallab.str.push_back(0); + pp->locallab.chrrt.push_back(0); + pp->locallab.neigh.push_back(50); + pp->locallab.vart.push_back(200); + pp->locallab.sensih.push_back(19); + pp->locallab.localTgaincurve.push_back({(double)FCT_MinMaxCPoints, 0.0, 0.12, 0.35, 0.35, 0.70, 0.50, 0.35, 0.35, 1.00, 0.12, 0.35, 0.35}); + pp->locallab.inversret.push_back(0); + // Sharpening + pp->locallab.expsharp.push_back(0); + pp->locallab.sharradius.push_back(40); + pp->locallab.sharamount.push_back(75); + pp->locallab.shardamping.push_back(75); + pp->locallab.shariter.push_back(30); + pp->locallab.sensisha.push_back(19); + pp->locallab.inverssha.push_back(0); + // Contrast by detail levels + pp->locallab.expcbdl.push_back(0); + + for (int i = 0; i < 5; i++) { + pp->locallab.mult[i].push_back(100.0); + } + + pp->locallab.chromacbdl.push_back(0); + pp->locallab.threshold.push_back(20.0); + pp->locallab.sensicb.push_back(19); + // Denoise + pp->locallab.expdenoi.push_back(0); + pp->locallab.noiselumf.push_back(0); + pp->locallab.noiselumc.push_back(0); + pp->locallab.noiselumdetail.push_back(0); + pp->locallab.noiselequal.push_back(7); + pp->locallab.noisechrof.push_back(0); + pp->locallab.noisechroc.push_back(0); + pp->locallab.adjblur.push_back(0); + pp->locallab.bilateral.push_back(0); + pp->locallab.sensiden.push_back(30); + pp->locallab.avoid.push_back(0); // New created spot selection expsettings->setSelectedSpot(spotId); @@ -2755,8 +2577,81 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pp->locallab.LHcurve.erase(pp->locallab.LHcurve.begin() + i); pp->locallab.HHcurve.erase(pp->locallab.HHcurve.begin() + i); pp->locallab.invers.erase(pp->locallab.invers.begin() + i); - // Exposure + pp->locallab.expexpose.erase(pp->locallab.expexpose.begin() + i); + pp->locallab.expcomp.erase(pp->locallab.expcomp.begin() + i); + pp->locallab.hlcompr.erase(pp->locallab.hlcompr.begin() + i); + pp->locallab.hlcomprthresh.erase(pp->locallab.hlcomprthresh.begin() + i); + pp->locallab.black.erase(pp->locallab.black.begin() + i); + pp->locallab.shcompr.erase(pp->locallab.shcompr.begin() + i); + pp->locallab.warm.erase(pp->locallab.warm.begin() + i); + pp->locallab.sensiex.erase(pp->locallab.sensiex.begin() + i); + pp->locallab.excurve.erase(pp->locallab.excurve.begin() + i); + // Vibrance + pp->locallab.expvibrance.erase(pp->locallab.expvibrance.begin() + i); + pp->locallab.saturated.erase(pp->locallab.saturated.begin() + i); + pp->locallab.pastels.erase(pp->locallab.pastels.begin() + i); + pp->locallab.psthreshold.erase(pp->locallab.psthreshold.begin() + i); + pp->locallab.protectskins.erase(pp->locallab.protectskins.begin() + i); + pp->locallab.avoidcolorshift.erase(pp->locallab.avoidcolorshift.begin() + i); + pp->locallab.pastsattog.erase(pp->locallab.pastsattog.begin() + i); + pp->locallab.sensiv.erase(pp->locallab.sensiv.begin() + i); + pp->locallab.skintonescurve.erase(pp->locallab.skintonescurve.begin() + i); + // Blur & Noise + pp->locallab.expblur.erase(pp->locallab.expblur.begin() + i); + pp->locallab.radius.erase(pp->locallab.radius.begin() + i); + pp->locallab.strength.erase(pp->locallab.strength.begin() + i); + pp->locallab.sensibn.erase(pp->locallab.sensibn.begin() + i); + pp->locallab.blurMethod.erase(pp->locallab.blurMethod.begin() + i); + pp->locallab.activlum.erase(pp->locallab.activlum.begin() + i); + // Tone Mapping + pp->locallab.exptonemap.erase(pp->locallab.exptonemap.begin() + i); + pp->locallab.stren.erase(pp->locallab.stren.begin() + i); + pp->locallab.gamma.erase(pp->locallab.gamma.begin() + i); + pp->locallab.estop.erase(pp->locallab.estop.begin() + i); + pp->locallab.scaltm.erase(pp->locallab.scaltm.begin() + i); + pp->locallab.rewei.erase(pp->locallab.rewei.begin() + i); + pp->locallab.sensitm.erase(pp->locallab.sensitm.begin() + i); + // Retinex + pp->locallab.expreti.erase(pp->locallab.expreti.begin() + i); + pp->locallab.retinexMethod.erase(pp->locallab.retinexMethod.begin() + i); + pp->locallab.str.erase(pp->locallab.str.begin() + i); + pp->locallab.chrrt.erase(pp->locallab.chrrt.begin() + i); + pp->locallab.neigh.erase(pp->locallab.neigh.begin() + i); + pp->locallab.vart.erase(pp->locallab.vart.begin() + i); + pp->locallab.sensih.erase(pp->locallab.sensih.begin() + i); + pp->locallab.localTgaincurve.erase(pp->locallab.localTgaincurve.begin() + i); + pp->locallab.inversret.erase(pp->locallab.inversret.begin() + i); + // Sharpening + pp->locallab.expsharp.erase(pp->locallab.expsharp.begin() + i); + pp->locallab.sharradius.erase(pp->locallab.sharradius.begin() + i); + pp->locallab.sharamount.erase(pp->locallab.sharamount.begin() + i); + pp->locallab.shardamping.erase(pp->locallab.shardamping.begin() + i); + pp->locallab.shariter.erase(pp->locallab.shariter.begin() + i); + pp->locallab.sensisha.erase(pp->locallab.sensisha.begin() + i); + pp->locallab.inverssha.erase(pp->locallab.inverssha.begin() + i); + // Contrast by detail levels + pp->locallab.expcbdl.erase(pp->locallab.expcbdl.begin() + i); + + for (int j = 0; j < 5; j++) { + pp->locallab.mult[j].erase(pp->locallab.mult[j].begin() + i); + } + + pp->locallab.chromacbdl.erase(pp->locallab.chromacbdl.begin() + i); + pp->locallab.threshold.erase(pp->locallab.threshold.begin() + i); + pp->locallab.sensicb.erase(pp->locallab.sensicb.begin() + i); + // Denoise + pp->locallab.expdenoi.erase(pp->locallab.expdenoi.begin() + i); + pp->locallab.noiselumf.erase(pp->locallab.noiselumf.begin() + i); + pp->locallab.noiselumc.erase(pp->locallab.noiselumc.begin() + i); + pp->locallab.noiselumdetail.erase(pp->locallab.noiselumdetail.begin() + i); + pp->locallab.noiselequal.erase(pp->locallab.noiselequal.begin() + i); + pp->locallab.noisechrof.erase(pp->locallab.noisechrof.begin() + i); + pp->locallab.noisechroc.erase(pp->locallab.noisechroc.begin() + i); + pp->locallab.adjblur.erase(pp->locallab.adjblur.begin() + i); + pp->locallab.bilateral.erase(pp->locallab.bilateral.begin() + i); + pp->locallab.sensiden.erase(pp->locallab.sensiden.begin() + i); + pp->locallab.avoid.erase(pp->locallab.avoid.begin() + i); // Select one remaining spot if (pp->locallab.nbspot > 0) { @@ -2864,6 +2759,96 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pp->locallab.HHcurve.at(pp->locallab.selspot) = HHshape->getCurve(); pp->locallab.invers.at(pp->locallab.selspot) = invers->get_active(); // Exposure + pp->locallab.expexpose.at(pp->locallab.selspot) = (int)expexpose->getEnabled(); + pp->locallab.expcomp.at(pp->locallab.selspot) = expcomp->getIntValue(); + pp->locallab.hlcompr.at(pp->locallab.selspot) = hlcompr->getIntValue(); + pp->locallab.hlcomprthresh.at(pp->locallab.selspot) = hlcomprthresh->getIntValue(); + pp->locallab.black.at(pp->locallab.selspot) = black->getIntValue(); + pp->locallab.shcompr.at(pp->locallab.selspot) = shcompr->getIntValue(); + pp->locallab.warm.at(pp->locallab.selspot) = warm->getIntValue(); + pp->locallab.sensiex.at(pp->locallab.selspot) = sensiex->getIntValue(); + pp->locallab.excurve.at(pp->locallab.selspot) = shapeexpos->getCurve(); + // Vibrance + pp->locallab.expvibrance.at(pp->locallab.selspot) = (int)expvibrance->getEnabled(); + pp->locallab.saturated.at(pp->locallab.selspot) = saturated->getIntValue(); + pp->locallab.pastels.at(pp->locallab.selspot) = pastels->getIntValue(); + pp->locallab.psthreshold.at(pp->locallab.selspot) = psThreshold->getValue(); + pp->locallab.protectskins.at(pp->locallab.selspot) = (int)protectSkins->get_active(); + pp->locallab.avoidcolorshift.at(pp->locallab.selspot) = (int)avoidColorShift->get_active(); + pp->locallab.pastsattog.at(pp->locallab.selspot) = (int)pastSatTog->get_active(); + pp->locallab.sensiv.at(pp->locallab.selspot) = sensiv->getIntValue(); + pp->locallab.skintonescurve.at(pp->locallab.selspot) = skinTonesCurve->getCurve(); + // Blur & Noise + pp->locallab.expblur.at(pp->locallab.selspot) = (int)expblur->getEnabled(); + pp->locallab.radius.at(pp->locallab.selspot) = radius->getIntValue(); + pp->locallab.strength.at(pp->locallab.selspot) = strength->getIntValue(); + pp->locallab.sensibn.at(pp->locallab.selspot) = sensibn->getIntValue(); + + if (blurMethod->get_active_row_number() == 0) { + pp->locallab.blurMethod.at(pp->locallab.selspot) = "norm"; + } else if (blurMethod->get_active_row_number() == 1) { + pp->locallab.blurMethod.at(pp->locallab.selspot) = "inv"; + } else if (blurMethod->get_active_row_number() == 2) { + pp->locallab.blurMethod.at(pp->locallab.selspot) = "sym"; + } + + pp->locallab.activlum.at(pp->locallab.selspot) = (int)activlum->get_active(); + // Tone Mapping + pp->locallab.exptonemap.at(pp->locallab.selspot) = (int)exptonemap->getEnabled(); + pp->locallab.stren.at(pp->locallab.selspot) = stren->getIntValue(); + pp->locallab.gamma.at(pp->locallab.selspot) = gamma->getIntValue(); + pp->locallab.estop.at(pp->locallab.selspot) = estop->getIntValue(); + pp->locallab.scaltm.at(pp->locallab.selspot) = scaltm->getIntValue(); + pp->locallab.rewei.at(pp->locallab.selspot) = rewei->getIntValue(); + pp->locallab.sensitm.at(pp->locallab.selspot) = sensitm->getIntValue(); + // Retinex + pp->locallab.expreti.at(pp->locallab.selspot) = (int)expreti->getEnabled(); + + if (retinexMethod->get_active_row_number() == 0) { + pp->locallab.retinexMethod.at(pp->locallab.selspot) = "low"; + } else if (retinexMethod->get_active_row_number() == 1) { + pp->locallab.retinexMethod.at(pp->locallab.selspot) = "uni"; + } else if (retinexMethod->get_active_row_number() == 2) { + pp->locallab.retinexMethod.at(pp->locallab.selspot) = "high"; + } + + pp->locallab.str.at(pp->locallab.selspot) = str->getIntValue(); + pp->locallab.chrrt.at(pp->locallab.selspot) = chrrt->getIntValue(); + pp->locallab.neigh.at(pp->locallab.selspot) = neigh->getIntValue(); + pp->locallab.vart.at(pp->locallab.selspot) = vart->getIntValue(); + pp->locallab.sensih.at(pp->locallab.selspot) = sensih->getIntValue(); + pp->locallab.localTgaincurve.at(pp->locallab.selspot) = cTgainshape->getCurve(); + pp->locallab.inversret.at(pp->locallab.selspot) = (int)inversret->get_active(); + // Sharpening + pp->locallab.expsharp.at(pp->locallab.selspot) = (int)expsharp->getEnabled(); + pp->locallab.sharradius.at(pp->locallab.selspot) = sharradius->getIntValue(); + pp->locallab.sharamount.at(pp->locallab.selspot) = sharamount->getIntValue(); + pp->locallab.shardamping.at(pp->locallab.selspot) = shardamping->getIntValue(); + pp->locallab.shariter.at(pp->locallab.selspot) = shariter->getIntValue(); + pp->locallab.sensisha.at(pp->locallab.selspot) = sensisha->getIntValue(); + pp->locallab.inverssha.at(pp->locallab.selspot) = (int)inverssha->get_active(); + // Contrast by detail levels + pp->locallab.expcbdl.at(pp->locallab.selspot) = (int)expcbdl->getEnabled(); + + for (int i = 0; i < 5; i++) { + pp->locallab.mult[i].at(pp->locallab.selspot) = multiplier[i]->getIntValue(); + } + + pp->locallab.chromacbdl.at(pp->locallab.selspot) = chromacbdl->getIntValue(); + pp->locallab.threshold.at(pp->locallab.selspot) = threshold->getValue(); + pp->locallab.sensicb.at(pp->locallab.selspot) = sensicb->getIntValue(); + // Denoise + pp->locallab.expdenoi.at(pp->locallab.selspot) = (int)expdenoi->getEnabled(); + pp->locallab.noiselumf.at(pp->locallab.selspot) = noiselumf->getIntValue(); + pp->locallab.noiselumc.at(pp->locallab.selspot) = noiselumc->getIntValue(); + pp->locallab.noiselumdetail.at(pp->locallab.selspot) = noiselumdetail->getIntValue(); + pp->locallab.noiselequal.at(pp->locallab.selspot) = noiselequal->getIntValue(); + pp->locallab.noisechrof.at(pp->locallab.selspot) = noisechrof->getIntValue(); + pp->locallab.noisechroc.at(pp->locallab.selspot) = noisechroc->getIntValue(); + pp->locallab.adjblur.at(pp->locallab.selspot) = adjblur->getIntValue(); + pp->locallab.bilateral.at(pp->locallab.selspot) = bilateral->getIntValue(); + pp->locallab.sensiden.at(pp->locallab.selspot) = sensiden->getIntValue(); + pp->locallab.avoid.at(pp->locallab.selspot) = (int)avoid->get_active(); } // Update Locallab tools GUI @@ -2902,206 +2887,96 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pedited->locallab.contrast = contrast->getEditedState(); pedited->locallab.chroma = chroma->getEditedState(); pedited->locallab.sensi = sensi->getEditedState(); - pedited->locallab.qualitycurveMethod = qualitycurveMethod->get_active_row_number() != 3; + pedited->locallab.qualitycurveMethod = qualitycurveMethod->get_active_text() != M("GENERAL_UNCHANGED"); pedited->locallab.llcurve = !llshape->isUnChanged(); pedited->locallab.cccurve = !ccshape->isUnChanged(); pedited->locallab.LHcurve = !LHshape->isUnChanged(); pedited->locallab.HHcurve = !HHshape->isUnChanged(); pedited->locallab.invers = !invers->get_inconsistent(); // Exposure - } - - /* - pp->locallab.adjblur = adjblur->getIntValue(); - pp->locallab.warm = warm->getIntValue(); - pp->locallab.expcomp = expcomp->getValue(); - pp->locallab.black = (int)black->getValue(); - pp->locallab.hlcompr = (int)hlcompr->getValue(); - pp->locallab.hlcomprthresh = (int)hlcomprthresh->getValue(); - pp->locallab.shcompr = (int)shcompr->getValue(); - pp->locallab.noiselumc = noiselumc->getIntValue(); - pp->locallab.noiselumdetail = noiselumdetail->getIntValue(); - pp->locallab.noiselequal = noiselequal->getIntValue(); - pp->locallab.noisechrodetail = noisechrodetail->getIntValue(); - pp->locallab.bilateral = bilateral->getIntValue(); - pp->locallab.sensiden = sensiden->getIntValue(); - pp->locallab.noiselumf = noiselumf->getIntValue(); - pp->locallab.noisechrof = noisechrof->getIntValue(); - pp->locallab.noisechroc = noisechroc->getIntValue(); - pp->locallab.sharradius = sharradius->getIntValue(); - pp->locallab.sharamount = sharamount->getIntValue(); - pp->locallab.shardamping = shardamping->getIntValue(); - pp->locallab.shariter = shariter->getIntValue(); - pp->locallab.sensisha = sensisha->getIntValue(); - pp->locallab.sensiex = sensiex->getIntValue(); - pp->locallab.sensih = sensih->getIntValue(); - pp->locallab.retrab = retrab->getIntValue(); - pp->locallab.sensicb = sensicb->getIntValue(); - pp->locallab.sensiexclu = sensiexclu->getIntValue(); - pp->locallab.struc = struc->getIntValue(); - pp->locallab.sensibn = sensibn->getIntValue(); - pp->locallab.sensitm = sensitm->getIntValue(); - pp->locallab.radius = radius->getIntValue(); - pp->locallab.strength = strength->getIntValue(); - pp->locallab.stren = stren->getIntValue(); - pp->locallab.gamma = gamma->getIntValue(); - pp->locallab.estop = estop->getIntValue(); - pp->locallab.scaltm = scaltm->getIntValue(); - pp->locallab.rewei = rewei->getIntValue(); - pp->locallab.transit = transit->getIntValue(); - pp->locallab.avoid = avoid->get_active(); - pp->locallab.activlum = activlum->get_active(); - pp->locallab.cutpast = cutpast->get_active(); - pp->locallab.lastdust = lastdust->get_active(); - pp->locallab.inversrad = inversrad->get_active(); - pp->locallab.inversret = inversret->get_active(); - pp->locallab.inverssha = inverssha->get_active(); - pp->locallab.str = str->getIntValue(); - pp->locallab.neigh = neigh->getIntValue(); - pp->locallab.nbspot = nbspot->getIntValue(); - pp->locallab.anbspot = anbspot->getIntValue(); - pp->locallab.hueref = hueref->getValue(); - pp->locallab.huerefblur = huerefblur->getValue(); - pp->locallab.chromaref = chromaref->getValue(); - pp->locallab.lumaref = lumaref->getValue(); - pp->locallab.sobelref = sobelref->getValue(); - pp->locallab.vart = vart->getIntValue(); - pp->locallab.chrrt = chrrt->getIntValue(); - pp->locallab.localTgaincurve = cTgainshape->getCurve(); - pp->locallab.localTgaincurverab = cTgainshaperab->getCurve(); - pp->locallab.excurve = shapeexpos->getCurve(); - - pp->locallab.expexpose = expexpose->getEnabled(); - pp->locallab.expvibrance = expvibrance->getEnabled(); - pp->locallab.expblur = expblur->getEnabled(); - pp->locallab.exptonemap = exptonemap->getEnabled(); - pp->locallab.expreti = expreti->getEnabled(); - pp->locallab.expsharp = expsharp->getEnabled(); - pp->locallab.expcbdl = expcbdl->getEnabled(); - pp->locallab.expdenoi = expdenoi->getEnabled(); - - for (int i = 0; i < 5; i++) { - pp->locallab.mult[i] = multiplier[i]->getIntValue(); - } - - pp->locallab.threshold = threshold->getIntValue(); - pp->locallab.chromacbdl = chromacbdl->getIntValue(); - - pp->locallab.pastels = pastels->getIntValue(); - pp->locallab.saturated = pastSatTog->get_active() ? pp->locallab.pastels : saturated->getIntValue(); - pp->locallab.psthreshold = psThreshold->getValue (); - pp->locallab.protectskins = protectSkins->get_active(); - pp->locallab.avoidcolorshift = avoidColorShift->get_active(); - pp->locallab.pastsattog = pastSatTog->get_active(); - pp->locallab.skintonescurve = skinTonesCurve->getCurve(); - pp->locallab.sensiv = sensiv->getIntValue(); - - - if (pedited) { - pedited->locallab.Exclumethod = Exclumethod->get_active_text() != M("GENERAL_UNCHANGED"); - pedited->locallab.retinexMethod = retinexMethod->get_active_text() != M("GENERAL_UNCHANGED"); - pedited->locallab.adjblur = adjblur->getEditedState(); - pedited->locallab.warm = warm->getEditedState(); - pedited->locallab.expcomp = expcomp->getEditedState(); - pedited->locallab.black = black->getEditedState(); - pedited->locallab.hlcompr = hlcompr->getEditedState(); + pedited->locallab.expexpose = !expexpose->get_inconsistent(); + pedited->locallab.expcomp = expcomp->getEditedState(); + pedited->locallab.hlcompr = hlcompr->getEditedState(); pedited->locallab.hlcomprthresh = hlcomprthresh->getEditedState(); - pedited->locallab.shcompr = shcompr->getEditedState(); - - pedited->locallab.noiselumf = noiselumf->getEditedState(); - pedited->locallab.noiselumc = noiselumc->getEditedState(); - pedited->locallab.noiselumdetail = noiselumdetail->getEditedState(); - pedited->locallab.noiselequal = noiselequal->getEditedState(); - pedited->locallab.noisechrodetail = noisechrodetail->getEditedState(); - pedited->locallab.bilateral = bilateral->getEditedState(); - pedited->locallab.sensiden = sensiden->getEditedState(); - pedited->locallab.noisechrof = noisechrof->getEditedState(); - pedited->locallab.noisechroc = noisechroc->getEditedState(); - pedited->locallab.sharradius = sharradius->getEditedState(); - pedited->locallab.sharamount = sharamount->getEditedState(); - pedited->locallab.shardamping = shardamping->getEditedState(); - pedited->locallab.shariter = shariter->getEditedState(); - pedited->locallab.sensisha = sensisha->getEditedState(); + pedited->locallab.black = black->getEditedState(); + pedited->locallab.shcompr = shcompr->getEditedState(); + pedited->locallab.warm = warm->getEditedState(); pedited->locallab.sensiex = sensiex->getEditedState(); - pedited->locallab.sensih = sensih->getEditedState(); - pedited->locallab.retrab = retrab->getEditedState(); - pedited->locallab.sensicb = sensicb->getEditedState(); - pedited->locallab.sensiexclu = sensiexclu->getEditedState(); - pedited->locallab.struc = struc->getEditedState(); - pedited->locallab.sensibn = sensibn->getEditedState(); - pedited->locallab.sensitm = sensitm->getEditedState(); + pedited->locallab.excurve = !shapeexpos->isUnChanged(); + // Vibrance + pedited->locallab.expvibrance = !expvibrance->get_inconsistent(); + pedited->locallab.saturated = saturated->getEditedState(); + pedited->locallab.pastels = pastels->getEditedState(); + pedited->locallab.psthreshold = psThreshold->getEditedState(); + pedited->locallab.protectskins = !protectSkins->get_inconsistent(); + pedited->locallab.avoidcolorshift = !avoidColorShift->get_inconsistent(); + pedited->locallab.pastsattog = !pastSatTog->get_inconsistent(); + pedited->locallab.sensiv = sensiv->getEditedState(); + pedited->locallab.skintonescurve = !skinTonesCurve->isUnChanged(); + // Blur & Noise + pedited->locallab.expblur = !expblur->get_inconsistent(); pedited->locallab.radius = radius->getEditedState(); pedited->locallab.strength = strength->getEditedState(); + pedited->locallab.sensibn = sensibn->getEditedState(); + pedited->locallab.blurMethod = blurMethod->get_active_text() != M("GENERAL_UNCHANGED"); + pedited->locallab.activlum = !activlum->get_inconsistent(); + // Tone Mapping + pedited->locallab.exptonemap = !exptonemap->get_inconsistent(); pedited->locallab.stren = stren->getEditedState(); pedited->locallab.gamma = gamma->getEditedState(); pedited->locallab.estop = estop->getEditedState(); pedited->locallab.scaltm = scaltm->getEditedState(); pedited->locallab.rewei = rewei->getEditedState(); - pedited->locallab.avoid = !avoid->get_inconsistent(); - pedited->locallab.cutpast = !cutpast->get_inconsistent(); - pedited->locallab.lastdust = !lastdust->get_inconsistent(); - pedited->locallab.activlum = !activlum->get_inconsistent(); - pedited->locallab.inversret = !inversret->get_inconsistent(); - pedited->locallab.inversrad = !inversrad->get_inconsistent(); - pedited->locallab.inverssha = !inverssha->get_inconsistent(); + pedited->locallab.sensitm = sensitm->getEditedState(); + // Retinex + pedited->locallab.expreti = !expreti->get_inconsistent(); + pedited->locallab.retinexMethod = retinexMethod->get_active_text() != M("GENERAL_UNCHANGED"); pedited->locallab.str = str->getEditedState(); - pedited->locallab.neigh = neigh->getEditedState(); - pedited->locallab.hueref = hueref->getEditedState(); - pedited->locallab.huerefblur = huerefblur->getEditedState(); - pedited->locallab.chromaref = chromaref->getEditedState(); - pedited->locallab.lumaref = lumaref->getEditedState(); - pedited->locallab.sobelref = sobelref->getEditedState(); - - pedited->locallab.vart = vart->getEditedState(); pedited->locallab.chrrt = chrrt->getEditedState(); - pedited->locallab.localTgaincurve = !cTgainshape->isUnChanged(); - pedited->locallab.localTgaincurverab = !cTgainshaperab->isUnChanged(); - pedited->locallab.excurve = !shapeexpos->isUnChanged(); - - pedited->locallab.expexpose = !expexpose->get_inconsistent(); - pedited->locallab.expvibrance = !expvibrance->get_inconsistent(); - pedited->locallab.expblur = !expblur->get_inconsistent(); - pedited->locallab.exptonemap = !exptonemap->get_inconsistent(); - pedited->locallab.expreti = !expreti->get_inconsistent(); - pedited->locallab.expsharp = !expsharp->get_inconsistent(); - pedited->locallab.expcbdl = !expcbdl->get_inconsistent(); - pedited->locallab.expdenoi = !expdenoi->get_inconsistent(); + pedited->locallab.neigh = neigh->getEditedState(); + pedited->locallab.vart = vart->getEditedState(); + pedited->locallab.sensih = sensih->getEditedState(); + pedited->locallab.localTgaincurve = !cTgainshape->isUnChanged(); + pedited->locallab.inversret = !inversret->get_inconsistent(); + // Sharpening + pedited->locallab.expsharp = !expsharp->get_inconsistent(); + pedited->locallab.sharradius = sharradius->getEditedState(); + pedited->locallab.sharamount = sharamount->getEditedState(); + pedited->locallab.shardamping = shardamping->getEditedState(); + pedited->locallab.shariter = shariter->getEditedState(); + pedited->locallab.sensisha = sensisha->getEditedState(); + pedited->locallab.inverssha = !inverssha->get_inconsistent(); + // Contrast by detail levels + pedited->locallab.expcbdl = !expcbdl->get_inconsistent(); for (int i = 0; i < 5; i++) { pedited->locallab.mult[i] = multiplier[i]->getEditedState(); } - pedited->locallab.threshold = threshold->getEditedState(); pedited->locallab.chromacbdl = chromacbdl->getEditedState(); - pedited->locallab.pastels = pastels->getEditedState(); - pedited->locallab.saturated = saturated->getEditedState(); - pedited->locallab.psthreshold = psThreshold->getEditedState(); - pedited->locallab.protectskins = !protectSkins->get_inconsistent(); - pedited->locallab.avoidcolorshift = !avoidColorShift->get_inconsistent(); - pedited->locallab.pastsattog = !pastSatTog->get_inconsistent(); - pedited->locallab.skintonescurve = !skinTonesCurve->isUnChanged(); - pedited->locallab.sensiv = sensiv->getEditedState(); + pedited->locallab.threshold = threshold->getEditedState(); + pedited->locallab.sensicb = sensicb->getEditedState(); + // Denoise + pedited->locallab.expdenoi = !expdenoi->get_inconsistent(); + pedited->locallab.noiselumf = noiselumf->getEditedState(); + pedited->locallab.noiselumc = noiselumc->getEditedState(); + pedited->locallab.noiselumdetail = noiselumdetail->getEditedState(); + pedited->locallab.noiselequal = noiselequal->getEditedState(); + pedited->locallab.noisechrof = noisechrof->getEditedState(); + pedited->locallab.noisechroc = noisechroc->getEditedState(); + pedited->locallab.adjblur = adjblur->getEditedState(); + pedited->locallab.bilateral = bilateral->getEditedState(); + pedited->locallab.sensiden = sensiden->getEditedState(); + pedited->locallab.avoid = !avoid->get_inconsistent(); } - - if (retinexMethod->get_active_row_number() == 0) { - pp->locallab.retinexMethod = "low"; - } else if (retinexMethod->get_active_row_number() == 1) { - pp->locallab.retinexMethod = "uni"; - } else if (retinexMethod->get_active_row_number() == 2) { - pp->locallab.retinexMethod = "high"; - } - - if (Exclumethod->get_active_row_number() == 0) { - pp->locallab.Exclumethod = "norm"; - } else if (Exclumethod->get_active_row_number() == 1) { - pp->locallab.Exclumethod = "exc"; - } - */ } void Locallab::protectskins_toggled() { + printf("protectskins_toggled\n"); + if (batchMode) { + /* if (protectSkins->get_inconsistent()) { protectSkins->set_inconsistent(false); pskinsconn.block(true); @@ -3112,20 +2987,26 @@ void Locallab::protectskins_toggled() } lastProtectSkins = protectSkins->get_active(); + */ } - if (listener && getEnabled()) { - if (protectSkins->get_active()) { - listener->panelChanged(EvlocallabProtectSkins, M("GENERAL_ENABLED")); - } else { - listener->panelChanged(EvlocallabProtectSkins, M("GENERAL_DISABLED")); + if (getEnabled() && expvibrance->getEnabled()) { + if (listener) { + if (protectSkins->get_active()) { + listener->panelChanged(EvlocallabProtectSkins, M("GENERAL_ENABLED")); + } else { + listener->panelChanged(EvlocallabProtectSkins, M("GENERAL_DISABLED")); + } } } } void Locallab::avoidcolorshift_toggled() { + printf("avoidcolorshift_toggled\n"); + if (batchMode) { + /* if (avoidColorShift->get_inconsistent()) { avoidColorShift->set_inconsistent(false); ashiftconn.block(true); @@ -3136,13 +3017,16 @@ void Locallab::avoidcolorshift_toggled() } lastAvoidColorShift = avoidColorShift->get_active(); + */ } - if (listener && getEnabled()) { - if (avoidColorShift->get_active()) { - listener->panelChanged(EvlocallabAvoidColorShift, M("GENERAL_ENABLED")); - } else { - listener->panelChanged(EvlocallabAvoidColorShift, M("GENERAL_DISABLED")); + if (getEnabled() && expvibrance->getEnabled()) { + if (listener) { + if (avoidColorShift->get_active()) { + listener->panelChanged(EvlocallabAvoidColorShift, M("GENERAL_ENABLED")); + } else { + listener->panelChanged(EvlocallabAvoidColorShift, M("GENERAL_DISABLED")); + } } } } @@ -3150,6 +3034,10 @@ void Locallab::avoidcolorshift_toggled() void Locallab::spotdupChanged(bool spotchan) { + // TODO Locallab printf + printf("spotdupChanged\n"); + + /* nextspotdup = spotchan; const auto func = [](gpointer data) -> gboolean { @@ -3158,11 +3046,15 @@ void Locallab::spotdupChanged(bool spotchan) }; idle_register.add(func, this); + */ } bool Locallab::spotdupComputed_() { + // TODO Locallab printf + printf("spotdupComputed_\n"); + /* disableListener(); // spotduplicated->set_active(nextspotdup); @@ -3174,6 +3066,7 @@ bool Locallab::spotdupComputed_() } enableListener(); + */ return false; } @@ -3181,6 +3074,8 @@ bool Locallab::spotdupComputed_() void Locallab::spotduplicatedChanged() { + printf("spotduplicatedChanged\n"); + /* if (batchMode) { if (spotduplicated->get_inconsistent()) { @@ -3206,7 +3101,10 @@ void Locallab::spotduplicatedChanged() void Locallab::pastsattog_toggled() { + printf("pastsattog_toggled\n"); + if (batchMode) { + /* if (pastSatTog->get_inconsistent()) { pastSatTog->set_inconsistent(false); pastsattogconn.block(true); @@ -3217,24 +3115,20 @@ void Locallab::pastsattog_toggled() } lastPastSatTog = pastSatTog->get_active(); + */ } if (pastSatTog->get_active()) { - // Link both slider, so we set saturated and psThresholds unsensitive - psThreshold->set_sensitive(false); - saturated->set_sensitive(false); - saturated->setValue(pastels->getValue()); // Pastels and Saturated are linked - } else { - // Separate sliders, so we set saturated and psThresholds sensitive again - psThreshold->set_sensitive(true); - saturated->set_sensitive(true); + saturated->setValue(pastels->getValue()); } - if (listener && getEnabled()) { - if (pastSatTog->get_active()) { - listener->panelChanged(EvlocallabPastSatTog, M("GENERAL_ENABLED")); - } else { - listener->panelChanged(EvlocallabPastSatTog, M("GENERAL_DISABLED")); + if (getEnabled() && expvibrance->getEnabled()) { + if (listener) { + if (pastSatTog->get_active()) { + listener->panelChanged(EvlocallabPastSatTog, M("GENERAL_ENABLED")); + } else { + listener->panelChanged(EvlocallabPastSatTog, M("GENERAL_DISABLED")); + } } } } @@ -3269,122 +3163,82 @@ void Locallab::curveChanged(CurveEditor* ce) } } - /* - if (listener && getEnabled()) { + // Exposure + if (getEnabled() && expexpose->getEnabled()) { + if (ce == shapeexpos) { + if (listener) { + listener->panelChanged(Evlocallabshapeexpos, M("HISTORY_CUSTOMCURVE")); + } + } + } + + // Vibrance + if (getEnabled() && expvibrance->getEnabled()) { + if (ce == skinTonesCurve) { + if (listener) { + listener->panelChanged(EvlocallabSkinTonesCurve, M("HISTORY_CUSTOMCURVE")); + } + } + } + + // Retinex + if (getEnabled() && expreti->getEnabled()) { if (ce == cTgainshape) { - listener->panelChanged(EvlocallabCTgainCurve, M("HISTORY_CUSTOMCURVE")); //HISTORY_CUSTOMCURVE - int strval = retrab->getValue(); - //update MIP - retrab->setValue(strval + 1); - adjusterChanged(retrab, strval + 1); - usleep(10000); //to test - retrab->setValue(strval); - - adjusterChanged(retrab, strval); + if (listener) { + listener->panelChanged(EvlocallabCTgainCurve, M("HISTORY_CUSTOMCURVE")); + } } + } - else if (ce == cTgainshaperab) { - listener->panelChanged(EvlocallabCTgainCurverab, M("")); - } else if (ce == LHshape) { - listener->panelChanged(EvlocallabLHshape, M("")); - int strval = retrab->getValue(); - //update MIP - retrab->setValue(strval + 1); - adjusterChanged(retrab, strval + 1); - usleep(10000); //to test - retrab->setValue(strval); - - adjusterChanged(retrab, strval); - } else if (ce == HHshape) { - listener->panelChanged(EvlocallabHHshape, M("HISTORY_CUSTOMCURVE")); - int strval = retrab->getValue(); - //update MIP - retrab->setValue(strval + 1); - adjusterChanged(retrab, strval + 1); - usleep(10000); //to test - retrab->setValue(strval); - } else if (ce == shapeexpos) { - listener->panelChanged(Evlocallabshapeexpos, M("HISTORY_CUSTOMCURVE")); - int strval = retrab->getValue(); - //update MIP - retrab->setValue(strval + 1); - adjusterChanged(retrab, strval + 1); - usleep(10000); //to test - retrab->setValue(strval); - - adjusterChanged(retrab, strval); - - - } else if (ce == llshape) { - listener->panelChanged(Evlocallabllshape, M("HISTORY_CUSTOMCURVE")); - int strval = retrab->getValue(); - //update MIP - retrab->setValue(strval + 1); - adjusterChanged(retrab, strval + 1); - usleep(10000); //to test - retrab->setValue(strval); - - adjusterChanged(retrab, strval); - - } else if (ce == ccshape) { - listener->panelChanged(Evlocallabccshape, M("HISTORY_CUSTOMCURVE")); - int strval = retrab->getValue(); - //update MIP - retrab->setValue(strval + 1); - adjusterChanged(retrab, strval + 1); - usleep(10000); //to test - retrab->setValue(strval); - - adjusterChanged(retrab, strval); - - - } else if (ce == skinTonesCurve) { - listener->panelChanged(EvlocallabSkinTonesCurve, M("HISTORY_CUSTOMCURVE")); - int strval = retrab->getValue(); - //update MIP - retrab->setValue(strval + 1); - adjusterChanged(retrab, strval + 1); - usleep(10000); //to test - retrab->setValue(strval); - adjusterChanged(retrab, strval); - } + /* + if (ce == skinTonesCurve) { + listener->panelChanged(EvlocallabSkinTonesCurve, M("HISTORY_CUSTOMCURVE")); + int strval = retrab->getValue(); + //update MIP + retrab->setValue(strval + 1); + adjusterChanged(retrab, strval + 1); + usleep(10000); //to test + retrab->setValue(strval); + adjusterChanged(retrab, strval); } */ } void Locallab::retinexMethodChanged() { - if (!batchMode) { + printf("retinexMethodChanged\n"); + if (!batchMode) { + /* retrab->hide(); LocalcurveEditorgainTrab->hide(); + */ } - if (listener) { - listener->panelChanged(EvlocallabretinexMethod, retinexMethod->get_active_text()); + if (getEnabled() && expreti->getEnabled()) { + if (listener) { + listener->panelChanged(EvlocallabretinexMethod, retinexMethod->get_active_text()); + } } } void Locallab::blurMethodChanged() { - if (!batchMode) { + printf("blurMethodChanged\n"); - } - - if (blurMethod->get_active_row_number() == 0 || blurMethod->get_active_row_number() == 2) { - sensibn->show(); - } else { - sensibn->hide(); - } - - if (listener) { - listener->panelChanged(EvlocallabblurMethod, blurMethod->get_active_text()); + if (getEnabled() && expblur->getEnabled()) { + if (listener) { + listener->panelChanged(EvlocallabblurMethod, blurMethod->get_active_text()); + } } } void Locallab::dustMethodChanged() { + printf("dustMethodChanged\n"); + + /* if (!batchMode) { } @@ -3393,10 +3247,12 @@ void Locallab::dustMethodChanged() if (listener) { // listener->panelChanged (EvlocallabdustMethod, dustMethod->get_active_text ()); } + */ } void Locallab::qualityMethodChanged() { + /* if (!batchMode) { /* if (qualityMethod->get_active_row_number() == 0) { //STD @@ -3406,25 +3262,29 @@ void Locallab::qualityMethodChanged() proxi->show(); thres->show(); } - */ - } + *//* +} - if (listener) { - listener->panelChanged(EvlocallabqualityMethod, qualityMethod->get_active_text()); - } +if (listener) { +listener->panelChanged(EvlocallabqualityMethod, qualityMethod->get_active_text()); +} +*/ } void Locallab::qualitycurveMethodChanged() { printf("qualitycurveMethodChanged\n"); - if (listener) { - listener->panelChanged(EvlocallabqualitycurveMethod, qualitycurveMethod->get_active_text()); + if (getEnabled() && expcolor->getEnabled()) { + if (listener) { + listener->panelChanged(EvlocallabqualitycurveMethod, qualitycurveMethod->get_active_text()); + } } } void Locallab::ExclumethodChanged() { + /* if (!batchMode) { if (Exclumethod->get_active_row_number() == 0) { } else if (Exclumethod->get_active_row_number() == 1) { @@ -3435,11 +3295,12 @@ void Locallab::ExclumethodChanged() if (listener) { listener->panelChanged(Evlocallabexclumethod, Exclumethod->get_active_text()); } - + */ } void Locallab::shapemethodChanged() { + /* if (!batchMode) { // } @@ -3448,10 +3309,12 @@ void Locallab::shapemethodChanged() if (listener) { listener->panelChanged(Evlocallabshapemethod, shapemethod->get_active_text()); } + */ } void Locallab::SmethodChanged() { + /* if (!batchMode) { if (Smethod->get_active_row_number() == 0) { //IND 0 locX->hide(); @@ -3491,28 +3354,29 @@ void Locallab::SmethodChanged() locXL->hide(); locY->hide(); locYT->hide(); - } */ - } + } *//* +} - if (listener && getEnabled()) { - if (Smethod->get_active_row_number() == 1 || Smethod->get_active_row_number() == 3) { - listener->panelChanged(EvlocallabSmet, Smethod->get_active_text()); - locXL->setValue(locX->getValue()); - locYT->setValue(locY->getValue()); - } - // else if(Smethod->get_active_row_number()==2) { - // listener->panelChanged (EvlocallabSmet, Smethod->get_active_text ()); - // locXL->setValue (locX->getValue()); - // locYT->setValue (locX->getValue()); - // locY->setValue (locX->getValue()); - // } - else +if (listener && getEnabled()) { +if (Smethod->get_active_row_number() == 1 || Smethod->get_active_row_number() == 3) { + listener->panelChanged(EvlocallabSmet, Smethod->get_active_text()); + locXL->setValue(locX->getValue()); + locYT->setValue(locY->getValue()); +} +// else if(Smethod->get_active_row_number()==2) { +// listener->panelChanged (EvlocallabSmet, Smethod->get_active_text ()); +// locXL->setValue (locX->getValue()); +// locYT->setValue (locX->getValue()); +// locY->setValue (locX->getValue()); +// } +else - { - listener->panelChanged(EvlocallabSmet, Smethod->get_active_text()); +{ + listener->panelChanged(EvlocallabSmet, Smethod->get_active_text()); - } - } +} +} +*/ } void Locallab::inversChanged() { @@ -3546,7 +3410,7 @@ void Locallab::inversChanged() void Locallab::cutpastChanged() { - + /* if (batchMode) { if (cutpast->get_inconsistent()) { cutpast->set_inconsistent(false); @@ -3568,11 +3432,12 @@ void Locallab::cutpastChanged() // listener->panelChanged (Evlocallabcutpast, M ("GENERAL_DISABLED")); } } + */ } void Locallab::lastdustChanged() { - + /* if (batchMode) { if (lastdust->get_inconsistent()) { lastdust->set_inconsistent(false); @@ -3594,6 +3459,7 @@ void Locallab::lastdustChanged() // listener->panelChanged (Evlocallablastdust, M ("GENERAL_DISABLED")); } } + */ } @@ -3630,8 +3496,10 @@ void Locallab::curvactivChanged() void Locallab::activlumChanged() { + printf("activlumChanged\n"); if (batchMode) { + /* if (activlum->get_inconsistent()) { activlum->set_inconsistent(false); activlumConn.block(true); @@ -3642,22 +3510,23 @@ void Locallab::activlumChanged() } lastactivlum = activlum->get_active(); + */ } - - if (listener) { - - if (getEnabled()) { - listener->panelChanged(Evlocallabactivlum, M("GENERAL_ENABLED")); - } else { - listener->panelChanged(Evlocallabactivlum, M("GENERAL_DISABLED")); + if (getEnabled() && expblur->getEnabled()) { + if (listener) { + if (activlum->get_active()) { + listener->panelChanged(Evlocallabactivlum, M("GENERAL_ENABLED")); + } else { + listener->panelChanged(Evlocallabactivlum, M("GENERAL_DISABLED")); + } } } } void Locallab::inversradChanged() { - + /* if (batchMode) { if (inversrad->get_inconsistent()) { inversrad->set_inconsistent(false); @@ -3685,12 +3554,15 @@ void Locallab::inversradChanged() listener->panelChanged(Evlocallabinversrad, M("GENERAL_DISABLED")); } } + */ } void Locallab::inversshaChanged() { + printf("inversshaChanged\n"); if (batchMode) { + /* if (inverssha->get_inconsistent()) { inverssha->set_inconsistent(false); inversshaConn.block(true); @@ -3701,28 +3573,26 @@ void Locallab::inversshaChanged() } lastinverssha = inverssha->get_active(); + */ } - /* - if(inverssha->get_active ()) { - sensisha->hide(); - } else { - sensisha->show(); - } - */ - if (listener) { - if (getEnabled()) { - listener->panelChanged(Evlocallabinverssha, M("GENERAL_ENABLED")); - } else { - listener->panelChanged(Evlocallabinverssha, M("GENERAL_DISABLED")); + if (getEnabled() && expsharp->getEnabled()) { + if (listener) { + if (inverssha->get_active()) { + listener->panelChanged(Evlocallabinverssha, M("GENERAL_ENABLED")); + } else { + listener->panelChanged(Evlocallabinverssha, M("GENERAL_DISABLED")); + } } } } void Locallab::inversretChanged() { + printf("inversretChanged\n"); if (batchMode) { + /* if (inversret->get_inconsistent()) { inversret->set_inconsistent(false); inversretConn.block(true); @@ -3733,20 +3603,16 @@ void Locallab::inversretChanged() } lastinversret = inversret->get_active(); + */ } - if (inversret->get_active()) { - sensih->hide(); - } else { - sensih->show(); - } - - - if (listener) { - if (getEnabled()) { - listener->panelChanged(Evlocallabinversret, M("GENERAL_ENABLED")); - } else { - listener->panelChanged(Evlocallabinversret, M("GENERAL_DISABLED")); + if (getEnabled() && expsharp->getEnabled()) { + if (listener) { + if (inversret->get_active()) { + listener->panelChanged(Evlocallabinversret, M("GENERAL_ENABLED")); + } else { + listener->panelChanged(Evlocallabinversret, M("GENERAL_DISABLED")); + } } } } @@ -3998,8 +3864,12 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe void Locallab::adjusterChanged(ThresholdAdjuster* a, int newBottom, int newTop) { - if (listener && getEnabled()) { - listener->panelChanged(EvlocallabPastSatThreshold, psThreshold->getHistoryString()); + printf("adjusterChangedTS\n"); + + if (getEnabled() && expvibrance->getEnabled()) { + if (listener) { + listener->panelChanged(EvlocallabPastSatThreshold, psThreshold->getHistoryString()); + } } } @@ -4027,6 +3897,169 @@ void Locallab::adjusterChanged(Adjuster * a, double newval) } } + if (a == sensi) { + if (listener) { + listener->panelChanged(Evlocallabsensi, sensi->getTextValue()); + } + } + } + + // Exposure + if (getEnabled() && expexpose->getEnabled()) { + if (a == expcomp) { + if (listener) { + listener->panelChanged(Evlocallabexpcomp, expcomp->getTextValue()); + } + } + + if (a == hlcompr) { + if (listener) { + listener->panelChanged(Evlocallabhlcompr, hlcompr->getTextValue()); + } + } + + if (a == hlcomprthresh) { + if (listener) { + listener->panelChanged(Evlocallabhlcomprthresh, hlcomprthresh->getTextValue()); + } + } + + if (a == black) { + if (listener) { + listener->panelChanged(Evlocallabblack, black->getTextValue()); + } + } + + if (a == shcompr) { + if (listener) { + listener->panelChanged(Evlocallabshcompr, shcompr->getTextValue()); + } + } + + if (a == warm) { + if (listener) { + listener->panelChanged(Evlocallabwarm, warm->getTextValue()); + } + } + + if (a == sensiex) { + if (listener) { + listener->panelChanged(Evlocallabsensiex, sensiex->getTextValue()); + } + } + } + + // Vibrance + if (a == pastels && pastSatTog->get_active()) { + saturated->setValue(newval); + } + + if (getEnabled() && expvibrance->getEnabled()) { + if (a == saturated && !pastSatTog->get_active()) { + if (listener) { + listener->panelChanged(EvlocallabSaturated, saturated->getTextValue()); + } + } + + if (a == pastels) { + if (listener) { + listener->panelChanged(EvlocallabPastels, pastels->getTextValue()); + } + } + + if (a == sensiv) { + if (listener) { + listener->panelChanged(Evlocallabsensiv, sensiv->getTextValue()); + } + } + } + + // Blur & Noise + if (getEnabled() && expblur->getEnabled()) { + if (a == radius) { + if (listener) { + listener->panelChanged(Evlocallabradius, radius->getTextValue()); + } + } + + if (a == strength) { + if (listener) { + listener->panelChanged(Evlocallabstrength, strength->getTextValue()); + } + } + + if (a == sensibn) { + if (listener) { + listener->panelChanged(Evlocallabsensibn, sensibn->getTextValue()); + } + } + } + + // Tone Mapping + if (getEnabled() && exptonemap->getEnabled()) { + if (a == stren) { + if (listener) { + listener->panelChanged(Evlocallabstren, stren->getTextValue()); + } + } + + if (a == gamma) { + if (listener) { + listener->panelChanged(Evlocallabgamma, gamma->getTextValue()); + } + } + + if (a == estop) { + if (listener) { + listener->panelChanged(Evlocallabestop, estop->getTextValue()); + } + } + + if (a == scaltm) { + if (listener) { + listener->panelChanged(Evlocallabscaltm, scaltm->getTextValue()); + } + } + + if (a == rewei) { + if (listener) { + listener->panelChanged(Evlocallabrewei, rewei->getTextValue()); + } + } + + if (a == sensitm) { + if (listener) { + listener->panelChanged(Evlocallabsensitm, sensitm->getTextValue()); + } + } + } + + // Retinex + if (getEnabled() && expreti->getEnabled()) { + if (a == str) { + if (listener) { + listener->panelChanged(Evlocallabstr, str->getTextValue()); + } + } + + if (a == chrrt) { + if (listener) { + listener->panelChanged(Evlocallabchrrt, chrrt->getTextValue()); + } + } + + if (a == neigh) { + if (listener) { + listener->panelChanged(Evlocallabneigh, neigh->getTextValue()); + } + } + + if (a == vart) { + if (listener) { + listener->panelChanged(Evlocallabvart, vart->getTextValue()); + } + } + if (a == sensih) { if (listener) { listener->panelChanged(Evlocallabsensih, sensih->getTextValue()); @@ -4034,144 +4067,132 @@ void Locallab::adjusterChanged(Adjuster * a, double newval) } } - anbspot->hide(); - hueref->hide(); - huerefblur->hide(); - chromaref->hide(); - lumaref->hide(); - sobelref->hide(); - centerXbuf->hide(); - centerYbuf->hide(); + // Sharpening + if (getEnabled() && expsharp->getEnabled()) { + if (a == sharradius) { + if (listener) { + listener->panelChanged(Evlocallabsharradius, sharradius->getTextValue()); + } + } - if (a == pastels && pastSatTog->get_active()) { - saturated->setValue(newval); + if (a == sharamount) { + if (listener) { + listener->panelChanged(Evlocallabsharamount, sharamount->getTextValue()); + } + } + + if (a == shardamping) { + if (listener) { + listener->panelChanged(Evlocallabshardamping, shardamping->getTextValue()); + } + } + + if (a == shariter) { + if (listener) { + listener->panelChanged(Evlocallabshariter, shariter->getTextValue()); + } + } + + if (a == sensisha) { + if (listener) { + listener->panelChanged(Evlocallabsensis, sensisha->getTextValue()); + } + } } - if (listener && getEnabled()) { - if (a == warm) { - listener->panelChanged(Evlocallabwarm, warm->getTextValue()); - } else if (a == expcomp) { - listener->panelChanged(Evlocallabexpcomp, expcomp->getTextValue()); - } else if (a == hlcompr) { - listener->panelChanged(Evlocallabhlcompr, hlcompr->getTextValue()); - } else if (a == hlcomprthresh) { - listener->panelChanged(Evlocallabhlcomprthresh, hlcomprthresh->getTextValue()); - } else if (a == black) { - listener->panelChanged(Evlocallabblack, black->getTextValue()); - shcompr->set_sensitive(!((int)black->getValue() == 0)); //at black=0 shcompr value has no effect - } else if (a == shcompr) { - listener->panelChanged(Evlocallabshcompr, shcompr->getTextValue()); - } else if (a == sensiex) { - listener->panelChanged(Evlocallabsensiex, sensiex->getTextValue()); - } else if (a == pastels) { - listener->panelChanged(EvlocallabPastels, pastels->getTextValue()); - } else if (a == saturated && !pastSatTog->get_active()) { - listener->panelChanged(EvlocallabSaturated, saturated->getTextValue()); - } else if (a == sensiv) { - listener->panelChanged(Evlocallabsensiv, sensiv->getTextValue()); - } else if (a == noiselumf) { - listener->panelChanged(Evlocallabnoiselumf, noiselumf->getTextValue()); - } else if (a == noiselumc) { - listener->panelChanged(Evlocallabnoiselumc, noiselumc->getTextValue()); - } else if (a == noiselumdetail) { - listener->panelChanged(Evlocallabnoiselumdetail, noiselumdetail->getTextValue()); - } else if (a == noiselequal) { - listener->panelChanged(Evlocallabnoiselequal, noiselequal->getTextValue()); - } else if (a == noisechrodetail) { - listener->panelChanged(Evlocallabnoisechrodetail, noisechrodetail->getTextValue()); - } else if (a == bilateral) { - listener->panelChanged(Evlocallabbilateral, bilateral->getTextValue()); - } else if (a == sensiden) { - listener->panelChanged(Evlocallabsensiden, sensiden->getTextValue()); - } else if (a == noisechrof) { - listener->panelChanged(Evlocallabnoisechrof, noisechrof->getTextValue()); - } else if (a == noisechroc) { - listener->panelChanged(Evlocallabnoisechroc, noisechroc->getTextValue()); - } else if (a == sharradius) { - listener->panelChanged(Evlocallabsharradius, sharradius->getTextValue()); - } else if (a == sharamount) { - listener->panelChanged(Evlocallabsharamount, sharamount->getTextValue()); - } else if (a == shardamping) { - listener->panelChanged(Evlocallabshardamping, shardamping->getTextValue()); - } else if (a == shariter) { - listener->panelChanged(Evlocallabshariter, shariter->getTextValue()); - } else if (a == sensisha) { - listener->panelChanged(Evlocallabsensis, sensisha->getTextValue()); - } else if (a == sensi) { - listener->panelChanged(Evlocallabsensi, sensi->getTextValue()); - } else if (a == retrab) { - listener->panelChanged(Evlocallabretrab, ""); //retrab->getTextValue()); - } else if (a == radius) { - listener->panelChanged(Evlocallabradius, radius->getTextValue()); - } else if (a == strength) { - listener->panelChanged(Evlocallabstrength, strength->getTextValue()); - } else if (a == stren) { - listener->panelChanged(Evlocallabstren, stren->getTextValue()); - } else if (a == gamma) { - listener->panelChanged(Evlocallabgamma, gamma->getTextValue()); - } else if (a == estop) { - listener->panelChanged(Evlocallabestop, estop->getTextValue()); - } else if (a == scaltm) { - listener->panelChanged(Evlocallabscaltm, scaltm->getTextValue()); - } else if (a == rewei) { - listener->panelChanged(Evlocallabrewei, rewei->getTextValue()); - } else if (a == sensitm) { - listener->panelChanged(Evlocallabsensitm, sensitm->getTextValue()); - } else if (a == str) { - listener->panelChanged(Evlocallabstr, str->getTextValue()); - } else if (a == neigh) { - listener->panelChanged(Evlocallabneigh, neigh->getTextValue()); - } else if (a == hueref) { - listener->panelChanged(Evlocallabhueref, ""); //anbspot->getTextValue()); - } else if (a == huerefblur) { - listener->panelChanged(Evlocallabhuerefblur, ""); //anbspot->getTextValue()); - } else if (a == chromaref) { - listener->panelChanged(Evlocallabchromaref, ""); //anbspot->getTextValue()); - } else if (a == lumaref) { - listener->panelChanged(Evlocallablumaref, ""); //anbspot->getTextValue()); - } else if (a == sobelref) { - listener->panelChanged(Evlocallabsobelref, ""); //anbspot->getTextValue()); - } else if (a == vart) { - listener->panelChanged(Evlocallabvart, vart->getTextValue()); - } else if (a == chrrt) { - listener->panelChanged(Evlocallabchrrt, chrrt->getTextValue()); - } else if (a == threshold) { - listener->panelChanged(EvlocallabThresho, threshold->getTextValue()); - } else if (a == chromacbdl) { - listener->panelChanged(Evlocallabchromacbdl, chromacbdl->getTextValue()); - } else if (a == sensicb) { - listener->panelChanged(Evlocallabsensicb, sensicb->getTextValue()); - } else if (a == sensiexclu) { - listener->panelChanged(Evlocallabsensiexclu, sensiexclu->getTextValue()); - } else if (a == struc) { - listener->panelChanged(Evlocallabstruc, struc->getTextValue()); - } else if (a == sensibn) { - listener->panelChanged(Evlocallabsensibn, sensibn->getTextValue()); - } else if (a == adjblur) { - listener->panelChanged(Evlocallabadjblur, adjblur->getTextValue()); - } else { - listener->panelChanged(EvlocallabEqualizer, - Glib::ustring::compose("%1, %2, %3, %4, %5", - Glib::ustring::format(std::fixed, std::setprecision(0), multiplier[0]->getValue()), - Glib::ustring::format(std::fixed, std::setprecision(0), multiplier[1]->getValue()), - Glib::ustring::format(std::fixed, std::setprecision(0), multiplier[2]->getValue()), - Glib::ustring::format(std::fixed, std::setprecision(0), multiplier[3]->getValue()), - Glib::ustring::format(std::fixed, std::setprecision(0), multiplier[4]->getValue())) - ); + // Contrast by detail levels + if (getEnabled() && expcbdl->getEnabled()) { + if (a == multiplier[0] || a == multiplier[1] || a == multiplier[2] || a == multiplier[3] || a == multiplier[4]) { + if (listener) { + listener->panelChanged(EvlocallabEqualizer, + Glib::ustring::compose("%1, %2, %3, %4, %5", + Glib::ustring::format(std::fixed, std::setprecision(0), multiplier[0]->getValue()), + Glib::ustring::format(std::fixed, std::setprecision(0), multiplier[1]->getValue()), + Glib::ustring::format(std::fixed, std::setprecision(0), multiplier[2]->getValue()), + Glib::ustring::format(std::fixed, std::setprecision(0), multiplier[3]->getValue()), + Glib::ustring::format(std::fixed, std::setprecision(0), multiplier[4]->getValue()))); + } + } + if (a == chromacbdl) { + if (listener) { + listener->panelChanged(Evlocallabchromacbdl, chromacbdl->getTextValue()); + } + } + + if (a == threshold) { + if (listener) { + listener->panelChanged(EvlocallabThresho, threshold->getTextValue()); + } + } + + if (a == sensicb) { + if (listener) { + listener->panelChanged(Evlocallabsensicb, sensicb->getTextValue()); + } + } + } + + // Denoise + if (getEnabled() && expdenoi->getEnabled()) { + if (a == noiselumf) { + if (listener) { + listener->panelChanged(Evlocallabnoiselumf, noiselumf->getTextValue()); + } + } + + if (a == noiselumc) { + if (listener) { + listener->panelChanged(Evlocallabnoiselumc, noiselumc->getTextValue()); + } + } + + if (a == noiselumdetail) { + if (listener) { + listener->panelChanged(Evlocallabnoiselumdetail, noiselumdetail->getTextValue()); + } + } + + if (a == noiselequal) { + if (listener) { + listener->panelChanged(Evlocallabnoiselequal, noiselequal->getTextValue()); + } + } + + if (a == noisechrof) { + if (listener) { + listener->panelChanged(Evlocallabnoisechrof, noisechrof->getTextValue()); + } + } + + if (a == noisechroc) { + if (listener) { + listener->panelChanged(Evlocallabnoisechroc, noisechroc->getTextValue()); + } + } + + if (a == adjblur) { + if (listener) { + listener->panelChanged(Evlocallabadjblur, adjblur->getTextValue()); + } + } + + if (a == bilateral) { + if (listener) { + listener->panelChanged(Evlocallabbilateral, bilateral->getTextValue()); + } + } + + if (a == sensiden) { + if (listener) { + listener->panelChanged(Evlocallabsensiden, sensiden->getTextValue()); + } } } } void Locallab::enabledChanged() { - anbspot->hide(); - hueref->hide(); - huerefblur->hide(); - chromaref->hide(); - lumaref->hide(); - sobelref->hide(); - if (listener) { if (get_inconsistent()) { listener->panelChanged(EvlocallabEnabled, M("GENERAL_UNCHANGED")); @@ -4185,8 +4206,10 @@ void Locallab::enabledChanged() void Locallab::avoidChanged() { + printf("avoidChanged\n"); if (batchMode) { + /* if (avoid->get_inconsistent()) { avoid->set_inconsistent(false); avoidConn.block(true); @@ -4197,13 +4220,16 @@ void Locallab::avoidChanged() } lastavoid = avoid->get_active(); + */ } - if (listener) { - if (getEnabled()) { - listener->panelChanged(Evlocallabavoid, M("GENERAL_ENABLED")); - } else { - listener->panelChanged(Evlocallabavoid, M("GENERAL_DISABLED")); + if (getEnabled() && expdenoi->getEnabled()) { + if (listener) { + if (avoid->get_active()) { + listener->panelChanged(Evlocallabavoid, M("GENERAL_ENABLED")); + } else { + listener->panelChanged(Evlocallabavoid, M("GENERAL_DISABLED")); + } } } } @@ -4534,6 +4560,30 @@ void Locallab::enableListener() qualitycurveMethodConn.block(false); inversConn.block(false); // Exposure + enableexposeConn.block(false); + // Vibrance + enablevibranceConn.block(false); + pskinsconn.block(false); + ashiftconn.block(false); + pastsattogconn.block(false); + // Blur & Noise + enableblurConn.block(false); + blurMethodConn.block(false); + activlumConn.block(false); + // Tone Mapping + enabletonemapConn.block(false); + // Retinex + enableretiConn.block(false); + retinexMethodConn.block(false); + inversretConn.block(false); + // Sharpening + enablesharpConn.block(false); + inversshaConn.block(false); + // Contrast by detail levels + enablecbdlConn.block(false); + // Denoise + enabledenoiConn.block(false); + avoidConn.block(false); } void Locallab::disableListener() @@ -4547,6 +4597,30 @@ void Locallab::disableListener() qualitycurveMethodConn.block(true); inversConn.block(true); // Exposure + enableexposeConn.block(true); + // Vibrance + enablevibranceConn.block(true); + pskinsconn.block(true); + ashiftconn.block(true); + pastsattogconn.block(true); + // Blur & Noise + enableblurConn.block(true); + blurMethodConn.block(true); + activlumConn.block(true); + // Tone Mapping + enabletonemapConn.block(true); + // Retinex + enableretiConn.block(true); + retinexMethodConn.block(true); + inversretConn.block(true); + // Sharpening + enablesharpConn.block(true); + inversshaConn.block(true); + // Contrast by detail levels + enablecbdlConn.block(true); + // Denoise + enabledenoiConn.block(true); + avoidConn.block(true); } void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, int index) @@ -4561,6 +4635,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, int lightness->setValue(pp->locallab.lightness.at(index)); contrast->setValue(pp->locallab.contrast.at(index)); chroma->setValue(pp->locallab.chroma.at(index)); + sensi->setValue(pp->locallab.sensi.at(index)); if (pp->locallab.qualitycurveMethod.at(index) == "none") { qualitycurveMethod->set_active(0); @@ -4577,7 +4652,103 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, int invers->set_active((bool)pp->locallab.invers.at(index)); // Exposure + expexpose->setEnabled((bool)pp->locallab.expexpose.at(index)); + expcomp->setValue(pp->locallab.expcomp.at(index)); + hlcompr->setValue(pp->locallab.hlcompr.at(index)); + hlcomprthresh->setValue(pp->locallab.hlcomprthresh.at(index)); + black->setValue(pp->locallab.black.at(index)); + shcompr->setValue(pp->locallab.shcompr.at(index)); + warm->setValue(pp->locallab.warm.at(index)); + sensiex->setValue(pp->locallab.sensiex.at(index)); + shapeexpos->setCurve(pp->locallab.excurve.at(index)); + // Vibrance + expvibrance->setEnabled((bool)pp->locallab.expvibrance.at(index)); + saturated->setValue(pp->locallab.saturated.at(index)); + pastels->setValue(pp->locallab.pastels.at(index)); + psThreshold->setValue(pp->locallab.psthreshold.at(index)); + protectSkins->set_active((bool)pp->locallab.protectskins.at(index)); + avoidColorShift->set_active((bool)pp->locallab.avoidcolorshift.at(index)); + pastSatTog->set_active((bool)pp->locallab.pastsattog.at(index)); + sensiv->setValue(pp->locallab.sensiv.at(index)); + skinTonesCurve->setCurve(pp->locallab.skintonescurve.at(index)); + + // Blur & Noise + expblur->setEnabled((bool)pp->locallab.expblur.at(index)); + radius->setValue(pp->locallab.radius.at(index)); + strength->setValue(pp->locallab.strength.at(index)); + sensibn->setValue(pp->locallab.sensibn.at(index)); + + if (pp->locallab.blurMethod.at(index) == "norm") { + blurMethod->set_active(0); + } else if (pp->locallab.blurMethod.at(index) == "inv") { + blurMethod->set_active(1); + } else { + blurMethod->set_active(2); + } + + activlum->set_active((bool)pp->locallab.activlum.at(index)); + + // Tone Mapping + exptonemap->setEnabled((bool)pp->locallab.exptonemap.at(index)); + stren->setValue(pp->locallab.stren.at(index)); + gamma->setValue(pp->locallab.gamma.at(index)); + estop->setValue(pp->locallab.estop.at(index)); + scaltm->setValue(pp->locallab.scaltm.at(index)); + rewei->setValue(pp->locallab.rewei.at(index)); + sensitm->setValue(pp->locallab.sensitm.at(index)); + + // Retinex + expreti->setEnabled((bool)pp->locallab.expreti.at(index)); + + if (pp->locallab.retinexMethod.at(index) == "low") { + retinexMethod->set_active(0); + } else if (pp->locallab.retinexMethod.at(index) == "uni") { + retinexMethod->set_active(1); + } else { + retinexMethod->set_active(2); + } + + str->setValue(pp->locallab.str.at(index)); + chrrt->setValue(pp->locallab.chrrt.at(index)); + neigh->setValue(pp->locallab.neigh.at(index)); + vart->setValue(pp->locallab.vart.at(index)); + sensih->setValue(pp->locallab.sensih.at(index)); + cTgainshape->setCurve(pp->locallab.localTgaincurve.at(index)); + inversret->set_active((bool)pp->locallab.inversret.at(index)); + + // Sharpening + expsharp->setEnabled((bool)pp->locallab.expsharp.at(index)); + sharradius->setValue(pp->locallab.sharradius.at(index)); + sharamount->setValue(pp->locallab.sharamount.at(index)); + shardamping->setValue(pp->locallab.shardamping.at(index)); + shariter->setValue(pp->locallab.shariter.at(index)); + sensisha->setValue(pp->locallab.sensisha.at(index)); + inverssha->set_active((bool)pp->locallab.inverssha.at(index)); + + // Contrast by detail levels + expcbdl->setEnabled((bool)pp->locallab.expcbdl.at(index)); + + for (int i = 0; i < 5; i++) { + multiplier[i]->setValue(pp->locallab.mult[i].at(index)); + } + + chromacbdl->setValue(pp->locallab.chromacbdl.at(index)); + threshold->setValue(pp->locallab.threshold.at(index)); + sensicb->setValue(pp->locallab.sensicb.at(index)); + + // Denoise + expdenoi->setEnabled((bool)pp->locallab.expdenoi.at(index)); + noiselumf->setValue(pp->locallab.noiselumf.at(index)); + noiselumc->setValue(pp->locallab.noiselumc.at(index)); + noiselumdetail->setValue(pp->locallab.noiselumdetail.at(index)); + noiselequal->setValue(pp->locallab.noiselequal.at(index)); + noisechrof->setValue(pp->locallab.noisechrof.at(index)); + noisechroc->setValue(pp->locallab.noisechroc.at(index)); + adjblur->setValue(pp->locallab.adjblur.at(index)); + bilateral->setValue(pp->locallab.bilateral.at(index)); + sensiden->setValue(pp->locallab.sensiden.at(index)); + avoid->set_active((bool)pp->locallab.avoid.at(index)); } // Update Color & Light GUI according to invers button state @@ -4596,6 +4767,50 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, int labqualcurv->show(); } + + // Update Exposure GUI according to black adjuster state + shcompr->set_sensitive(!((int)black->getValue() == 0)); // At black = 0, shcompr value has no effect + + // Update Vibrance GUI according to pastsattog button state + if (pastSatTog->get_active()) { + // Link both slider, so we set saturated and psThresholds unsensitive + psThreshold->set_sensitive(false); + saturated->set_sensitive(false); + saturated->setValue(pastels->getValue()); // Pastels and Saturated are linked + } else { + // Separate sliders, so we set saturated and psThresholds sensitive again + psThreshold->set_sensitive(true); + saturated->set_sensitive(true); + } + + // Update Retinex GUI according to inversret button state + if (inversret->get_active()) { + sensih->hide(); + } else { + sensih->show(); + } + + // Update Sharpening GUI according to inverssha button state + if (inverssha->get_active()) { + sensisha->hide(); + } else { + sensisha->show(); + } + + /* + lastactivlum = pp->locallab.activlum; + lastProtectSkins = pp->locallab.protectskins; + lastAvoidColorShift = pp->locallab.avoidcolorshift; + lastPastSatTog = pp->locallab.pastsattog; + lastavoid = pp->locallab.avoid; + lastinvers = pp->locallab.invers; + lastcutpast = pp->locallab.cutpast; + lastlastdust = pp->locallab.lastdust; + lastcurvactiv = pp->locallab.curvactiv; + lastinversrad = pp->locallab.inversrad; + lastinversret = pp->locallab.inversret; + lastinverssha = pp->locallab.inverssha; + */ } void Locallab::autoOpenCurve() diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 10127e19a..31b7fa125 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -360,94 +360,80 @@ void ParamsEdited::set(bool v) locallab.HHcurve = v; locallab.invers = v; // Exposure - - /* locallab.expexpose = v; - locallab.expvibrance = v; - locallab.expblur = v; - locallab.exptonemap = v; - locallab.expreti = v; - locallab.expsharp = v; - locallab.expcbdl = v; - locallab.expdenoi = v; - locallab.adjblur = v; - locallab.warm = v; locallab.expcomp = v; locallab.hlcompr = v; locallab.hlcomprthresh = v; locallab.black = v; locallab.shcompr = v; - locallab.noiselumf = v; - locallab.noiselumc = v; - locallab.noiselumdetail = v; - locallab.noiselequal = v; - locallab.noisechrodetail = v; - locallab.bilateral = v; - locallab.sensiden = v; - locallab.noisechrof = v; - locallab.noisechroc = v; - locallab.sharradius = v; - locallab.sharamount = v; - locallab.shardamping = v; - locallab.shariter = v; + locallab.warm = v; locallab.sensiex = v; - locallab.sensih = v; - locallab.retrab = v; - locallab.sensiexclu = v; - locallab.struc = v; - locallab.sensicb = v; - locallab.sensibn = v; - locallab.sensitm = v; - locallab.sensisha = v; + locallab.excurve = v; + // Vibrance + locallab.expvibrance = v; + locallab.saturated = v; + locallab.pastels = v; + locallab.psthreshold = v; + locallab.protectskins = v; + locallab.avoidcolorshift = v; + locallab.pastsattog = v; + locallab.sensiv = v; + locallab.skintonescurve = v; + // Blur & Noise + locallab.expblur = v; locallab.radius = v; locallab.strength = v; + locallab.sensibn = v; + locallab.blurMethod = v; + locallab.activlum = v; + // Tone Mapping + locallab.exptonemap = v; locallab.stren = v; locallab.gamma = v; locallab.estop = v; locallab.scaltm = v; locallab.rewei = v; - locallab.chrrt = v; - locallab.avoid = v; - locallab.Exclumethod = v; - locallab.shapemethod = v; + locallab.sensitm = v; + // Retinex + locallab.expreti = v; locallab.retinexMethod = v; - locallab.cutpast = v; - locallab.lastdust = v; - locallab.activlum = v; - locallab.inversrad = v; - locallab.inversret = v; - locallab.inverssha = v; locallab.str = v; + locallab.chrrt = v; locallab.neigh = v; - locallab.nbspot = v; - locallab.anbspot = v; - locallab.hueref = v; - locallab.huerefblur = v; - locallab.chromaref = v; - locallab.lumaref = v; - locallab.sobelref = v; locallab.vart = v; + locallab.sensih = v; locallab.localTgaincurve = v; - locallab.localTgaincurverab = v; - locallab.excurve = v; + locallab.inversret = v; + // Sharpening + locallab.expsharp = v; + locallab.sharradius = v; + locallab.sharamount = v; + locallab.shardamping = v; + locallab.shariter = v; + locallab.sensisha = v; + locallab.inverssha = v; + // Contrast by detail levels + locallab.expcbdl = v; + for (int i = 0; i < 5; i++) { locallab.mult[i] = v; } - locallab.threshold = v; + locallab.chromacbdl = v; - locallab.pastels = v; - locallab.saturated = v; - locallab.psthreshold = v; - locallab.protectskins = v; - locallab.avoidcolorshift = v; - locallab.pastsattog = v; - locallab.skintonescurve = v; - locallab.sensiv = v; - locallab.spotduplicated = v; - locallab.id = v; - locallab.name = v; - locallab.isvisible = v; - */ + locallab.threshold = v; + locallab.sensicb = v; + // Denoise + locallab.expdenoi = v; + locallab.noiselumf = v; + locallab.noiselumc = v; + locallab.noiselumdetail = v; + locallab.noiselequal = v; + locallab.noisechrof = v; + locallab.noisechroc = v; + locallab.adjblur = v; + locallab.bilateral = v; + locallab.sensiden = v; + locallab.avoid = v; pcvignette.enabled = v; pcvignette.strength = v; @@ -1038,92 +1024,80 @@ void ParamsEdited::initFrom(const std::vector& locallab.HHcurve = locallab.HHcurve && p.locallab.HHcurve == other.locallab.HHcurve; locallab.invers = locallab.invers && p.locallab.invers == other.locallab.invers; // Exposure - - /* - locallab.avoid = locallab.avoid && p.locallab.avoid == other.locallab.avoid; - locallab.cutpast = locallab.cutpast && p.locallab.cutpast == other.locallab.cutpast; - locallab.lastdust = locallab.lastdust && p.locallab.lastdust == other.locallab.lastdust; - locallab.activlum = locallab.activlum && p.locallab.activlum == other.locallab.activlum; - locallab.inversrad = locallab.inversrad && p.locallab.inversrad == other.locallab.inversrad; - locallab.inversret = locallab.inversret && p.locallab.inversret == other.locallab.inversret; - locallab.inverssha = locallab.inverssha && p.locallab.inverssha == other.locallab.inverssha; - locallab.Exclumethod = locallab.Exclumethod && p.locallab.Exclumethod == other.locallab.Exclumethod; - locallab.retinexMethod = locallab.retinexMethod && p.locallab.retinexMethod == other.locallab.retinexMethod; - locallab.adjblur = locallab.adjblur && p.locallab.adjblur == other.locallab.adjblur; - locallab.warm = locallab.warm && p.locallab.warm == other.locallab.warm; + locallab.expexpose = locallab.expexpose && p.locallab.expexpose == other.locallab.expexpose; locallab.expcomp = locallab.expcomp && p.locallab.expcomp == other.locallab.expcomp; locallab.hlcompr = locallab.hlcompr && p.locallab.hlcompr == other.locallab.hlcompr; locallab.hlcomprthresh = locallab.hlcomprthresh && p.locallab.hlcomprthresh == other.locallab.hlcomprthresh; locallab.black = locallab.black && p.locallab.black == other.locallab.black; locallab.shcompr = locallab.shcompr && p.locallab.shcompr == other.locallab.shcompr; - locallab.noiselumf = locallab.noiselumf && p.locallab.noiselumf == other.locallab.noiselumf; - locallab.noiselumc = locallab.noiselumc && p.locallab.noiselumc == other.locallab.noiselumc; - locallab.noiselumdetail = locallab.noiselumdetail && p.locallab.noiselumdetail == other.locallab.noiselumdetail; - locallab.noiselequal = locallab.noiselequal && p.locallab.noiselequal == other.locallab.noiselequal; - locallab.noisechrodetail = locallab.noisechrodetail && p.locallab.noisechrodetail == other.locallab.noisechrodetail; - locallab.bilateral = locallab.bilateral && p.locallab.bilateral == other.locallab.bilateral; - locallab.sensiden = locallab.sensiden && p.locallab.sensiden == other.locallab.sensiden; - locallab.noisechrof = locallab.noisechrof && p.locallab.noisechrof == other.locallab.noisechrof; - locallab.noisechroc = locallab.noisechroc && p.locallab.noisechroc == other.locallab.noisechroc; - locallab.sharradius = locallab.sharradius && p.locallab.sharradius == other.locallab.sharradius; - locallab.sharamount = locallab.sharamount && p.locallab.sharamount == other.locallab.sharamount; - locallab.shariter = locallab.shariter && p.locallab.shariter == other.locallab.shariter; + locallab.warm = locallab.warm && p.locallab.warm == other.locallab.warm; locallab.sensiex = locallab.sensiex && p.locallab.sensiex == other.locallab.sensiex; - locallab.sensih = locallab.sensih && p.locallab.sensih == other.locallab.sensih; - locallab.retrab = locallab.retrab && p.locallab.retrab == other.locallab.retrab; - locallab.sensiexclu = locallab.sensiexclu && p.locallab.sensiexclu == other.locallab.sensiexclu; - locallab.struc = locallab.struc && p.locallab.struc == other.locallab.struc; - locallab.sensicb = locallab.sensicb && p.locallab.sensicb == other.locallab.sensicb; - locallab.sensibn = locallab.sensibn && p.locallab.sensibn == other.locallab.sensibn; - locallab.sensitm = locallab.sensitm && p.locallab.sensitm == other.locallab.sensitm; - locallab.sensisha = locallab.sensisha && p.locallab.sensisha == other.locallab.sensisha; + locallab.excurve = locallab.excurve && p.locallab.excurve == other.locallab.excurve; + // Vibrance + locallab.expvibrance = locallab.expvibrance && p.locallab.expvibrance == other.locallab.expvibrance; + locallab.saturated = locallab.saturated && p.locallab.saturated == other.locallab.saturated; + locallab.pastels = locallab.pastels && p.locallab.pastels == other.locallab.pastels; + locallab.psthreshold = locallab.psthreshold && p.locallab.psthreshold == other.locallab.psthreshold; + locallab.protectskins = locallab.protectskins && p.locallab.protectskins == other.locallab.protectskins; + locallab.avoidcolorshift = locallab.avoidcolorshift && p.locallab.avoidcolorshift == other.locallab.avoidcolorshift; + locallab.pastsattog = locallab.pastsattog && p.locallab.pastsattog == other.locallab.pastsattog; + locallab.sensiv = locallab.sensiv && p.locallab.sensiv == other.locallab.sensiv; + locallab.skintonescurve = locallab.skintonescurve && p.locallab.skintonescurve == other.locallab.skintonescurve; + // Blur & Noise + locallab.expblur = locallab.expblur && p.locallab.expblur == other.locallab.expblur; locallab.radius = locallab.radius && p.locallab.radius == other.locallab.radius; locallab.strength = locallab.strength && p.locallab.strength == other.locallab.strength; + locallab.sensibn = locallab.sensibn && p.locallab.sensibn == other.locallab.sensibn; + locallab.blurMethod = locallab.blurMethod && p.locallab.blurMethod == other.locallab.blurMethod; + locallab.activlum = locallab.activlum && p.locallab.activlum == other.locallab.activlum; + // Tone Mapping + locallab.exptonemap = locallab.exptonemap && p.locallab.exptonemap == other.locallab.exptonemap; locallab.stren = locallab.stren && p.locallab.stren == other.locallab.stren; locallab.gamma = locallab.gamma && p.locallab.gamma == other.locallab.gamma; locallab.estop = locallab.estop && p.locallab.estop == other.locallab.estop; locallab.scaltm = locallab.scaltm && p.locallab.scaltm == other.locallab.scaltm; locallab.rewei = locallab.rewei && p.locallab.rewei == other.locallab.rewei; - locallab.transit = locallab.transit && p.locallab.transit == other.locallab.transit; - locallab.chrrt = locallab.chrrt && p.locallab.chrrt == other.locallab.chrrt; - locallab.str = locallab.str && p.locallab.str == other.locallab.str; - locallab.neigh = locallab.neigh && p.locallab.neigh == other.locallab.neigh; - locallab.nbspot = locallab.nbspot && p.locallab.nbspot == other.locallab.nbspot; - locallab.anbspot = locallab.anbspot && p.locallab.anbspot == other.locallab.anbspot; - locallab.hueref = locallab.hueref && p.locallab.hueref == other.locallab.hueref; - locallab.huerefblur = locallab.huerefblur && p.locallab.huerefblur == other.locallab.huerefblur; - locallab.chromaref = locallab.chromaref && p.locallab.chromaref == other.locallab.chromaref; - locallab.lumaref = locallab.lumaref && p.locallab.lumaref == other.locallab.lumaref; - locallab.sobelref = locallab.sobelref && p.locallab.sobelref == other.locallab.sobelref; - locallab.vart = locallab.vart && p.locallab.vart == other.locallab.vart; - locallab.localTgaincurve = locallab.localTgaincurve && p.locallab.localTgaincurve == other.locallab.localTgaincurve; - locallab.localTgaincurverab = locallab.localTgaincurverab && p.locallab.localTgaincurverab == other.locallab.localTgaincurverab; - locallab.excurve = locallab.excurve && p.locallab.excurve == other.locallab.excurve; - locallab.expexpose = locallab.expexpose && p.locallab.expexpose == other.locallab.expexpose; - locallab.expvibrance = locallab.expvibrance && p.locallab.expvibrance == other.locallab.expvibrance; - locallab.expblur = locallab.expblur && p.locallab.expblur == other.locallab.expblur; - locallab.exptonemap = locallab.exptonemap && p.locallab.exptonemap == other.locallab.exptonemap; + locallab.sensitm = locallab.sensitm && p.locallab.sensitm == other.locallab.sensitm; + // Retinex locallab.expreti = locallab.expreti && p.locallab.expreti == other.locallab.expreti; + locallab.retinexMethod = locallab.retinexMethod && p.locallab.retinexMethod == other.locallab.retinexMethod; + locallab.str = locallab.str && p.locallab.str == other.locallab.str; + locallab.chrrt = locallab.chrrt && p.locallab.chrrt == other.locallab.chrrt; + locallab.neigh = locallab.neigh && p.locallab.neigh == other.locallab.neigh; + locallab.vart = locallab.vart && p.locallab.vart == other.locallab.vart; + locallab.sensih = locallab.sensih && p.locallab.sensih == other.locallab.sensih; + locallab.localTgaincurve = locallab.localTgaincurve && p.locallab.localTgaincurve == other.locallab.localTgaincurve; + locallab.inversret = locallab.inversret && p.locallab.inversret == other.locallab.inversret; + // Sharpening locallab.expsharp = locallab.expsharp && p.locallab.expsharp == other.locallab.expsharp; + locallab.sharradius = locallab.sharradius && p.locallab.sharradius == other.locallab.sharradius; + locallab.sharamount = locallab.sharamount && p.locallab.sharamount == other.locallab.sharamount; + locallab.shardamping = locallab.shardamping && p.locallab.shardamping == other.locallab.shardamping; + locallab.shariter = locallab.shariter && p.locallab.shariter == other.locallab.shariter; + locallab.sensisha = locallab.sensisha && p.locallab.sensisha == other.locallab.sensisha; + locallab.inverssha = locallab.inverssha && p.locallab.inverssha == other.locallab.inverssha; + // Contrast by detail levels locallab.expcbdl = locallab.expcbdl && p.locallab.expcbdl == other.locallab.expcbdl; - locallab.expdenoi = locallab.expdenoi && p.locallab.expdenoi == other.locallab.expdenoi; for (int i = 0; i < 5; i++) { locallab.mult[i] = locallab.mult[i] && p.locallab.mult[i] == other.locallab.mult[i]; } - locallab.threshold = locallab.threshold && p.locallab.threshold == other.locallab.threshold; locallab.chromacbdl = locallab.chromacbdl && p.locallab.chromacbdl == other.locallab.chromacbdl; - locallab.pastels = locallab.pastels && p.locallab.pastels == other.locallab.pastels; - locallab.saturated = locallab.saturated && p.locallab.saturated == other.locallab.saturated; - locallab.psthreshold = locallab.psthreshold && p.locallab.psthreshold == other.locallab.psthreshold; - locallab.protectskins = locallab.protectskins && p.locallab.protectskins == other.locallab.protectskins; - locallab.avoidcolorshift = locallab.avoidcolorshift && p.locallab.avoidcolorshift == other.locallab.avoidcolorshift; - locallab.pastsattog = locallab.pastsattog && p.locallab.pastsattog == other.locallab.pastsattog; - locallab.skintonescurve = locallab.skintonescurve && p.locallab.skintonescurve == other.locallab.skintonescurve; - locallab.sensiv = locallab.sensiv && p.locallab.sensiv == other.locallab.sensiv; - locallab.spotduplicated = locallab.spotduplicated && p.locallab.spotduplicated == other.locallab.spotduplicated; - */ + locallab.threshold = locallab.threshold && p.locallab.threshold == other.locallab.threshold; + locallab.sensicb = locallab.sensicb && p.locallab.sensicb == other.locallab.sensicb; + // Denoise + locallab.expdenoi = locallab.expdenoi && p.locallab.expdenoi == other.locallab.expdenoi; + locallab.noiselumf = locallab.noiselumf && p.locallab.noiselumf == other.locallab.noiselumf; + locallab.noiselumc = locallab.noiselumc && p.locallab.noiselumc == other.locallab.noiselumc; + locallab.noiselumdetail = locallab.noiselumdetail && p.locallab.noiselumdetail == other.locallab.noiselumdetail; + locallab.noiselequal = locallab.noiselequal && p.locallab.noiselequal == other.locallab.noiselequal; + locallab.noisechrof = locallab.noisechrof && p.locallab.noisechrof == other.locallab.noisechrof; + locallab.noisechroc = locallab.noisechroc && p.locallab.noisechroc == other.locallab.noisechroc; + locallab.adjblur = locallab.adjblur && p.locallab.adjblur == other.locallab.adjblur; + locallab.bilateral = locallab.bilateral && p.locallab.bilateral == other.locallab.bilateral; + locallab.sensiden = locallab.sensiden && p.locallab.sensiden == other.locallab.sensiden; + locallab.avoid = locallab.avoid && p.locallab.avoid == other.locallab.avoid; pcvignette.enabled = pcvignette.enabled && p.pcvignette.enabled == other.pcvignette.enabled; pcvignette.strength = pcvignette.strength && p.pcvignette.strength == other.pcvignette.strength; @@ -2472,6 +2446,7 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.gradient.centerY = dontforceSet && options.baBehav[ADDSET_GRADIENT_CENTER] ? toEdit.gradient.centerY + mods.gradient.centerY : mods.gradient.centerY; } + if (locallab.enabled) { toEdit.locallab.enabled = mods.locallab.enabled; } @@ -2603,92 +2578,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng } // Exposure - - /* if (locallab.expexpose) { toEdit.locallab.expexpose = mods.locallab.expexpose; } - if (locallab.expvibrance) { - toEdit.locallab.expvibrance = mods.locallab.expvibrance; - } - - if (locallab.expblur) { - toEdit.locallab.expblur = mods.locallab.expblur; - } - - if (locallab.exptonemap) { - toEdit.locallab.exptonemap = mods.locallab.exptonemap; - } - - if (locallab.expreti) { - toEdit.locallab.expreti = mods.locallab.expreti; - } - - if (locallab.expsharp) { - toEdit.locallab.expsharp = mods.locallab.expsharp; - } - - if (locallab.expcbdl) { - toEdit.locallab.expcbdl = mods.locallab.expcbdl; - } - - if (locallab.expdenoi) { - toEdit.locallab.expdenoi = mods.locallab.expdenoi; - } - - if (locallab.avoid) { - toEdit.locallab.avoid = mods.locallab.avoid; - } - - if (locallab.cutpast) { - toEdit.locallab.cutpast = mods.locallab.cutpast; - } - - if (locallab.lastdust) { - toEdit.locallab.lastdust = mods.locallab.lastdust; - } - - if (locallab.activlum) { - toEdit.locallab.activlum = mods.locallab.activlum; - } - - if (locallab.inversrad) { - toEdit.locallab.inversrad = mods.locallab.inversrad; - } - - if (locallab.inverssha) { - toEdit.locallab.inverssha = mods.locallab.inverssha; - } - - if (locallab.inversret) { - toEdit.locallab.inversret = mods.locallab.inversret; - } - - if (locallab.Exclumethod) { - toEdit.locallab.Exclumethod = mods.locallab.Exclumethod; - } - - if (locallab.retinexMethod) { - toEdit.locallab.retinexMethod = mods.locallab.retinexMethod; - } - - if (locallab.adjblur) { - toEdit.locallab.adjblur = mods.locallab.adjblur; - } - - if (locallab.thres) { - toEdit.locallab.thres = mods.locallab.thres; - } - - if (locallab.proxi) { - toEdit.locallab.proxi = mods.locallab.proxi; - } - - if (locallab.warm) { - toEdit.locallab.warm = mods.locallab.warm; - } - if (locallab.expcomp) { toEdit.locallab.expcomp = mods.locallab.expcomp; } @@ -2709,14 +2602,31 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.shcompr = mods.locallab.shcompr; } - if (locallab.pastels) { - toEdit.locallab.pastels = mods.locallab.pastels; + if (locallab.warm) { + toEdit.locallab.warm = mods.locallab.warm; + } + + if (locallab.sensiex) { + toEdit.locallab.sensiex = mods.locallab.sensiex; + } + + if (locallab.excurve) { + toEdit.locallab.excurve = mods.locallab.excurve; + } + + // Vibrance + if (locallab.expvibrance) { + toEdit.locallab.expvibrance = mods.locallab.expvibrance; } if (locallab.saturated) { toEdit.locallab.saturated = mods.locallab.saturated; } + if (locallab.pastels) { + toEdit.locallab.pastels = mods.locallab.pastels; + } + if (locallab.psthreshold) { toEdit.locallab.psthreshold = mods.locallab.psthreshold; } @@ -2733,100 +2643,17 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.pastsattog = mods.locallab.pastsattog; } - if (locallab.skintonescurve) { - toEdit.locallab.skintonescurve = mods.locallab.skintonescurve; - } - if (locallab.sensiv) { toEdit.locallab.sensiv = mods.locallab.sensiv; } - if (locallab.sensiex) { - toEdit.locallab.sensiex = mods.locallab.sensiex; + if (locallab.skintonescurve) { + toEdit.locallab.skintonescurve = mods.locallab.skintonescurve; } - if (locallab.noiselumf) { - toEdit.locallab.noiselumf = mods.locallab.noiselumf; - } - - if (locallab.noiselumc) { - toEdit.locallab.noiselumc = mods.locallab.noiselumc; - } - - if (locallab.noiselumdetail) { - toEdit.locallab.noiselumdetail = mods.locallab.noiselumdetail; - } - - if (locallab.noiselequal) { - toEdit.locallab.noiselequal = mods.locallab.noiselequal; - } - - if (locallab.noisechrodetail) { - toEdit.locallab.noisechrodetail = mods.locallab.noisechrodetail; - } - - if (locallab.bilateral) { - toEdit.locallab.bilateral = mods.locallab.bilateral; - } - - if (locallab.sensiden) { - toEdit.locallab.sensiden = mods.locallab.sensiden; - } - - if (locallab.noisechrof) { - toEdit.locallab.noisechrof = mods.locallab.noisechrof; - } - - if (locallab.noisechroc) { - toEdit.locallab.noisechroc = mods.locallab.noisechroc; - } - - if (locallab.sharradius) { - toEdit.locallab.sharradius = mods.locallab.sharradius; - } - - if (locallab.sharamount) { - toEdit.locallab.sharamount = mods.locallab.sharamount; - } - - if (locallab.shardamping) { - toEdit.locallab.shardamping = mods.locallab.shardamping; - } - - if (locallab.shariter) { - toEdit.locallab.shariter = mods.locallab.shariter; - } - - if (locallab.sensitm) { - toEdit.locallab.sensitm = mods.locallab.sensitm; - } - - if (locallab.sensih) { - toEdit.locallab.sensih = mods.locallab.sensih; - } - - if (locallab.retrab) { - toEdit.locallab.retrab = mods.locallab.retrab; - } - - if (locallab.sensiexclu) { - toEdit.locallab.sensiexclu = mods.locallab.sensiexclu; - } - - if (locallab.struc) { - toEdit.locallab.struc = mods.locallab.struc; - } - - if (locallab.sensicb) { - toEdit.locallab.sensicb = mods.locallab.sensicb; - } - - if (locallab.sensibn) { - toEdit.locallab.sensibn = mods.locallab.sensibn; - } - - if (locallab.sensisha) { - toEdit.locallab.sensisha = mods.locallab.sensisha; + // Blur & Noise + if (locallab.expblur) { + toEdit.locallab.expblur = mods.locallab.expblur; } if (locallab.radius) { @@ -2837,6 +2664,23 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.strength = mods.locallab.strength; } + if (locallab.sensibn) { + toEdit.locallab.sensibn = mods.locallab.sensibn; + } + + if (locallab.blurMethod) { + toEdit.locallab.blurMethod = mods.locallab.blurMethod; + } + + if (locallab.activlum) { + toEdit.locallab.activlum = mods.locallab.activlum; + } + + // Tone Mapping + if (locallab.exptonemap) { + toEdit.locallab.exptonemap = mods.locallab.exptonemap; + } + if (locallab.stren) { toEdit.locallab.stren = mods.locallab.stren; } @@ -2857,52 +2701,79 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.rewei = mods.locallab.rewei; } - if (locallab.chrrt) { - toEdit.locallab.chrrt = mods.locallab.chrrt; + if (locallab.sensitm) { + toEdit.locallab.sensitm = mods.locallab.sensitm; + } + + // Retinex + if (locallab.expreti) { + toEdit.locallab.expreti = mods.locallab.expreti; + } + + if (locallab.retinexMethod) { + toEdit.locallab.retinexMethod = mods.locallab.retinexMethod; } if (locallab.str) { toEdit.locallab.str = mods.locallab.str; } + if (locallab.chrrt) { + toEdit.locallab.chrrt = mods.locallab.chrrt; + } + if (locallab.neigh) { toEdit.locallab.neigh = mods.locallab.neigh; } - if (locallab.hueref) { - toEdit.locallab.hueref = mods.locallab.hueref; - } - - if (locallab.huerefblur) { - toEdit.locallab.huerefblur = mods.locallab.huerefblur; - } - - if (locallab.chromaref) { - toEdit.locallab.chromaref = mods.locallab.chromaref; - } - - if (locallab.lumaref) { - toEdit.locallab.lumaref = mods.locallab.lumaref; - } - - if (locallab.sobelref) { - toEdit.locallab.sobelref = mods.locallab.sobelref; - } - if (locallab.vart) { toEdit.locallab.vart = mods.locallab.vart; } + if (locallab.sensih) { + toEdit.locallab.sensih = mods.locallab.sensih; + } + if (locallab.localTgaincurve) { toEdit.locallab.localTgaincurve = mods.locallab.localTgaincurve; } - if (locallab.excurve) { - toEdit.locallab.excurve = mods.locallab.excurve; + if (locallab.inversret) { + toEdit.locallab.inversret = mods.locallab.inversret; } - if (locallab.localTgaincurverab) { - toEdit.locallab.localTgaincurverab = mods.locallab.localTgaincurverab; + // Sharpening + if (locallab.expsharp) { + toEdit.locallab.expsharp = mods.locallab.expsharp; + } + + if (locallab.sharradius) { + toEdit.locallab.sharradius = mods.locallab.sharradius; + } + + if (locallab.sharamount) { + toEdit.locallab.sharamount = mods.locallab.sharamount; + } + + if (locallab.shardamping) { + toEdit.locallab.shardamping = mods.locallab.shardamping; + } + + if (locallab.shariter) { + toEdit.locallab.shariter = mods.locallab.shariter; + } + + if (locallab.sensisha) { + toEdit.locallab.sensisha = mods.locallab.sensisha; + } + + if (locallab.inverssha) { + toEdit.locallab.inverssha = mods.locallab.inverssha; + } + + // Contrast by detail levels + if (locallab.expcbdl) { + toEdit.locallab.expcbdl = mods.locallab.expcbdl; } for (int i = 0; i < 5; i++) { @@ -2911,14 +2782,63 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng } } + if (locallab.chromacbdl) { + toEdit.locallab.chromacbdl = mods.locallab.chromacbdl; + } + if (locallab.threshold) { toEdit.locallab.threshold = mods.locallab.threshold; } - if (locallab.chromacbdl) { - toEdit.locallab.chromacbdl = mods.locallab.chromacbdl; + if (locallab.sensicb) { + toEdit.locallab.sensicb = mods.locallab.sensicb; } - */ + + // Denoise + if (locallab.expdenoi) { + toEdit.locallab.expdenoi = mods.locallab.expdenoi; + } + + if (locallab.noiselumf) { + toEdit.locallab.noiselumf = mods.locallab.noiselumf; + } + + if (locallab.noiselumc) { + toEdit.locallab.noiselumc = mods.locallab.noiselumc; + } + + if (locallab.noiselumdetail) { + toEdit.locallab.noiselumdetail = mods.locallab.noiselumdetail; + } + + if (locallab.noiselequal) { + toEdit.locallab.noiselequal = mods.locallab.noiselequal; + } + + if (locallab.noisechrof) { + toEdit.locallab.noisechrof = mods.locallab.noisechrof; + } + + if (locallab.noisechroc) { + toEdit.locallab.noisechroc = mods.locallab.noisechroc; + } + + if (locallab.adjblur) { + toEdit.locallab.adjblur = mods.locallab.adjblur; + } + + if (locallab.bilateral) { + toEdit.locallab.bilateral = mods.locallab.bilateral; + } + + if (locallab.sensiden) { + toEdit.locallab.sensiden = mods.locallab.sensiden; + } + + if (locallab.avoid) { + toEdit.locallab.avoid = mods.locallab.avoid; + } + if (pcvignette.enabled) { toEdit.pcvignette.enabled = mods.pcvignette.enabled; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 61e374222..2c50f6586 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -491,88 +491,76 @@ public: bool HHcurve; bool invers; // Exposure - - /* - bool adjblur; - bool warm; + bool expexpose; bool expcomp; bool hlcompr; bool hlcomprthresh; bool black; bool shcompr; - bool noiselumf; - bool noiselumc; - bool noiselumdetail; - bool noiselequal; - bool noisechrodetail; - bool bilateral; - bool sensiden; - bool noisechrof; - bool noisechroc; - bool sharradius; - bool sharamount; - bool shardamping; - bool shariter; + bool warm; bool sensiex; - bool sensih; - bool retrab; - bool sensicb; - bool sensibn; - bool sensitm; - bool sensisha; + bool excurve; + // Vibrance + bool expvibrance; + bool saturated; + bool pastels; + bool psthreshold; + bool protectskins; + bool avoidcolorshift; + bool pastsattog; + bool sensiv; + bool skintonescurve; + // Blur & Noise + bool expblur; bool radius; bool strength; + bool sensibn; + bool blurMethod; + bool activlum; + // Tone Mapping + bool exptonemap; bool stren; bool gamma; bool estop; bool scaltm; bool rewei; - bool transit; - bool avoid; - bool Exclumethod; - bool shapemethod; - bool sensiexclu; - bool struc; + bool sensitm; + // Retinex + bool expreti; bool retinexMethod; bool str; - bool neigh; - bool hueref; - bool huerefblur; - bool chromaref; - bool lumaref; - bool sobelref; - bool vart; - bool activlum; - bool cutpast; - bool lastdust; - bool inversrad; - bool inversret; - bool inverssha; - bool localTgaincurve; - bool localTgaincurverab; - bool excurve; bool chrrt; - bool mult[5]; - bool threshold; - bool chromacbdl; - bool expexpose; - bool expvibrance; - bool expblur; - bool exptonemap; - bool expreti; + bool neigh; + bool vart; + bool sensih; + bool localTgaincurve; + bool inversret; + // Sharpening bool expsharp; + bool sharradius; + bool sharamount; + bool shardamping; + bool shariter; + bool sensisha; + bool inverssha; + // Contrast by detail levels bool expcbdl; + bool mult[5]; + bool chromacbdl; + bool threshold; + bool sensicb; + // Denoise bool expdenoi; - bool pastels; - bool saturated; - bool psthreshold; - bool protectskins; - bool avoidcolorshift; - bool pastsattog; - bool skintonescurve; - bool sensiv; - */ - + bool noiselumf; + bool noiselumc; + bool noiselumdetail; + bool noiselequal; + bool noisechrof; + bool noisechroc; + bool adjblur; + bool bilateral; + bool sensiden; + bool avoid; }; class LensProfParamsEdited