Add chroma gamma slope to exposure mask

This commit is contained in:
Desmis 2019-03-13 17:20:47 +01:00
parent 2376a05e07
commit d2bed1f6f2
11 changed files with 181 additions and 13 deletions

View File

@ -896,6 +896,9 @@ HISTORY_MSG_642;Local - radius SH
HISTORY_MSG_643;Local - Blur SH
HISTORY_MSG_644;Local - inverse SH
HISTORY_MSG_645;Local - balance deltaE
HISTORY_MSG_646;Local - Exp mask chroma
HISTORY_MSG_647;Local - Exp mask gamma
HISTORY_MSG_648;Local - Exp mask slope
HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors
HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction
HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction
@ -1984,6 +1987,9 @@ TP_LOCALLAB_CENTER_Y;Center Y
TP_LOCALLAB_CBDL;Contrast by detail levels -Dist.defects:grease..
TP_LOCALLAB_EXPCBDL_TOOLTIP;In the case of contaminated sensor (type "grease"), and when the area is important or for a series of small defects.\n\na) put the selection spot on a pronounced default (adapting its size if necessary); b) choose a wide selection area to cover most of the area affected by the defects; c) Select a fairly large transition value; d) act on levels 3 and 4 or lower by reducing the contrast (values below 100) and by acting on the chroma slider if necessary.
TP_LOCALLAB_CHROMA;Chrominance
TP_LOCALLAB_CHROMASKCOL;Chroma mask
TP_LOCALLAB_GAMMASKCOL;Gamma mask
TP_LOCALLAB_SLOMASKCOL;Slope mask
TP_LOCALLAB_CHRRT;Chroma
TP_LOCALLAB_CIRCRADIUS;Spot size
TP_LOCALLAB_COFR;Color & Light -Small defects:red eyes,dust

View File

@ -147,6 +147,9 @@ struct local_params {
float blendmacol;
float radmacol;
float radmaexp;
float chromaexp;
float gammaexp;
float slomaexp;
float blendmaexp;
float radmaSH;
float blendmaSH;
@ -483,6 +486,9 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall
float radmaskcolor = ((float) locallab.spots.at(sp).radmaskcol);
float blendmaskexpo = ((float) locallab.spots.at(sp).blendmaskexp) / 100.f ;
float radmaskexpo = ((float) locallab.spots.at(sp).radmaskexp);
float chromaskexpo = ((float) locallab.spots.at(sp).chromaskexp);
float gammaskexpo = ((float) locallab.spots.at(sp).gammaskexp);
float slomaskexpo = ((float) locallab.spots.at(sp).slomaskexp);
float blendmaskSH = ((float) locallab.spots.at(sp).blendmaskSH) / 100.f ;
float radmaskSH = ((float) locallab.spots.at(sp).radmaskSH);
float structexpo = (float) locallab.spots.at(sp).structexp;
@ -536,6 +542,9 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall
lp.blendmacol = blendmaskcolor;
lp.radmacol = radmaskcolor;
lp.radmaexp = radmaskexpo;
lp.chromaexp = chromaskexpo;
lp.gammaexp = gammaskexpo;
lp.slomaexp = slomaskexpo;
lp.struexc = structexclude;
lp.blendmaexp = blendmaskexpo;
lp.blendmaSH = blendmaskSH;
@ -2653,10 +2662,10 @@ static void calclight(float lum, float koef, float & lumnew, LUTf & lightCurvel
}
static void mean_fab(int begx, int begy, int cx, int cy, int xEn, int yEn, LabImage* bufexporig, LabImage* transformed, LabImage* original, float & fab, float & meanfab)
static void mean_fab(int begx, int begy, int cx, int cy, int xEn, int yEn, LabImage* bufexporig, LabImage* transformed, LabImage* original, float & fab, float & meanfab, float chrom)
{
int nbfab = 0;
float multsigma = -0.015f * chrom + 1.f;
for (int y = 0; y < transformed->H ; y++) //{
for (int x = 0; x < transformed->W; x++) {
int lox = cx + x;
@ -2686,7 +2695,8 @@ static void mean_fab(int begx, int begy, int cx, int cy, int xEn, int yEn, LabIm
}
stddv = sqrt(som / nbfab);
fab = meanfab + 1.5f * stddv;
fab = meanfab + multsigma * stddv;
if(fab < 0.f) fab = 10.f;
}
void ImProcFunctions::blendstruc(int bfw, int bfh, LabImage* bufcolorig, float radius, float stru, JaggedArray<float> & blend2, int sk, bool multiThread, float & meansob)
@ -6846,7 +6856,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
float meanfab = 0.f;
float fab = 0.f;
mean_fab(begx, begy, cx, cy, xEn, yEn, bufexporig, transformed, original, fab, meanfab);
mean_fab(begx, begy, cx, cy, xEn, yEn, bufexporig, transformed, original, fab, meanfab, 0.f);
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
@ -6929,9 +6939,9 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
if ((lp.showmaskSHmet == 2 || lp.enaSHMask || lp.showmaskSHmet == 3) && lp.radmaSH > 0.f) {
guidedFilter(guid, ble, ble, lp.radmaSH * 10.f / sk, 0.075, multiThread, 4);
//float maxsh = -100.f;
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
// #pragma omp parallel for schedule(dynamic,16)
#endif
for (int y = 0; y < transformed->H ; y++) //{
@ -6941,8 +6951,10 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
if (lox >= begx && lox < xEn && loy >= begy && loy < yEn) {
bufmaskblurSH->L[loy - begy][lox - begx] = LIM01(ble[loy - begy][lox - begx]) * 32768.f;
// if(bufmaskblurSH->L[loy - begy][lox - begx] > maxsh) maxsh = bufmaskblurSH->L[loy - begy][lox - begx];
}
}
// printf("maxsh=%f \n", maxsh);
}
float radiusb = 1.f / sk;
@ -7678,7 +7690,53 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
array2D<float> guid(bfw, bfh);
float meanfab = 0.f;
float fab = 0.f;
mean_fab(begx, begy, cx, cy, xEn, yEn, bufexporig, transformed, original, fab, meanfab);
mean_fab(begx, begy, cx, cy, xEn, yEn, bufexporig, transformed, original, fab, meanfab, lp.chromaexp);
LUTf *gammamask = nullptr;
LUTf lutTonemask;
GammaValues g_a;
double pwr = 1.0 / lp.gammaexp;
double gamm = lp.gammaexp;
double ts = lp.slomaexp;
double gamm2 = lp.gammaexp;
if (gamm2 < 1.) {
std::swap(pwr, gamm);
}
int mode = 0;
Color::calcGamma(pwr, ts, mode, g_a); // call to calcGamma with selected gamma and slope
// printf("g_a0=%f g_a1=%f g_a2=%f g_a3=%f g_a4=%f\n", g_a0,g_a1,g_a2,g_a3,g_a4);
double start;
double add;
if (gamm2 < 1.) {
start = g_a[2];
add = g_a[4];
} else {
start = g_a[3];
add = g_a[4];
}
double mul = 1. + g_a[4];
lutTonemask(65536);
for (int i = 0; i < 65536; i++) {
double val = (i) / 65535.;
double x;
if (gamm2 < 1.) {
x = Color::igammareti(val, gamm, start, ts, mul, add);
} else {
x = Color::gammareti(val, gamm, start, ts, mul, add);
}
lutTonemask[i] = CLIP(x * 65535.); // CLIP avoid in some case extra values
}
gammamask = &lutTonemask;
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
@ -7772,8 +7830,11 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
int loy = cy + y;
if (lox >= begx && lox < xEn && loy >= begy && loy < yEn) {
float L_;
bufmaskblurexp->L[loy - begy][lox - begx] = LIM01(ble[loy - begy][lox - begx]) * 32768.f;
}
L_= 2.f * bufmaskblurexp->L[loy - begy][lox - begx];;
bufmaskblurexp->L[loy - begy][lox - begx] = 0.5f * (*gammamask)[L_];//(*retinexgamtab)[R_];
}
}
}
@ -8118,7 +8179,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
float meanfab = 0.f;
float fab = 0.f;
mean_fab(begx, begy, cx, cy, xEn, yEn, bufcolorig, transformed, original, fab, meanfab);
mean_fab(begx, begy, cx, cy, xEn, yEn, bufcolorig, transformed, original, fab, meanfab, 0.f);
#ifdef _OPENMP

View File

@ -672,6 +672,10 @@ enum ProcEventCode {
EvlocallabblurSHde = 642,
Evlocallabinverssh = 643,
EvLocallabSpotbalan = 644,
Evlocallabchromaskexp = 645,
Evlocallabgammaskexp = 646,
Evlocallabslomaskexp = 647,
NUMOFEVENTS
};

View File

@ -2405,6 +2405,9 @@ LocallabParams::LocallabSpot::LocallabSpot() :
HHmaskexpcurve{(double)FCT_MinMaxCPoints, 0.0, 1.0, 0.35, 0.35, 0.50, 1.0, 0.35, 0.35, 1.0, 1.0, 0.35, 0.35},
blendmaskexp(0),
radmaskexp(10.0),
chromaskexp(0.0),
gammaskexp(1.0),
slomaskexp(0.0),
// Shadow highlight
expshadhigh(false),
highlights(0),
@ -2573,6 +2576,9 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
&& HHmaskexpcurve == other.HHmaskexpcurve
&& blendmaskexp == other.blendmaskexp
&& radmaskexp == other.radmaskexp
&& chromaskexp == other.chromaskexp
&& gammaskexp == other.gammaskexp
&& slomaskexp == other.slomaskexp
// Shadow highlight
&& expshadhigh == other.expshadhigh
&& highlights == other.highlights
@ -3698,6 +3704,9 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).HHmaskexpcurve, "Locallab", "HHmaskexpCurve_" + std::to_string(i), spot.HHmaskexpcurve, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).blendmaskexp, "Locallab", "Blendmaskexp_" + std::to_string(i), spot.blendmaskexp, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).radmaskexp, "Locallab", "Radmaskexp_" + std::to_string(i), spot.radmaskexp, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).chromaskexp, "Locallab", "Chromaskexp_" + std::to_string(i), spot.chromaskexp, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).gammaskexp, "Locallab", "Gammaskexp_" + std::to_string(i), spot.gammaskexp, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).slomaskexp, "Locallab", "Slomaskexp_" + std::to_string(i), spot.slomaskexp, keyFile);
// Shadow highlight
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).expshadhigh, "Locallab", "Expshadhigh_" + std::to_string(i), spot.expshadhigh, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).highlights, "Locallab", "highlights_" + std::to_string(i), spot.highlights, keyFile);
@ -4951,6 +4960,9 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Locallab", "HHmaskexpCurve_" + std::to_string(i), pedited, spot.HHmaskexpcurve, spotEdited.HHmaskexpcurve);
assignFromKeyfile(keyFile, "Locallab", "Blendmaskexp_" + std::to_string(i), pedited, spot.blendmaskexp, spotEdited.blendmaskexp);
assignFromKeyfile(keyFile, "Locallab", "Radmaskexp_" + std::to_string(i), pedited, spot.radmaskexp, spotEdited.radmaskexp);
assignFromKeyfile(keyFile, "Locallab", "Chromaskexp_" + std::to_string(i), pedited, spot.chromaskexp, spotEdited.chromaskexp);
assignFromKeyfile(keyFile, "Locallab", "Gammaskexp_" + std::to_string(i), pedited, spot.gammaskexp, spotEdited.gammaskexp);
assignFromKeyfile(keyFile, "Locallab", "Slomaskexp_" + std::to_string(i), pedited, spot.slomaskexp, spotEdited.slomaskexp);
// Shadow highlight
assignFromKeyfile(keyFile, "Locallab", "Expshadhigh_" + std::to_string(i), pedited, spot.expshadhigh, spotEdited.expshadhigh);
assignFromKeyfile(keyFile, "Locallab", "highlights_" + std::to_string(i), pedited, spot.highlights, spotEdited.highlights);

View File

@ -1006,6 +1006,9 @@ struct LocallabParams {
std::vector<double> HHmaskexpcurve;
int blendmaskexp;
double radmaskexp;
double chromaskexp;
double gammaskexp;
double slomaskexp;
// Shadow highlight
bool expshadhigh;
int highlights;

View File

@ -671,7 +671,10 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
LUMINANCECURVE, //EvlocallabradmaskSH
LUMINANCECURVE, //EvlocallabblurSHde
LUMINANCECURVE, //Evlocallabinverssh
LUMINANCECURVE //EvLocallabSpotbalan
LUMINANCECURVE, //EvLocallabSpotbalan
LUMINANCECURVE, //EvLocallabchromaskexp
LUMINANCECURVE, //EvLocallabgammaskexp
LUMINANCECURVE //EvLocallabslomaskexp
};

View File

@ -99,6 +99,9 @@ Locallab::Locallab():
blurexpde(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURDE"), 2, 100, 1, 5))),
blendmaskexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))),
radmaskexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), 0.0, 100.0, 0.1, 10.))),
chromaskexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMASKCOL"), -100.0, 100.0, 0.1, 0.))),
gammaskexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMMASKCOL"), 0.25, 4.0, 0.01, 1.))),
slomaskexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))),
//Shadow hightlights
highlights(Gtk::manage(new Adjuster(M("TP_SHADOWSHLIGHTS_HIGHLIGHTS"), 0, 100, 1, 0))),
h_tonalwidth(Gtk::manage(new Adjuster(M("TP_SHADOWSHLIGHTS_HLTONALW"), 10, 100, 1, 70))),
@ -437,6 +440,9 @@ Locallab::Locallab():
blendmaskexp->setAdjusterListener(this);
radmaskexp->setAdjusterListener(this);
chromaskexp->setAdjusterListener(this);
gammaskexp->setAdjusterListener(this);
slomaskexp->setAdjusterListener(this);
curveEditorG->setCurveListener(this);
@ -506,6 +512,9 @@ Locallab::Locallab():
maskexpBox->pack_start(*maskexpCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor
maskexpBox->pack_start(*blendmaskexp, Gtk::PACK_SHRINK, 0);
maskexpBox->pack_start(*radmaskexp, Gtk::PACK_SHRINK, 0);
maskexpBox->pack_start(*chromaskexp, Gtk::PACK_SHRINK, 0);
maskexpBox->pack_start(*gammaskexp, Gtk::PACK_SHRINK, 0);
maskexpBox->pack_start(*slomaskexp, Gtk::PACK_SHRINK, 0);
maskexpFrame->add(*maskexpBox);
exposeBox->pack_start(*maskexpFrame);
@ -1702,6 +1711,9 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
pp->locallab.spots.at(pp->locallab.selspot).HHmaskexpcurve = HHmaskexpshape->getCurve();
pp->locallab.spots.at(pp->locallab.selspot).blendmaskexp = blendmaskexp->getIntValue();
pp->locallab.spots.at(pp->locallab.selspot).radmaskexp = radmaskexp->getValue();
pp->locallab.spots.at(pp->locallab.selspot).chromaskexp = chromaskexp->getValue();
pp->locallab.spots.at(pp->locallab.selspot).gammaskexp = gammaskexp->getValue();
pp->locallab.spots.at(pp->locallab.selspot).slomaskexp = slomaskexp->getValue();
// Shadow highlight
pp->locallab.spots.at(pp->locallab.selspot).expshadhigh = expshadhigh->getEnabled();
pp->locallab.spots.at(pp->locallab.selspot).highlights = highlights->getIntValue();
@ -1886,6 +1898,9 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
pe->locallab.spots.at(pp->locallab.selspot).HHmaskexpcurve = pe->locallab.spots.at(pp->locallab.selspot).HHmaskexpcurve || !HHmaskexpshape->isUnChanged();
pe->locallab.spots.at(pp->locallab.selspot).blendmaskexp = pe->locallab.spots.at(pp->locallab.selspot).blendmaskexp || blendmaskexp->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).radmaskexp = pe->locallab.spots.at(pp->locallab.selspot).radmaskexp || radmaskexp->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).chromaskexp = pe->locallab.spots.at(pp->locallab.selspot).chromaskexp || chromaskexp->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).gammaskexp = pe->locallab.spots.at(pp->locallab.selspot).gammaskexp || gammaskexp->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).slomaskexp = pe->locallab.spots.at(pp->locallab.selspot).slomaskexp || slomaskexp->getEditedState();
// Shadow highlight
pe->locallab.spots.at(pp->locallab.selspot).expshadhigh = pe->locallab.spots.at(pp->locallab.selspot).expshadhigh || !expshadhigh->get_inconsistent();
pe->locallab.spots.at(pp->locallab.selspot).highlights = pe->locallab.spots.at(pp->locallab.selspot).highlights || highlights->getEditedState();
@ -2056,6 +2071,9 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
pedited->locallab.spots.at(pp->locallab.selspot).HHmaskexpcurve = pedited->locallab.spots.at(pp->locallab.selspot).HHmaskexpcurve || !HHmaskexpshape->isUnChanged();
pedited->locallab.spots.at(pp->locallab.selspot).blendmaskexp = pedited->locallab.spots.at(pp->locallab.selspot).blendmaskexp || blendmaskexp->getEditedState();
pedited->locallab.spots.at(pp->locallab.selspot).radmaskexp = pedited->locallab.spots.at(pp->locallab.selspot).radmaskexp || radmaskexp->getEditedState();
pedited->locallab.spots.at(pp->locallab.selspot).chromaskexp = pedited->locallab.spots.at(pp->locallab.selspot).chromaskexp || chromaskexp->getEditedState();
pedited->locallab.spots.at(pp->locallab.selspot).gammaskexp = pedited->locallab.spots.at(pp->locallab.selspot).gammaskexp || gammaskexp->getEditedState();
pedited->locallab.spots.at(pp->locallab.selspot).slomaskexp = pedited->locallab.spots.at(pp->locallab.selspot).slomaskexp || slomaskexp->getEditedState();
// Shadow highlight
pedited->locallab.spots.at(pp->locallab.selspot).expshadhigh = pedited->locallab.spots.at(pp->locallab.selspot).expshadhigh || !expshadhigh->get_inconsistent();
pedited->locallab.spots.at(pp->locallab.selspot).highlights = pedited->locallab.spots.at(pp->locallab.selspot).highlights || highlights->getEditedState();
@ -2940,6 +2958,9 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe
blurexpde->setDefault((double)defSpot->blurexpde);
blendmaskexp->setDefault((double)defSpot->blendmaskexp);
radmaskexp->setDefault(defSpot->radmaskexp);
chromaskexp->setDefault(defSpot->chromaskexp);
gammaskexp->setDefault(defSpot->gammaskexp);
slomaskexp->setDefault(defSpot->slomaskexp);
//Shadow highlight
highlights->setDefault((double)defSpot->highlights);
h_tonalwidth->setDefault((double)defSpot->h_tonalwidth);
@ -3037,6 +3058,9 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe
blurexpde->setDefaultEditedState(Irrelevant);
blendmaskexp->setDefaultEditedState(Irrelevant);
radmaskexp->setDefaultEditedState(Irrelevant);
chromaskexp->setDefaultEditedState(Irrelevant);
gammaskexp->setDefaultEditedState(Irrelevant);
slomaskexp->setDefaultEditedState(Irrelevant);
//Shadow highlight
highlights->setDefaultEditedState(Irrelevant);
h_tonalwidth->setDefaultEditedState(Irrelevant);
@ -3138,6 +3162,9 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe
blurexpde->setDefaultEditedState(defSpotState->blurexpde ? Edited : UnEdited);
blendmaskexp->setDefaultEditedState(defSpotState->blendmaskexp ? Edited : UnEdited);
radmaskexp->setDefaultEditedState(defSpotState->radmaskexp ? Edited : UnEdited);
chromaskexp->setDefaultEditedState(defSpotState->chromaskexp ? Edited : UnEdited);
gammaskexp->setDefaultEditedState(defSpotState->gammaskexp ? Edited : UnEdited);
slomaskexp->setDefaultEditedState(defSpotState->slomaskexp ? Edited : UnEdited);
//Shadow highlight
highlights->setDefaultEditedState(defSpotState->highlights ? Edited : UnEdited);
h_tonalwidth->setDefaultEditedState(defSpotState->h_tonalwidth ? Edited : UnEdited);
@ -3391,6 +3418,24 @@ void Locallab::adjusterChanged(Adjuster * a, double newval)
}
}
if (a == chromaskexp) {
if (listener) {
listener->panelChanged(Evlocallabchromaskexp, chromaskexp->getTextValue());
}
}
if (a == gammaskexp) {
if (listener) {
listener->panelChanged(Evlocallabgammaskexp, gammaskexp->getTextValue());
}
}
if (a == slomaskexp) {
if (listener) {
listener->panelChanged(Evlocallabslomaskexp, slomaskexp->getTextValue());
}
}
}
if (getEnabled() && expshadhigh->getEnabled()) {
@ -3842,6 +3887,9 @@ void Locallab::setBatchMode(bool batchMode)
blurexpde->showEditedCB();
blendmaskexp->showEditedCB();
radmaskexp->showEditedCB();
chromaskexp->showEditedCB();
gammaskexp->showEditedCB();
slomaskexp->showEditedCB();
//Shadow Highlight
highlights->showEditedCB();
h_tonalwidth->showEditedCB();
@ -4219,6 +4267,9 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
HHmaskexpshape->setCurve(pp->locallab.spots.at(index).HHmaskexpcurve);
blendmaskexp->setValue(pp->locallab.spots.at(index).blendmaskexp);
radmaskexp->setValue(pp->locallab.spots.at(index).radmaskexp);
chromaskexp->setValue(pp->locallab.spots.at(index).chromaskexp);
gammaskexp->setValue(pp->locallab.spots.at(index).gammaskexp);
slomaskexp->setValue(pp->locallab.spots.at(index).slomaskexp);
// Shadow highlight
expshadhigh->setEnabled(pp->locallab.spots.at(index).expshadhigh);
highlights->setValue(pp->locallab.spots.at(index).highlights);
@ -4432,6 +4483,9 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
HHmaskexpshape->setUnChanged(!spotState->HHmaskexpcurve);
blendmaskexp->setEditedState(spotState->blendmaskexp ? Edited : UnEdited);
radmaskexp->setEditedState(spotState->radmaskexp ? Edited : UnEdited);
chromaskexp->setEditedState(spotState->chromaskexp ? Edited : UnEdited);
gammaskexp->setEditedState(spotState->gammaskexp ? Edited : UnEdited);
slomaskexp->setEditedState(spotState->slomaskexp ? Edited : UnEdited);
// Shadow highlight
expshadhigh->set_inconsistent(!spotState->expshadhigh);

View File

@ -117,6 +117,9 @@ private:
Adjuster* const blurexpde;
Adjuster* const blendmaskexp;
Adjuster* const radmaskexp;
Adjuster* const chromaskexp;
Adjuster* const gammaskexp;
Adjuster* const slomaskexp;
//Shadow highlight
Adjuster* const highlights;
Adjuster* const h_tonalwidth;

View File

@ -994,6 +994,9 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
locallab.spots.at(j).HHmaskexpcurve = locallab.spots.at(j).HHmaskexpcurve && pSpot.HHmaskexpcurve == otherSpot.HHmaskexpcurve;
locallab.spots.at(j).blendmaskexp = locallab.spots.at(j).blendmaskexp && pSpot.blendmaskexp == otherSpot.blendmaskexp;
locallab.spots.at(j).radmaskexp = locallab.spots.at(j).radmaskexp && pSpot.radmaskexp == otherSpot.radmaskexp;
locallab.spots.at(j).chromaskexp = locallab.spots.at(j).chromaskexp && pSpot.chromaskexp == otherSpot.chromaskexp;
locallab.spots.at(j).gammaskexp = locallab.spots.at(j).gammaskexp && pSpot.gammaskexp == otherSpot.gammaskexp;
locallab.spots.at(j).slomaskexp = locallab.spots.at(j).slomaskexp && pSpot.slomaskexp == otherSpot.slomaskexp;
// Shadow highlight
locallab.spots.at(j).expshadhigh = locallab.spots.at(j).expshadhigh && pSpot.expshadhigh == otherSpot.expshadhigh;
locallab.spots.at(j).highlights = locallab.spots.at(j).highlights && pSpot.highlights == otherSpot.highlights;
@ -2774,6 +2777,17 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).radmaskexp = mods.locallab.spots.at(i).radmaskexp;
}
if (locallab.spots.at(i).chromaskexp) {
toEdit.locallab.spots.at(i).chromaskexp = mods.locallab.spots.at(i).chromaskexp;
}
if (locallab.spots.at(i).gammaskexp) {
toEdit.locallab.spots.at(i).gammaskexp = mods.locallab.spots.at(i).gammaskexp;
}
if (locallab.spots.at(i).slomaskexp) {
toEdit.locallab.spots.at(i).slomaskexp = mods.locallab.spots.at(i).slomaskexp;
}
// Shadow highlight
if (locallab.spots.at(i).expshadhigh) {
@ -4124,6 +4138,9 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
HHmaskexpcurve(v),
blendmaskexp(v),
radmaskexp(v),
chromaskexp(v),
gammaskexp(v),
slomaskexp(v),
// Shadow highlight
expshadhigh(v),
highlights(v),
@ -4289,6 +4306,9 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
HHmaskexpcurve = v;
blendmaskexp = v;
radmaskexp = v;
chromaskexp = v;
gammaskexp = v;
slomaskexp = v;
// Shadow highlight
expshadhigh = v;
highlights = v;

View File

@ -421,6 +421,9 @@ public:
bool HHmaskexpcurve;
bool blendmaskexp;
bool radmaskexp;
bool chromaskexp;
bool gammaskexp;
bool slomaskexp;
// Shadow highlight
bool expshadhigh;
bool highlights;

View File

@ -19,7 +19,6 @@
#include "partialpastedlg.h"
#include "multilangmgr.h"
#include "paramsedited.h"
#include "../rtengine/procparams.h"
#include "guiutils.h"
PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title, Gtk::Window* parent)
@ -663,9 +662,9 @@ void PartialPasteDlg::applyPaste (rtengine::procparams::ProcParams* dstPP, Param
{
ParamsEdited falsePE; // falsePE is a workaround to set a group of ParamsEdited to false
falsePE.locallab.spots.resize(srcPP->locallab.nbspot, LocallabParamsEdited::LocallabSpotEdited(false));
falsePE.locallab.spots.resize(srcPE->locallab.spots.size(), LocallabParamsEdited::LocallabSpotEdited(false));
ParamsEdited filterPE(true); // Contains the initial information about the loaded values
filterPE.locallab.spots.resize(srcPP->locallab.nbspot, LocallabParamsEdited::LocallabSpotEdited(true));
filterPE.locallab.spots.resize(srcPE->locallab.spots.size(), LocallabParamsEdited::LocallabSpotEdited(true));
if (srcPE) {
filterPE = *srcPE;