add Laplacian threshold to mask color and Light

This commit is contained in:
Desmis 2019-10-07 17:27:25 +02:00
parent 5edd3e410d
commit 39c2ffb05f
10 changed files with 47 additions and 9 deletions

View File

@ -997,6 +997,7 @@ HISTORY_MSG_756;Local - Exp use algo exposure mask
HISTORY_MSG_757;Local - Exp Laplacian mask HISTORY_MSG_757;Local - Exp Laplacian mask
HISTORY_MSG_758;Local - Reti Laplacian mask HISTORY_MSG_758;Local - Reti Laplacian mask
HISTORY_MSG_759;Local - Exp Laplacian mask HISTORY_MSG_759;Local - Exp Laplacian mask
HISTORY_MSG_760;Local - Color Laplacian mask
HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors
HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction
HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction

View File

@ -10206,11 +10206,11 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
float gamma = lp.gammaexp; float gamma = lp.gammaexp;
float slope = lp.slomaexp; float slope = lp.slomaexp;
float blendm = lp.blendmaexp; float blendm = lp.blendmaexp;
// bool invmask = params->locallab.spots.at(sp).enaExpMaskaft; float lap = params->locallab.spots.at(sp).lapmaskexp;
maskcalccol(false, GW, GH, 0, 0, sk, cx, cy, bufexporig.get(), bufmaskblurexp.get(), originalmaskexp.get(), original, inv, lp, maskcalccol(false, GW, GH, 0, 0, sk, cx, cy, bufexporig.get(), bufmaskblurexp.get(), originalmaskexp.get(), original, inv, lp,
locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili, multiThread, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili, multiThread,
enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, 0.f, gamma, slope, blendm); enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm);
if (lp.showmaskexpmetinv == 1) { if (lp.showmaskexpmetinv == 1) {
showmask(lp, 0, 0, cx, cy, GW, GH, bufexporig.get(), transformed, bufmaskblurexp.get(), inv); showmask(lp, 0, 0, cx, cy, GW, GH, bufexporig.get(), transformed, bufmaskblurexp.get(), inv);
@ -10445,9 +10445,11 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
float gamma = lp.gammacol; float gamma = lp.gammacol;
float slope = lp.slomacol; float slope = lp.slomacol;
float blendm = lp.blendmacol; float blendm = lp.blendmacol;
float lap = params->locallab.spots.at(sp).lapmaskcol;
maskcalccol(false, bfw, bfh, xstart, ystart, sk, cx, cy, bufcolorig.get(), bufmaskblurcol.get(), originalmaskcol.get(), original, inv, lp, maskcalccol(false, bfw, bfh, xstart, ystart, sk, cx, cy, bufcolorig.get(), bufmaskblurcol.get(), originalmaskcol.get(), original, inv, lp,
locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, multiThread, locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, multiThread,
enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, 0.f, gamma, slope, blendm); enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm);
if (lp.showmaskcolmet == 3) { if (lp.showmaskcolmet == 3) {
showmask(lp, xstart, ystart, cx, cy, bfw, bfh, bufcolorig.get(), transformed, bufmaskblurcol.get(), 0); showmask(lp, xstart, ystart, cx, cy, bfw, bfh, bufcolorig.get(), transformed, bufmaskblurcol.get(), 0);
@ -10645,10 +10647,11 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
float gamma = lp.gammacol; float gamma = lp.gammacol;
float slope = lp.slomacol; float slope = lp.slomacol;
float blendm = lp.blendmacol; float blendm = lp.blendmacol;
float lap = params->locallab.spots.at(sp).lapmaskexp;
maskcalccol(false, GW, GH, 0, 0, sk, cx, cy, bufcolorig.get(), bufmaskblurcol.get(), originalmaskcol.get(), original, inv, lp, maskcalccol(false, GW, GH, 0, 0, sk, cx, cy, bufcolorig.get(), bufmaskblurcol.get(), originalmaskcol.get(), original, inv, lp,
locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, multiThread, locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, multiThread,
enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, 0.f, gamma, slope, blendm); enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm);
if (lp.showmaskcolmetinv == 1) { if (lp.showmaskcolmetinv == 1) {

View File

@ -786,6 +786,7 @@ enum ProcEventCode {
Evlocallablapmasktm = 756, Evlocallablapmasktm = 756,
Evlocallablapmaskreti = 757, Evlocallablapmaskreti = 757,
Evlocallablapmaskexp = 758, Evlocallablapmaskexp = 758,
Evlocallablapmaskcol = 759,
NUMOFEVENTS NUMOFEVENTS
}; };

View File

@ -2447,10 +2447,11 @@ LocallabParams::LocallabSpot::LocallabSpot() :
structcol(0), structcol(0),
blurcolde(5), blurcolde(5),
blendmaskcol(0), blendmaskcol(0),
radmaskcol(10.0), radmaskcol(0.0),
chromaskcol(0.0), chromaskcol(0.0),
gammaskcol(1.0), gammaskcol(1.0),
slomaskcol(0.0), slomaskcol(0.0),
lapmaskcol(0.0),
qualitycurveMethod("none"), qualitycurveMethod("none"),
gridMethod("one"), gridMethod("one"),
llcurve{(double)DCT_NURBS, 0.0, 0.0, 1.0, 1.0}, llcurve{(double)DCT_NURBS, 0.0, 0.0, 1.0, 1.0},
@ -2484,7 +2485,7 @@ LocallabParams::LocallabSpot::LocallabSpot() :
LLmaskexpcurve{(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}, LLmaskexpcurve{(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},
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}, 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), blendmaskexp(0),
radmaskexp(10.0), radmaskexp(0.0),
chromaskexp(0.0), chromaskexp(0.0),
gammaskexp(1.0), gammaskexp(1.0),
slomaskexp(0.0), slomaskexp(0.0),
@ -2722,6 +2723,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
&& chromaskcol == other.chromaskcol && chromaskcol == other.chromaskcol
&& gammaskcol == other.gammaskcol && gammaskcol == other.gammaskcol
&& slomaskcol == other.slomaskcol && slomaskcol == other.slomaskcol
&& lapmaskcol == other.lapmaskcol
&& qualitycurveMethod == other.qualitycurveMethod && qualitycurveMethod == other.qualitycurveMethod
&& gridMethod == other.gridMethod && gridMethod == other.gridMethod
&& llcurve == other.llcurve && llcurve == other.llcurve
@ -3981,6 +3983,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).chromaskcol, "Locallab", "Chromaskcol_" + std::to_string(i), spot.chromaskcol, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).chromaskcol, "Locallab", "Chromaskcol_" + std::to_string(i), spot.chromaskcol, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).gammaskcol, "Locallab", "Gammaskcol_" + std::to_string(i), spot.gammaskcol, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).gammaskcol, "Locallab", "Gammaskcol_" + std::to_string(i), spot.gammaskcol, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).slomaskcol, "Locallab", "Slomaskcol_" + std::to_string(i), spot.slomaskcol, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).slomaskcol, "Locallab", "Slomaskcol_" + std::to_string(i), spot.slomaskcol, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).lapmaskcol, "Locallab", "Lapmaskcol_" + std::to_string(i), spot.lapmaskcol, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).qualitycurveMethod, "Locallab", "QualityCurveMethod_" + std::to_string(i), spot.qualitycurveMethod, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).qualitycurveMethod, "Locallab", "QualityCurveMethod_" + std::to_string(i), spot.qualitycurveMethod, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).gridMethod, "Locallab", "gridMethod_" + std::to_string(i), spot.gridMethod, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).gridMethod, "Locallab", "gridMethod_" + std::to_string(i), spot.gridMethod, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).llcurve, "Locallab", "LLCurve_" + std::to_string(i), spot.llcurve, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).llcurve, "Locallab", "LLCurve_" + std::to_string(i), spot.llcurve, keyFile);
@ -5354,6 +5357,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Locallab", "Chromaskcol_" + std::to_string(i), pedited, spot.chromaskcol, spotEdited.chromaskcol); assignFromKeyfile(keyFile, "Locallab", "Chromaskcol_" + std::to_string(i), pedited, spot.chromaskcol, spotEdited.chromaskcol);
assignFromKeyfile(keyFile, "Locallab", "Gammaskcol_" + std::to_string(i), pedited, spot.gammaskcol, spotEdited.gammaskcol); assignFromKeyfile(keyFile, "Locallab", "Gammaskcol_" + std::to_string(i), pedited, spot.gammaskcol, spotEdited.gammaskcol);
assignFromKeyfile(keyFile, "Locallab", "Slomaskcol_" + std::to_string(i), pedited, spot.slomaskcol, spotEdited.slomaskcol); assignFromKeyfile(keyFile, "Locallab", "Slomaskcol_" + std::to_string(i), pedited, spot.slomaskcol, spotEdited.slomaskcol);
assignFromKeyfile(keyFile, "Locallab", "Lapmaskcol_" + std::to_string(i), pedited, spot.lapmaskcol, spotEdited.lapmaskcol);
assignFromKeyfile(keyFile, "Locallab", "QualityCurveMethod_" + std::to_string(i), pedited, spot.qualitycurveMethod, spotEdited.qualitycurveMethod); assignFromKeyfile(keyFile, "Locallab", "QualityCurveMethod_" + std::to_string(i), pedited, spot.qualitycurveMethod, spotEdited.qualitycurveMethod);
assignFromKeyfile(keyFile, "Locallab", "gridMethod_" + std::to_string(i), pedited, spot.gridMethod, spotEdited.gridMethod); assignFromKeyfile(keyFile, "Locallab", "gridMethod_" + std::to_string(i), pedited, spot.gridMethod, spotEdited.gridMethod);
assignFromKeyfile(keyFile, "Locallab", "LLCurve_" + std::to_string(i), pedited, spot.llcurve, spotEdited.llcurve); assignFromKeyfile(keyFile, "Locallab", "LLCurve_" + std::to_string(i), pedited, spot.llcurve, spotEdited.llcurve);

View File

@ -998,6 +998,7 @@ struct LocallabParams {
double chromaskcol; double chromaskcol;
double gammaskcol; double gammaskcol;
double slomaskcol; double slomaskcol;
double lapmaskcol;
Glib::ustring qualitycurveMethod; Glib::ustring qualitycurveMethod;
Glib::ustring gridMethod; Glib::ustring gridMethod;
std::vector<double> llcurve; std::vector<double> llcurve;

View File

@ -785,7 +785,8 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
LUMINANCECURVE, //EvlocallabenaExpmaskaft LUMINANCECURVE, //EvlocallabenaExpmaskaft
LUMINANCECURVE, //Evlocallablapmasktm LUMINANCECURVE, //Evlocallablapmasktm
LUMINANCECURVE, //Evlocallablapmaskreti LUMINANCECURVE, //Evlocallablapmaskreti
LUMINANCECURVE //Evlocallablapmaskexp LUMINANCECURVE, //Evlocallablapmaskexp
LUMINANCECURVE //Evlocallablapmaskcol
}; };
namespace rtengine namespace rtengine

View File

@ -186,10 +186,11 @@ Locallab::Locallab():
structcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRUCCOL"), 0, 100, 1, 0))), structcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRUCCOL"), 0, 100, 1, 0))),
blurcolde(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURDE"), 2, 100, 1, 5))), blurcolde(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURDE"), 2, 100, 1, 5))),
blendmaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))), blendmaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))),
radmaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), 0.0, 100.0, 0.1, 10.))), radmaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), 0.0, 100.0, 0.1, 0.))),
chromaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMASKCOL"), -100.0, 100.0, 0.1, 0.))), chromaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMASKCOL"), -100.0, 100.0, 0.1, 0.))),
gammaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMMASKCOL"), 0.25, 4.0, 0.01, 1.))), gammaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMMASKCOL"), 0.25, 4.0, 0.01, 1.))),
slomaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))), slomaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))),
lapmaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPMASKCOL"), 0.0, 100.0, 0.1, 0.))),
softradiuscol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.5, 0.))), softradiuscol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.5, 0.))),
// Exposure // Exposure
expcomp(Gtk::manage(new Adjuster(M("TP_EXPOSURE_EXPCOMP"), -2.0, 4.0, 0.05, 0.0))), expcomp(Gtk::manage(new Adjuster(M("TP_EXPOSURE_EXPCOMP"), -2.0, 4.0, 0.05, 0.0))),
@ -204,7 +205,7 @@ Locallab::Locallab():
structexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRUCCOL"), 0, 100, 1, 0))), structexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRUCCOL"), 0, 100, 1, 0))),
blurexpde(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURDE"), 2, 100, 1, 5))), 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))), 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.))), radmaskexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), 0.0, 100.0, 0.1, 0.))),
chromaskexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMASKCOL"), -100.0, 100.0, 0.1, 0.))), 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.))), 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.))), slomaskexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))),
@ -487,6 +488,7 @@ Locallab::Locallab():
gammaskcol->setAdjusterListener(this); gammaskcol->setAdjusterListener(this);
slomaskcol->setAdjusterListener(this); slomaskcol->setAdjusterListener(this);
softradiuscol->setAdjusterListener(this); softradiuscol->setAdjusterListener(this);
lapmaskcol->setAdjusterListener(this);
qualitycurveMethod->append(M("TP_LOCALLAB_CURVNONE")); qualitycurveMethod->append(M("TP_LOCALLAB_CURVNONE"));
qualitycurveMethod->append(M("TP_LOCALLAB_CURVCURR")); qualitycurveMethod->append(M("TP_LOCALLAB_CURVCURR"));
@ -682,6 +684,7 @@ Locallab::Locallab():
maskcolBox->pack_start(*maskCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor maskcolBox->pack_start(*maskCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor
maskcolBox->pack_start(*blendmaskcol, Gtk::PACK_SHRINK, 0); maskcolBox->pack_start(*blendmaskcol, Gtk::PACK_SHRINK, 0);
maskcolBox->pack_start(*radmaskcol, Gtk::PACK_SHRINK, 0); maskcolBox->pack_start(*radmaskcol, Gtk::PACK_SHRINK, 0);
maskcolBox->pack_start(*lapmaskcol, Gtk::PACK_SHRINK, 0);
maskcolBox->pack_start(*chromaskcol, Gtk::PACK_SHRINK, 0); maskcolBox->pack_start(*chromaskcol, Gtk::PACK_SHRINK, 0);
maskcolBox->pack_start(*gammaskcol, Gtk::PACK_SHRINK, 0); maskcolBox->pack_start(*gammaskcol, Gtk::PACK_SHRINK, 0);
maskcolBox->pack_start(*slomaskcol, Gtk::PACK_SHRINK, 0); maskcolBox->pack_start(*slomaskcol, Gtk::PACK_SHRINK, 0);
@ -3029,6 +3032,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
pp->locallab.spots.at(pp->locallab.selspot).chromaskcol = chromaskcol->getValue(); pp->locallab.spots.at(pp->locallab.selspot).chromaskcol = chromaskcol->getValue();
pp->locallab.spots.at(pp->locallab.selspot).gammaskcol = gammaskcol->getValue(); pp->locallab.spots.at(pp->locallab.selspot).gammaskcol = gammaskcol->getValue();
pp->locallab.spots.at(pp->locallab.selspot).slomaskcol = slomaskcol->getValue(); pp->locallab.spots.at(pp->locallab.selspot).slomaskcol = slomaskcol->getValue();
pp->locallab.spots.at(pp->locallab.selspot).lapmaskcol = lapmaskcol->getValue();
pp->locallab.spots.at(pp->locallab.selspot).softradiuscol = softradiuscol->getValue(); pp->locallab.spots.at(pp->locallab.selspot).softradiuscol = softradiuscol->getValue();
// Exposure // Exposure
pp->locallab.spots.at(pp->locallab.selspot).expexpose = expexpose->getEnabled(); pp->locallab.spots.at(pp->locallab.selspot).expexpose = expexpose->getEnabled();
@ -3370,6 +3374,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
pe->locallab.spots.at(pp->locallab.selspot).chromaskcol = pe->locallab.spots.at(pp->locallab.selspot).chromaskcol || chromaskcol->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).chromaskcol = pe->locallab.spots.at(pp->locallab.selspot).chromaskcol || chromaskcol->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).gammaskcol = pe->locallab.spots.at(pp->locallab.selspot).gammaskcol || gammaskcol->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).gammaskcol = pe->locallab.spots.at(pp->locallab.selspot).gammaskcol || gammaskcol->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).slomaskcol = pe->locallab.spots.at(pp->locallab.selspot).slomaskcol || slomaskcol->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).slomaskcol = pe->locallab.spots.at(pp->locallab.selspot).slomaskcol || slomaskcol->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).lapmaskcol = pe->locallab.spots.at(pp->locallab.selspot).lapmaskcol || lapmaskcol->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).softradiuscol = pe->locallab.spots.at(pp->locallab.selspot).softradiuscol || softradiuscol->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).softradiuscol = pe->locallab.spots.at(pp->locallab.selspot).softradiuscol || softradiuscol->getEditedState();
// Exposure // Exposure
pe->locallab.spots.at(pp->locallab.selspot).expexpose = pe->locallab.spots.at(pp->locallab.selspot).expexpose || !expexpose->get_inconsistent(); pe->locallab.spots.at(pp->locallab.selspot).expexpose = pe->locallab.spots.at(pp->locallab.selspot).expexpose || !expexpose->get_inconsistent();
@ -3646,6 +3651,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
pedited->locallab.spots.at(pp->locallab.selspot).chromaskcol = pedited->locallab.spots.at(pp->locallab.selspot).chromaskcol || chromaskcol->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).chromaskcol = pedited->locallab.spots.at(pp->locallab.selspot).chromaskcol || chromaskcol->getEditedState();
pedited->locallab.spots.at(pp->locallab.selspot).gammaskcol = pedited->locallab.spots.at(pp->locallab.selspot).gammaskcol || gammaskcol->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).gammaskcol = pedited->locallab.spots.at(pp->locallab.selspot).gammaskcol || gammaskcol->getEditedState();
pedited->locallab.spots.at(pp->locallab.selspot).slomaskcol = pedited->locallab.spots.at(pp->locallab.selspot).slomaskcol || slomaskcol->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).slomaskcol = pedited->locallab.spots.at(pp->locallab.selspot).slomaskcol || slomaskcol->getEditedState();
pedited->locallab.spots.at(pp->locallab.selspot).lapmaskcol = pedited->locallab.spots.at(pp->locallab.selspot).lapmaskcol || lapmaskcol->getEditedState();
pedited->locallab.spots.at(pp->locallab.selspot).softradiuscol = pedited->locallab.spots.at(pp->locallab.selspot).softradiuscol || softradiuscol->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).softradiuscol = pedited->locallab.spots.at(pp->locallab.selspot).softradiuscol || softradiuscol->getEditedState();
// Exposure // Exposure
pedited->locallab.spots.at(pp->locallab.selspot).expexpose = pedited->locallab.spots.at(pp->locallab.selspot).expexpose || !expexpose->get_inconsistent(); pedited->locallab.spots.at(pp->locallab.selspot).expexpose = pedited->locallab.spots.at(pp->locallab.selspot).expexpose || !expexpose->get_inconsistent();
@ -5503,6 +5509,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe
chromaskcol->setDefault(defSpot->chromaskcol); chromaskcol->setDefault(defSpot->chromaskcol);
gammaskcol->setDefault(defSpot->gammaskcol); gammaskcol->setDefault(defSpot->gammaskcol);
slomaskcol->setDefault(defSpot->slomaskcol); slomaskcol->setDefault(defSpot->slomaskcol);
lapmaskcol->setDefault(defSpot->lapmaskcol);
softradiuscol->setDefault(defSpot->softradiuscol); softradiuscol->setDefault(defSpot->softradiuscol);
// Exposure // Exposure
expcomp->setDefault(defSpot->expcomp); expcomp->setDefault(defSpot->expcomp);
@ -5671,6 +5678,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe
chromaskcol->setDefaultEditedState(Irrelevant); chromaskcol->setDefaultEditedState(Irrelevant);
gammaskcol->setDefaultEditedState(Irrelevant); gammaskcol->setDefaultEditedState(Irrelevant);
slomaskcol->setDefaultEditedState(Irrelevant); slomaskcol->setDefaultEditedState(Irrelevant);
lapmaskcol->setDefaultEditedState(Irrelevant);
softradiuscol->setDefaultEditedState(Irrelevant); softradiuscol->setDefaultEditedState(Irrelevant);
// Exposure // Exposure
expcomp->setDefaultEditedState(Irrelevant); expcomp->setDefaultEditedState(Irrelevant);
@ -5843,6 +5851,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe
chromaskcol->setDefaultEditedState(defSpotState->chromaskcol ? Edited : UnEdited); chromaskcol->setDefaultEditedState(defSpotState->chromaskcol ? Edited : UnEdited);
gammaskcol->setDefaultEditedState(defSpotState->gammaskcol ? Edited : UnEdited); gammaskcol->setDefaultEditedState(defSpotState->gammaskcol ? Edited : UnEdited);
slomaskcol->setDefaultEditedState(defSpotState->slomaskcol ? Edited : UnEdited); slomaskcol->setDefaultEditedState(defSpotState->slomaskcol ? Edited : UnEdited);
lapmaskcol->setDefaultEditedState(defSpotState->lapmaskcol ? Edited : UnEdited);
softradiuscol->setDefaultEditedState(defSpotState->softradiuscol ? Edited : UnEdited); softradiuscol->setDefaultEditedState(defSpotState->softradiuscol ? Edited : UnEdited);
// Exposure // Exposure
expcomp->setDefaultEditedState(defSpotState->expcomp ? Edited : UnEdited); expcomp->setDefaultEditedState(defSpotState->expcomp ? Edited : UnEdited);
@ -6111,6 +6120,12 @@ void Locallab::adjusterChanged(Adjuster * a, double newval)
} }
} }
if (a == lapmaskcol) {
if (listener) {
listener->panelChanged(Evlocallablapmaskcol, lapmaskcol->getTextValue());
}
}
if (a == softradiuscol) { if (a == softradiuscol) {
if (listener) { if (listener) {
listener->panelChanged(Evlocallabsoftradiuscol, softradiuscol->getTextValue()); listener->panelChanged(Evlocallabsoftradiuscol, softradiuscol->getTextValue());
@ -7054,6 +7069,7 @@ void Locallab::setBatchMode(bool batchMode)
chromaskcol->showEditedCB(); chromaskcol->showEditedCB();
gammaskcol->showEditedCB(); gammaskcol->showEditedCB();
slomaskcol->showEditedCB(); slomaskcol->showEditedCB();
lapmaskcol->showEditedCB();
softradiuscol->showEditedCB(); softradiuscol->showEditedCB();
// Exposure // Exposure
expcomp->showEditedCB(); expcomp->showEditedCB();
@ -7578,6 +7594,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
chromaskcol->setValue(pp->locallab.spots.at(index).chromaskcol); chromaskcol->setValue(pp->locallab.spots.at(index).chromaskcol);
gammaskcol->setValue(pp->locallab.spots.at(index).gammaskcol); gammaskcol->setValue(pp->locallab.spots.at(index).gammaskcol);
slomaskcol->setValue(pp->locallab.spots.at(index).slomaskcol); slomaskcol->setValue(pp->locallab.spots.at(index).slomaskcol);
lapmaskcol->setValue(pp->locallab.spots.at(index).lapmaskcol);
softradiuscol->setValue(pp->locallab.spots.at(index).softradiuscol); softradiuscol->setValue(pp->locallab.spots.at(index).softradiuscol);
// Exposure // Exposure
@ -7943,6 +7960,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
chromaskcol->setEditedState(spotState->chromaskcol ? Edited : UnEdited); chromaskcol->setEditedState(spotState->chromaskcol ? Edited : UnEdited);
gammaskcol->setEditedState(spotState->gammaskcol ? Edited : UnEdited); gammaskcol->setEditedState(spotState->gammaskcol ? Edited : UnEdited);
slomaskcol->setEditedState(spotState->slomaskcol ? Edited : UnEdited); slomaskcol->setEditedState(spotState->slomaskcol ? Edited : UnEdited);
lapmaskcol->setEditedState(spotState->lapmaskcol ? Edited : UnEdited);
softradiuscol->setEditedState(spotState->softradiuscol ? Edited : UnEdited); softradiuscol->setEditedState(spotState->softradiuscol ? Edited : UnEdited);
// Exposure // Exposure

View File

@ -139,6 +139,7 @@ private:
Adjuster* const chromaskcol; Adjuster* const chromaskcol;
Adjuster* const gammaskcol; Adjuster* const gammaskcol;
Adjuster* const slomaskcol; Adjuster* const slomaskcol;
Adjuster* const lapmaskcol;
Adjuster* const softradiuscol; Adjuster* const softradiuscol;
// Exposure // Exposure
Adjuster* const expcomp; Adjuster* const expcomp;

View File

@ -992,6 +992,7 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
locallab.spots.at(j).chromaskcol = locallab.spots.at(j).chromaskcol && pSpot.chromaskcol == otherSpot.chromaskcol; locallab.spots.at(j).chromaskcol = locallab.spots.at(j).chromaskcol && pSpot.chromaskcol == otherSpot.chromaskcol;
locallab.spots.at(j).gammaskcol = locallab.spots.at(j).gammaskcol && pSpot.gammaskcol == otherSpot.gammaskcol; locallab.spots.at(j).gammaskcol = locallab.spots.at(j).gammaskcol && pSpot.gammaskcol == otherSpot.gammaskcol;
locallab.spots.at(j).slomaskcol = locallab.spots.at(j).slomaskcol && pSpot.slomaskcol == otherSpot.slomaskcol; locallab.spots.at(j).slomaskcol = locallab.spots.at(j).slomaskcol && pSpot.slomaskcol == otherSpot.slomaskcol;
locallab.spots.at(j).lapmaskcol = locallab.spots.at(j).lapmaskcol && pSpot.lapmaskcol == otherSpot.lapmaskcol;
locallab.spots.at(j).qualitycurveMethod = locallab.spots.at(j).qualitycurveMethod && pSpot.qualitycurveMethod == otherSpot.qualitycurveMethod; locallab.spots.at(j).qualitycurveMethod = locallab.spots.at(j).qualitycurveMethod && pSpot.qualitycurveMethod == otherSpot.qualitycurveMethod;
locallab.spots.at(j).gridMethod = locallab.spots.at(j).gridMethod && pSpot.gridMethod == otherSpot.gridMethod; locallab.spots.at(j).gridMethod = locallab.spots.at(j).gridMethod && pSpot.gridMethod == otherSpot.gridMethod;
locallab.spots.at(j).llcurve = locallab.spots.at(j).llcurve && pSpot.llcurve == otherSpot.llcurve; locallab.spots.at(j).llcurve = locallab.spots.at(j).llcurve && pSpot.llcurve == otherSpot.llcurve;
@ -2847,6 +2848,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).slomaskcol = mods.locallab.spots.at(i).slomaskcol; toEdit.locallab.spots.at(i).slomaskcol = mods.locallab.spots.at(i).slomaskcol;
} }
if (locallab.spots.at(i).lapmaskcol) {
toEdit.locallab.spots.at(i).lapmaskcol = mods.locallab.spots.at(i).lapmaskcol;
}
if (locallab.spots.at(i).qualitycurveMethod) { if (locallab.spots.at(i).qualitycurveMethod) {
toEdit.locallab.spots.at(i).qualitycurveMethod = mods.locallab.spots.at(i).qualitycurveMethod; toEdit.locallab.spots.at(i).qualitycurveMethod = mods.locallab.spots.at(i).qualitycurveMethod;
} }
@ -4710,6 +4715,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
chromaskcol(v), chromaskcol(v),
gammaskcol(v), gammaskcol(v),
slomaskcol(v), slomaskcol(v),
lapmaskcol(v),
qualitycurveMethod(v), qualitycurveMethod(v),
gridMethod(v), gridMethod(v),
llcurve(v), llcurve(v),
@ -4979,6 +4985,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
chromaskcol = v; chromaskcol = v;
gammaskcol = v; gammaskcol = v;
slomaskcol = v; slomaskcol = v;
lapmaskcol = v;
qualitycurveMethod = v; qualitycurveMethod = v;
gridMethod = v; gridMethod = v;
llcurve = v; llcurve = v;

View File

@ -410,6 +410,7 @@ public:
bool chromaskcol; bool chromaskcol;
bool gammaskcol; bool gammaskcol;
bool slomaskcol; bool slomaskcol;
bool lapmaskcol;
bool qualitycurveMethod; bool qualitycurveMethod;
bool gridMethod; bool gridMethod;
bool llcurve; bool llcurve;