Merge pull request #5152 from Pandagrapher/newlocallab

GUI improvements for mask visibility
This commit is contained in:
Desmis 2019-01-26 07:35:22 +01:00 committed by GitHub
commit fa3d157d4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 340 additions and 339 deletions

View File

@ -870,6 +870,8 @@ HISTORY_MSG_614;Local - Exp Mask H
HISTORY_MSG_615;Local - Blend color
HISTORY_MSG_616;Local - Blend Exp
HISTORY_MSG_617;Local - Blur Exp
HISTORY_MSG_618;Local - Use Color Mask
HISTORY_MSG_619;Local - Use Exp Mask
HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors
HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction
HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction
@ -2037,6 +2039,7 @@ TP_LOCALLAB_SENSICB;Scope
TP_LOCALLAB_SENSIBN;Scope
TP_LOCALLAB_SENSIS_TOOLTIP;Adjust scope of action:\nSmall values limit action to colors very similar to those under the center spot.\nHigh values let the tool act upon a wider range of colors.\nValues smaller than 20 lead to a better algorithm.
TP_LOCALLAB_SETTINGS;Settings
TP_LOCALLAB_ENABLE_MASK;Enable mask
TP_LOCALLAB_SHOW;Mask and modifications
TP_LOCALLAB_SHOWMASKCOL_TOOLTIP;Display modifications.\nBeware, you can only view one modification (color and light or Exposure).\nYou must put 'Display modification' to 'none' or 'Usemask' to enabled the other show.\n\nUse Mask is before algorihtm shape detection
TP_LOCALLAB_SHOWMNONE;None

View File

@ -961,8 +961,14 @@ void Crop::update(int todo)
hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2, avg,
sca);
parent->ipf.Lab_Local(1, sp, (float**)shbuffer, labnCrop, labnCrop, reservCrop, cropx / skip, cropy / skip, skips(parent->fw, skip), skips(parent->fh, skip), skip, locRETgainCurve, lllocalcurve2,
loclhCurve, lochhCurve, locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili, LHutili, HHutili, cclocalcurve2, localskutili, sklocalcurve2, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2, huerefblu, huere, chromare, lumare, sobelre);
// Locallab mask are only shown for selected spot
if (sp == parent->params.locallab.selspot) {
parent->ipf.Lab_Local(1, sp, (float**)shbuffer, labnCrop, labnCrop, reservCrop, cropx / skip, cropy / skip, skips(parent->fw, skip), skips(parent->fh, skip), skip, locRETgainCurve, lllocalcurve2,
loclhCurve, lochhCurve, locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili, LHutili, HHutili, cclocalcurve2, localskutili, sklocalcurve2, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2, huerefblu, huere, chromare, lumare, sobelre, parent->locallColorMask, parent->locallExpMask);
} else {
parent->ipf.Lab_Local(1, sp, (float**)shbuffer, labnCrop, labnCrop, reservCrop, cropx / skip, cropy / skip, skips(parent->fw, skip), skips(parent->fh, skip), skip, locRETgainCurve, lllocalcurve2,
loclhCurve, lochhCurve, locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili, LHutili, HHutili, cclocalcurve2, localskutili, sklocalcurve2, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2, huerefblu, huere, chromare, lumare, sobelre, 0, 0);
}
lllocalcurve2.clear();
cclocalcurve2.clear();

View File

@ -121,6 +121,8 @@ ImProcCoordinator::ImProcCoordinator()
lumar(0),
sobeler(0),
lastspotdup(false),
locallColorMask(0),
locallExpMask(0),
avg(0),
retistrsav(nullptr)
{}
@ -837,11 +839,17 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
// Locallab tools computation
/* Notes:
* - maxspot, huerefs, centerx and centery aren't used in Lab_Local (only for printf) so values aren't important
* - shbuffer is used as nullptr
*/
ipf.Lab_Local(3, sp, (float**)shbuffer, nprevl, nprevl, reserv, 0, 0, pW, pH, scale, locRETgainCurve, lllocalcurve, loclhCurve, lochhCurve, locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
LHutili, HHutili, cclocalcurve, localskutili, sklocalcurve, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, huerblu, huer, chromar, lumar, sobeler);
// Locallab mask are only shown for selected spot
if (sp == params.locallab.selspot) {
ipf.Lab_Local(3, sp, (float**)shbuffer, nprevl, nprevl, reserv, 0, 0, pW, pH, scale, locRETgainCurve, lllocalcurve, loclhCurve, lochhCurve, locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
LHutili, HHutili, cclocalcurve, localskutili, sklocalcurve, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, huerblu, huer, chromar, lumar, sobeler, locallColorMask, locallExpMask);
} else {
ipf.Lab_Local(3, sp, (float**)shbuffer, nprevl, nprevl, reserv, 0, 0, pW, pH, scale, locRETgainCurve, lllocalcurve, loclhCurve, lochhCurve, locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
LHutili, HHutili, cclocalcurve, localskutili, sklocalcurve, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, huerblu, huer, chromar, lumar, sobeler, 0, 0);
}
lllocalcurve.clear();
cclocalcurve.clear();
sklocalcurve.clear();

View File

@ -261,14 +261,10 @@ protected:
LUTf sobelrefs;
double huer, huerblu, chromar, lumar, sobeler;
bool lastspotdup;
int locallColorMask;
int locallExpMask;
float avg;
public:
ImProcCoordinator ();
@ -339,6 +335,12 @@ public:
updaterThreadStart.unlock();
}
void setLocallabMaskVisibility (int locallColorMask, int locallExpMask) override
{
this->locallColorMask = locallColorMask;
this->locallExpMask = locallExpMask;
}
void setProgressListener (ProgressListener* pl) override
{
plistener = pl;

View File

@ -289,7 +289,7 @@ public:
void calc_ref(int sp, LabImage* original, LabImage* transformed, int cx, int cy, int oW, int oH, int sk, double &huerefblur, double &huere, double &chromare, double &lumare, double &sobelref, LUTu & histogram, float &avg);
void copy_ref(LabImage* spotbuffer, LabImage* original, LabImage* transformed, int cx, int cy, int sk, const struct local_params & lp, double &huerefspot, double &chromarefspot, double &lumarefspot);
void paste_ref(LabImage* spotbuffer, LabImage* transformed, int cx, int cy, int sk, const struct local_params & lp);
void Lab_Local(int call, int sp, float** shbuffer, LabImage* original, LabImage* transformed, LabImage* reserved, int cx, int cy, int oW, int oH, int sk, const LocretigainCurve & locRETgainCcurve, LUTf & lllocalcurve, const LocLHCurve & loclhCurve, const LocHHCurve & lochhCurve, const LocCCmaskCurve & locccmasCurve, bool & lcmasutili, const LocLLmaskCurve & locllmasCurve, bool & llmasutili, const LocHHmaskCurve & lochhmasCurve, bool & lhmasutili, const LocCCmaskexpCurve & locccmasexpCurve, bool &lcmasexputili, const LocLLmaskexpCurve & locllmasexpCurve, bool &llmasexputili, const LocHHmaskexpCurve & lochhmasexpCurve, bool & lhmasexputili, bool &LHutili, bool &HHutili, LUTf & cclocalcurve, bool & localskutili, LUTf & sklocalcurve, bool & localexutili, LUTf & exlocalcurve, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, LUTf & lightCurveloc, double & huerefblur, double &hueref, double &chromaref, double &lumaref, double &sobelref);
void Lab_Local(int call, int sp, float** shbuffer, LabImage* original, LabImage* transformed, LabImage* reserved, int cx, int cy, int oW, int oH, int sk, const LocretigainCurve & locRETgainCcurve, LUTf & lllocalcurve, const LocLHCurve & loclhCurve, const LocHHCurve & lochhCurve, const LocCCmaskCurve & locccmasCurve, bool & lcmasutili, const LocLLmaskCurve & locllmasCurve, bool & llmasutili, const LocHHmaskCurve & lochhmasCurve, bool & lhmasutili, const LocCCmaskexpCurve & locccmasexpCurve, bool &lcmasexputili, const LocLLmaskexpCurve & locllmasexpCurve, bool &llmasexputili, const LocHHmaskexpCurve & lochhmasexpCurve, bool & lhmasexputili, bool &LHutili, bool &HHutili, LUTf & cclocalcurve, bool & localskutili, LUTf & sklocalcurve, bool & localexutili, LUTf & exlocalcurve, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, LUTf & lightCurveloc, double & huerefblur, double &hueref, double &chromaref, double &lumaref, double &sobelref, int llColorMask, int llExpMask);
void addGaNoise(LabImage *lab, LabImage *dst, const float mean, const float variance, const int sk);
void BlurNoise_Localold(int call, const struct local_params& lp, LabImage* original, LabImage* transformed, const LabImage* const tmp1, int cx, int cy);
void InverseBlurNoise_Local(const struct local_params& lp, LabImage* original, LabImage* transformed, const LabImage* const tmp1, int cx, int cy);

View File

@ -226,8 +226,8 @@ struct local_params {
int war;
float adjch;
int shapmet;
bool enaColorMask;
bool enaExpMask;
};
static void SobelCannyLuma(float **sobelL, float **luma, int bfw, int bfh, float radius)
@ -343,7 +343,7 @@ static void SobelCannyLuma(float **sobelL, float **luma, int bfw, int bfh, float
static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locallab, struct local_params& lp)
static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locallab, struct local_params& lp, int llColorMask, int llExpMask)
{
int w = oW;
int h = oH;
@ -395,34 +395,10 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall
lp.qualcurvemet = 5;
}
if (locallab.spots.at(sp).showmaskcolMethod == "none") {
lp.showmaskcolmet = 0;
} else if (locallab.spots.at(sp).showmaskcolMethod == "color") {
lp.showmaskcolmet = 1;
} else if (locallab.spots.at(sp).showmaskcolMethod == "colormask") {
lp.showmaskcolmet = 2;
} else if (locallab.spots.at(sp).showmaskcolMethod == "mask") {
lp.showmaskcolmet = 3;
} else if (locallab.spots.at(sp).showmaskcolMethod == "showmask") {
lp.showmaskcolmet = 4;
} else if (locallab.spots.at(sp).showmaskcolMethod == "showstruc") {
lp.showmaskcolmet = 5;
}
if (locallab.spots.at(sp).showmaskexpMethod == "none") {
lp.showmaskexpmet = 0;
} else if (locallab.spots.at(sp).showmaskexpMethod == "expo") {
lp.showmaskexpmet = 1;
} else if (locallab.spots.at(sp).showmaskexpMethod == "expomask") {
lp.showmaskexpmet = 2;
} else if (locallab.spots.at(sp).showmaskexpMethod == "mask") {
lp.showmaskexpmet = 3;
} else if (locallab.spots.at(sp).showmaskexpMethod == "showmask") {
lp.showmaskexpmet = 4;
} else if (locallab.spots.at(sp).showmaskexpMethod == "showstruc") {
lp.showmaskexpmet = 5;
}
lp.showmaskcolmet = llColorMask;
lp.showmaskexpmet = llExpMask;
lp.enaColorMask = locallab.spots.at(sp).enaColorMask && llColorMask == 0 && llExpMask == 0; // Color & Light mask is deactivated if Exposure mask is visible
lp.enaExpMask = locallab.spots.at(sp).enaExpMask && llExpMask == 0 && llColorMask == 0; // Exposure mask is deactivated if Color & Light mask is visible
if (locallab.spots.at(sp).blurMethod == "norm") {
lp.blurmet = 0;
@ -579,7 +555,7 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall
lp.threshol = thresho;
lp.chromacb = chromcbdl;
lp.colorena = locallab.spots.at(sp).expcolor;
lp.colorena = locallab.spots.at(sp).expcolor && llExpMask == 0; // Color & Light tool is deactivated if Exposure mask is visible
lp.blurena = locallab.spots.at(sp).expblur;
lp.tonemapena = locallab.spots.at(sp).exptonemap;
lp.retiena = locallab.spots.at(sp).expreti;
@ -593,7 +569,7 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall
lp.past = chromaPastel;
lp.satur = chromaSatur;
lp.exposena = locallab.spots.at(sp).expexpose;
lp.exposena = locallab.spots.at(sp).expexpose && llColorMask == 0; // Exposure tool is deactivated if Color & Light mask is visible
lp.cut_past = cupas;
lp.blac = locallab.spots.at(sp).black;
lp.shcomp = locallab.spots.at(sp).shcompr;
@ -5058,7 +5034,7 @@ void ImProcFunctions::Expo_vibr_Local(int senstype, LabImage * bufexporig, LabIm
float radius = (2.f + 0.2f * lp.blurexp) / sk;
bool usemask = (lp.showmaskexpmet == 2 || lp.showmaskexpmet == 3) && senstype == 1;
bool usemask = (lp.showmaskexpmet == 2 || lp.enaExpMask) && senstype == 1;
if (usemask)
{
@ -5335,7 +5311,7 @@ void ImProcFunctions::Expo_vibr_Local(int senstype, LabImage * bufexporig, LabIm
}
delete origblur;
if ((lp.showmaskcolmet == 2 || lp.showmaskcolmet == 3) && senstype == 1)
if ((lp.showmaskcolmet == 2 || lp.enaColorMask) && senstype == 1)
{
delete origblurmask;
}
@ -5442,7 +5418,7 @@ void ImProcFunctions::ColorLight_Local(float moddE, float powdE, int call, LabIm
float radius = 3.f / sk;
if (lp.showmaskcolmet == 2 || lp.showmaskcolmet == 3) {
if (lp.showmaskcolmet == 2 || lp.enaColorMask) {
origblurmask = new LabImage(GW, GH);
#ifdef _OPENMP
@ -5567,7 +5543,7 @@ void ImProcFunctions::ColorLight_Local(float moddE, float powdE, int call, LabIm
rsob = 1.1f * lp.struco * (rs);
}
if (lp.showmaskcolmet == 2 || lp.showmaskcolmet == 3) {
if (lp.showmaskcolmet == 2 || lp.enaColorMask) {
rhuemask = xatan2f(origblurmask->b[y][x], origblurmask->a[y][x]);
rchromask = sqrt(SQR(origblurmask->b[y][x]) + SQR(origblurmask->a[y][x])) / 327.68f;
rLmask = origblurmask->L[y][x] / 327.68f;
@ -6282,7 +6258,7 @@ void ImProcFunctions::ColorLight_Local(float moddE, float powdE, int call, LabIm
delete origblur;
if (lp.showmaskcolmet == 2 || lp.showmaskcolmet == 3) {
if (lp.showmaskcolmet == 2 || lp.enaColorMask) {
delete origblurmask;
}
}
@ -6785,7 +6761,7 @@ void ImProcFunctions::calc_ref(int sp, LabImage * original, LabImage * transform
if (params->locallab.enabled) {
//always calculate hueref, chromaref, lumaref before others operations use in normal mode for all modules exceprt denoise
struct local_params lp;
calcLocalParams(sp, oW, oH, params->locallab, lp);
calcLocalParams(sp, oW, oH, params->locallab, lp, 0, 0);
int begy = lp.yc - lp.lyT;
int begx = lp.xc - lp.lxL;
int yEn = lp.yc + lp.ly;
@ -7234,11 +7210,9 @@ void ImProcFunctions::fftw_denoise(int GW, int GH, int max_numblox_W, int min_nu
}
void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * original, LabImage * transformed, LabImage * reserved, int cx, int cy, int oW, int oH, int sk,
const LocretigainCurve & locRETgainCcurve, LUTf & lllocalcurve, const LocLHCurve & loclhCurve, const LocHHCurve & lochhCurve, const LocCCmaskCurve & locccmasCurve, bool & lcmasutili, const LocLLmaskCurve & locllmasCurve, bool & llmasutili, const LocHHmaskCurve & lochhmasCurve, bool &lhmasutili, const LocCCmaskexpCurve & locccmasexpCurve, bool &lcmasexputili, const LocLLmaskexpCurve & locllmasexpCurve, bool &llmasexputili, const LocHHmaskexpCurve & lochhmasexpCurve, bool & lhmasexputili,
bool & LHutili, bool & HHutili, LUTf & cclocalcurve, bool & localskutili, LUTf & sklocalcurve, bool & localexutili, LUTf & exlocalcurve, LUTf & hltonecurveloc, LUTf & shtonecurveloc, LUTf & tonecurveloc, LUTf & lightCurveloc, double & huerefblur, double & hueref, double & chromaref, double & lumaref, double & sobelref)
bool & LHutili, bool & HHutili, LUTf & cclocalcurve, bool & localskutili, LUTf & sklocalcurve, bool & localexutili, LUTf & exlocalcurve, LUTf & hltonecurveloc, LUTf & shtonecurveloc, LUTf & tonecurveloc, LUTf & lightCurveloc, double & huerefblur, double & hueref, double & chromaref, double & lumaref, double & sobelref, int llColorMask, int llExpMask)
{
//general call of others functions : important return hueref, chromaref, lumaref
if (params->locallab.enabled) {
@ -7253,7 +7227,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
int del = 3; // to avoid crash with [loy - begy] and [lox - begx] and bfh bfw // with gtk2 [loy - begy-1] [lox - begx -1 ] and del = 1
struct local_params lp;
calcLocalParams(sp, oW, oH, params->locallab, lp);
calcLocalParams(sp, oW, oH, params->locallab, lp, llColorMask, llExpMask);
const float radius = lp.rad / (sk * 1.4f); //0 to 70 ==> see skip
int strred = (lp.strucc - 1);
@ -7410,7 +7384,6 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
}
}
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
#endif
@ -8041,7 +8014,6 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
noiseccb = 0.0001f;
}
if (!adecomp.memoryAllocationFailed && !bdecomp.memoryAllocationFailed) {
if (levred == 7) {
@ -9336,7 +9308,6 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
}
//local contrast
if (lp.lcamount > 0.f && call < 3 && lp.lcena) { //interior ellipse for sharpening, call = 1 and 2 only with Dcrop and simpleprocess
int bfh = call == 2 ? int (lp.ly + lp.lyT) + del : original->H; //bfw bfh real size of square zone
@ -9729,7 +9700,8 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
}
}
if (lp.exposena && (lp.expcomp != 0.f || lp.war != 0 || lp.showmaskexpmet == 2 || lp.showmaskexpmet == 3 || lp.showmaskexpmet == 4 || lp.showmaskexpmet == 5 || (exlocalcurve && localexutili))) { //interior ellipse renforced lightness and chroma //locallutili
if (lp.exposena && (lp.expcomp != 0.f || lp.war != 0 || lp.showmaskexpmet == 2 || lp.enaExpMask || lp.showmaskexpmet == 3 || lp.showmaskexpmet == 4 || (exlocalcurve && localexutili))) { //interior ellipse renforced lightness and chroma //locallutili
float hueplus = hueref + dhueex;
float huemoins = hueref - dhueex;
@ -9769,7 +9741,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
bufexptemp = new LabImage(bfw, bfh);
bufcat02fin = new LabImage(bfw, bfh);
if (lp.showmaskexpmet == 2 || lp.showmaskexpmet == 3 || lp.showmaskexpmet == 4) {
if (lp.showmaskexpmet == 2 || lp.enaExpMask || lp.showmaskexpmet == 3) {
int GWm = transformed->W;
int GHm = transformed->H;
bufmaskorigexp = new LabImage(bfw, bfh);
@ -9788,7 +9760,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
bufexporig->a[ir][jr] = 0.f;
bufexporig->b[ir][jr] = 0.f;
if (lp.showmaskexpmet == 2 || lp.showmaskexpmet == 3 || lp.showmaskexpmet == 4) {
if (lp.showmaskexpmet == 2 || lp.enaExpMask || lp.showmaskexpmet == 3) {
bufmaskorigexp->L[ir][jr] = 0.f;
bufmaskorigexp->a[ir][jr] = 0.f;
bufmaskorigexp->b[ir][jr] = 0.f;
@ -9889,7 +9861,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
delete[] tmL;
}
if (lp.showmaskexpmet == 5) {
if (lp.showmaskexpmet == 4) {
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
#endif
@ -9934,7 +9906,7 @@ 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) {
if (lp.showmaskexpmet == 2 || lp.showmaskexpmet == 3 || lp.showmaskexpmet == 4) {
if (lp.showmaskexpmet == 2 || lp.enaExpMask || lp.showmaskexpmet == 3) {
bufmaskorigexp->L[loy - begy][lox - begx] = original->L[y][x];
bufmaskorigexp->a[loy - begy][lox - begx] = original->a[y][x];
bufmaskorigexp->b[loy - begy][lox - begx] = original->b[y][x];
@ -9959,7 +9931,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
float kmaskHb = 0;
if (lp.showmaskexpmet == 2 || lp.showmaskexpmet == 3 || lp.showmaskexpmet == 4) {
if (lp.showmaskexpmet == 2 || lp.enaExpMask || lp.showmaskexpmet == 3) {
if (locllmasexpCurve && llmasexputili) {
float ligh = (bufexporig->L[loy - begy][lox - begx]) / 32768.f;
@ -10006,7 +9978,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
float radiusb = 3.f / sk;
if (lp.showmaskexpmet == 2 || lp.showmaskexpmet == 3 || lp.showmaskexpmet == 4) {
if (lp.showmaskexpmet == 2 || lp.enaExpMask || lp.showmaskexpmet == 3) {
#ifdef _OPENMP
#pragma omp parallel
@ -10020,7 +9992,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
delete bufmaskblurexp;
if (lp.showmaskexpmet != 4) {
if (lp.showmaskexpmet != 3 || lp.enaExpMask) {
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
@ -10084,7 +10056,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
delete bufmaskorigexp;
} else if (lp.showmaskexpmet == 4) {
} else if (lp.showmaskexpmet == 3) {
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
#endif
@ -10120,7 +10092,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
}
if (lp.showmaskexpmet == 0 || lp.showmaskexpmet == 1 || lp.showmaskexpmet == 2 || lp.showmaskexpmet == 3) {
if (lp.showmaskexpmet == 0 || lp.showmaskexpmet == 1 || lp.showmaskexpmet == 2 || lp.enaExpMask) {
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
@ -10235,7 +10207,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
delete bufexptemp;
delete bufcat02fin;
if (lp.showmaskexpmet == 2 || lp.showmaskexpmet == 3 || lp.showmaskexpmet == 4) {
if (lp.showmaskexpmet == 2 || lp.enaExpMask || lp.showmaskexpmet == 3) {
delete originalmaskexp;
}
}
@ -10245,7 +10217,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
//local color and light
if (!lp.inv && (lp.chro != 0 || lp.ligh != 0.f || lp.cont != 0 || lp.qualcurvemet != 0 || lp.showmaskcolmet == 2 || lp.showmaskcolmet == 3 || lp.showmaskcolmet == 4 || lp.showmaskcolmet == 5) && lp.colorena) { // || lllocalcurve)) { //interior ellipse renforced lightness and chroma //locallutili
if (!lp.inv && (lp.chro != 0 || lp.ligh != 0.f || lp.cont != 0 || lp.qualcurvemet != 0 || lp.showmaskcolmet == 2 || lp.enaColorMask || lp.showmaskcolmet == 3 || lp.showmaskcolmet == 4) && lp.colorena) { // || lllocalcurve)) { //interior ellipse renforced lightness and chroma //locallutili
float hueplus = hueref + dhue;
float huemoins = hueref - dhue;
@ -10282,6 +10254,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
float adjustr = 1.0f;
//adapt chroma to working profile
if (params->icm.workingProfile == "ProPhoto") {
adjustr = 1.2f; // 1.2 instead 1.0 because it's very rare to have C>170..
@ -10302,7 +10275,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
if (call <= 3) { //simpleprocess, dcrop, improccoordinator
bufcolorig = new LabImage(bfw, bfh);
if (lp.showmaskcolmet == 2 || lp.showmaskcolmet == 3 || lp.showmaskcolmet == 4) {
if (lp.showmaskcolmet == 2 || lp.enaColorMask || lp.showmaskcolmet == 3) {
bufmaskorigcol = new LabImage(bfw, bfh);
bufmaskblurcol = new LabImage(bfw, bfh);
int GWm = transformed->W;
@ -10320,7 +10293,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
bufcolorig->a[ir][jr] = 0.f;
bufcolorig->b[ir][jr] = 0.f;
if (lp.showmaskcolmet == 2 || lp.showmaskcolmet == 3 || lp.showmaskcolmet == 4) {
if (lp.showmaskcolmet == 2 || lp.enaColorMask || lp.showmaskcolmet == 3) {
bufmaskorigcol->L[ir][jr] = 0.f;
bufmaskorigcol->a[ir][jr] = 0.f;
bufmaskorigcol->b[ir][jr] = 0.f;
@ -10415,7 +10388,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
delete[] tmL;
}
if (lp.showmaskcolmet == 5) {
if (lp.showmaskcolmet == 4) {
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
#endif
@ -10459,7 +10432,7 @@ 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) {
if (lp.showmaskcolmet == 2 || lp.showmaskcolmet == 3 || lp.showmaskcolmet == 4) {
if (lp.showmaskcolmet == 2 || lp.enaColorMask || lp.showmaskcolmet == 3) {
bufmaskorigcol->L[loy - begy][lox - begx] = original->L[y][x];
bufmaskorigcol->a[loy - begy][lox - begx] = original->a[y][x];
bufmaskorigcol->b[loy - begy][lox - begx] = original->b[y][x];
@ -10483,7 +10456,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
float kmaskHa = 0;
float kmaskHb = 0;
if (lp.showmaskcolmet == 2 || lp.showmaskcolmet == 3 || lp.showmaskcolmet == 4) {
if (lp.showmaskcolmet == 2 || lp.enaColorMask || lp.showmaskcolmet == 3) {
if (locllmasCurve && llmasutili) {
float ligh = (bufcolorig->L[loy - begy][lox - begx]) / 32768.f;
@ -10528,7 +10501,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
float radiusb = 3.f / sk;
if (lp.showmaskcolmet == 2 || lp.showmaskcolmet == 3 || lp.showmaskcolmet == 4) {
if (lp.showmaskcolmet == 2 || lp.enaColorMask || lp.showmaskcolmet == 3) {
#ifdef _OPENMP
#pragma omp parallel
#endif
@ -10539,7 +10512,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
}
delete bufmaskblurcol;
if (lp.showmaskcolmet != 4) {
if (lp.showmaskcolmet != 3 || lp.enaColorMask) {
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
@ -10603,8 +10576,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
delete bufmaskorigcol;
} else if (lp.showmaskcolmet == 4) {
} else if (lp.showmaskcolmet == 3) {
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
#endif
@ -10639,9 +10611,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
}
}
if (lp.showmaskcolmet == 0 || lp.showmaskcolmet == 1 || lp.showmaskcolmet == 2 || lp.showmaskcolmet == 3) {
if (lp.showmaskcolmet == 0 || lp.showmaskcolmet == 1 || lp.showmaskcolmet == 2 || lp.enaColorMask) {
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
#endif
@ -10752,7 +10722,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
delete bufcolorig;
if (lp.showmaskcolmet == 2 || lp.showmaskcolmet == 3 || lp.showmaskcolmet == 4) {
if (lp.showmaskcolmet == 2 || lp.enaColorMask || lp.showmaskcolmet == 3) {
delete originalmaskcol;
}
@ -10775,11 +10745,6 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
InverseColorLight_Local(lp, lightCurveloc, original, transformed, cx, cy, hueplus, huemoins, hueref, dhue, chromaref, lumaref, sk);
}
// Gamut and Munsell control - very important do not desactivated to avoid crash
if (params->locallab.spots.at(sp).avoid) {
TMatrix wiprof = ICCStore::getInstance()->workingSpaceInverseMatrix(params->icm.workingProfile);

View File

@ -644,6 +644,8 @@ enum ProcEventCode {
Evlocallabblendmaskcol = 614,
Evlocallabblendmaskexp = 615,
Evlocallabblurexpde = 616,
EvLocallabEnaColorMask = 617,
EvLocallabEnaExpMask = 618,
NUMOFEVENTS
};

View File

@ -2365,15 +2365,15 @@ LocallabParams::LocallabSpot::LocallabSpot() :
structcol(0),
blendmaskcol(0),
qualitycurveMethod("none"),
showmaskcolMethod("none"),
llcurve{(double)DCT_NURBS, 0.0, 0.0, 1.0, 1.0},
cccurve{(double)DCT_NURBS, 0.0, 0.0, 1.0, 1.0},
LHcurve{(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},
HHcurve{(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},
invers(false),
enaColorMask(false),
CCmaskcurve{(double)FCT_MinMaxCPoints, 0.0, 1.0, 0.35, 0.35, 0.50, 1.0, 0.35, 0.35, 1.00, 1.0, 0.35, 0.35 },
LLmaskcurve{(double)FCT_MinMaxCPoints, 0.0, 1.0, 0.35, 0.35, 0.50, 1.0, 0.35, 0.35, 1.00, 1.0, 0.35, 0.35 },
HHmaskcurve{(double)FCT_MinMaxCPoints, 0.0, 1.0, 0.35, 0.35, 0.50, 1.0, 0.35, 0.35, 1.00, 1.0, 0.35, 0.35 },
invers(false),
// Exposure
expexpose(false),
expcomp(0),
@ -2386,12 +2386,11 @@ LocallabParams::LocallabSpot::LocallabSpot() :
structexp(0),
blurexpde(5),
excurve{(double)DCT_NURBS, 0.0, 0.0, 1.0, 1.0},
showmaskexpMethod("none"),
enaExpMask(false),
CCmaskexpcurve{(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},
blendmaskexp(0),
// Vibrance
expvibrance(false),
saturated(0),
@ -2507,15 +2506,15 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
&& structcol == other.structcol
&& blendmaskcol == other.blendmaskcol
&& qualitycurveMethod == other.qualitycurveMethod
&& showmaskcolMethod == other.showmaskcolMethod
&& llcurve == other.llcurve
&& cccurve == other.cccurve
&& LHcurve == other.LHcurve
&& HHcurve == other.HHcurve
&& invers == other.invers
&& enaColorMask == other.enaColorMask
&& CCmaskcurve == other.CCmaskcurve
&& LLmaskcurve == other.LLmaskcurve
&& HHmaskcurve == other.HHmaskcurve
&& invers == other.invers
// Exposure
&& expexpose == other.expexpose
&& expcomp == other.expcomp
@ -2528,7 +2527,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
&& structexp == other.structexp
&& blurexpde == other.blurexpde
&& excurve == other.excurve
&& showmaskexpMethod == other.showmaskexpMethod
&& enaExpMask == other.enaExpMask
&& CCmaskexpcurve == other.CCmaskexpcurve
&& LLmaskexpcurve == other.LLmaskexpcurve
&& HHmaskexpcurve == other.HHmaskexpcurve
@ -3601,15 +3600,15 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).structcol, "Locallab", "Structcol_" + std::to_string(i), spot.structcol, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).blendmaskcol, "Locallab", "Blendmaskcol_" + std::to_string(i), spot.blendmaskcol, 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).showmaskcolMethod, "Locallab", "ShowmaskcolMethod_" + std::to_string(i), spot.showmaskcolMethod, 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).cccurve, "Locallab", "CCCurve_" + std::to_string(i), spot.cccurve, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).LHcurve, "Locallab", "LHCurve_" + std::to_string(i), spot.LHcurve, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).HHcurve, "Locallab", "HHCurve_" + std::to_string(i), spot.HHcurve, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).invers, "Locallab", "Invers_" + std::to_string(i), spot.invers, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).enaColorMask, "Locallab", "EnaColorMask_" + std::to_string(i), spot.enaColorMask, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).CCmaskcurve, "Locallab", "CCmaskCurve_" + std::to_string(i), spot.CCmaskcurve, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).LLmaskcurve, "Locallab", "LLmaskCurve_" + std::to_string(i), spot.LLmaskcurve, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).HHmaskcurve, "Locallab", "HHmaskCurve_" + std::to_string(i), spot.HHmaskcurve, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).invers, "Locallab", "Invers_" + std::to_string(i), spot.invers, keyFile);
// Exposure
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).expexpose, "Locallab", "Expexpose_" + std::to_string(i), spot.expexpose, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).expcomp, "Locallab", "Expcomp_" + std::to_string(i), spot.expcomp, keyFile);
@ -3622,7 +3621,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).structexp, "Locallab", "Structexp_" + std::to_string(i), spot.structexp, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).blurexpde, "Locallab", "Blurexpde_" + std::to_string(i), spot.blurexpde, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).excurve, "Locallab", "ExCurve_" + std::to_string(i), spot.excurve, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).showmaskexpMethod, "Locallab", "ShowmaskexpMethod_" + std::to_string(i), spot.showmaskexpMethod, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).enaExpMask, "Locallab", "EnaExpMask_" + std::to_string(i), spot.enaExpMask, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).CCmaskexpcurve, "Locallab", "CCmaskexpCurve_" + std::to_string(i), spot.CCmaskexpcurve, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).LLmaskexpcurve, "Locallab", "LLmaskexpCurve_" + std::to_string(i), spot.LLmaskexpcurve, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).HHmaskexpcurve, "Locallab", "HHmaskexpCurve_" + std::to_string(i), spot.HHmaskexpcurve, keyFile);
@ -4822,15 +4821,15 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Locallab", "Structcol_" + std::to_string(i), pedited, spot.structcol, spotEdited.structcol);
assignFromKeyfile(keyFile, "Locallab", "Blendmaskcol_" + std::to_string(i), pedited, spot.blendmaskcol, spotEdited.blendmaskcol);
assignFromKeyfile(keyFile, "Locallab", "QualityCurveMethod_" + std::to_string(i), pedited, spot.qualitycurveMethod, spotEdited.qualitycurveMethod);
assignFromKeyfile(keyFile, "Locallab", "ShowmaskcolMethod_" + std::to_string(i), pedited, spot.showmaskcolMethod, spotEdited.showmaskcolMethod);
assignFromKeyfile(keyFile, "Locallab", "LLCurve_" + std::to_string(i), pedited, spot.llcurve, spotEdited.llcurve);
assignFromKeyfile(keyFile, "Locallab", "CCCurve_" + std::to_string(i), pedited, spot.cccurve, spotEdited.cccurve);
assignFromKeyfile(keyFile, "Locallab", "LHCurve_" + std::to_string(i), pedited, spot.LHcurve, spotEdited.LHcurve);
assignFromKeyfile(keyFile, "Locallab", "HHCurve_" + std::to_string(i), pedited, spot.HHcurve, spotEdited.HHcurve);
assignFromKeyfile(keyFile, "Locallab", "Invers_" + std::to_string(i), pedited, spot.invers, spotEdited.invers);
assignFromKeyfile(keyFile, "Locallab", "EnaColorMask_" + std::to_string(i), pedited, spot.enaColorMask, spotEdited.enaColorMask);
assignFromKeyfile(keyFile, "Locallab", "CCmaskCurve_" + std::to_string(i), pedited, spot.CCmaskcurve, spotEdited.CCmaskcurve);
assignFromKeyfile(keyFile, "Locallab", "LLmaskCurve_" + std::to_string(i), pedited, spot.LLmaskcurve, spotEdited.LLmaskcurve);
assignFromKeyfile(keyFile, "Locallab", "HHmaskCurve_" + std::to_string(i), pedited, spot.HHmaskcurve, spotEdited.HHmaskcurve);
assignFromKeyfile(keyFile, "Locallab", "Invers_" + std::to_string(i), pedited, spot.invers, spotEdited.invers);
// Exposure
assignFromKeyfile(keyFile, "Locallab", "Expexpose_" + std::to_string(i), pedited, spot.expexpose, spotEdited.expexpose);
assignFromKeyfile(keyFile, "Locallab", "Expcomp_" + std::to_string(i), pedited, spot.expcomp, spotEdited.expcomp);
@ -4843,7 +4842,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Locallab", "Structexp_" + std::to_string(i), pedited, spot.structexp, spotEdited.structexp);
assignFromKeyfile(keyFile, "Locallab", "Blurexpde_" + std::to_string(i), pedited, spot.blurexpde, spotEdited.blurexpde);
assignFromKeyfile(keyFile, "Locallab", "ExCurve_" + std::to_string(i), pedited, spot.excurve, spotEdited.excurve);
assignFromKeyfile(keyFile, "Locallab", "ShowmaskexpMethod_" + std::to_string(i), pedited, spot.showmaskexpMethod, spotEdited.showmaskexpMethod);
assignFromKeyfile(keyFile, "Locallab", "EnaExpMask_" + std::to_string(i), pedited, spot.enaExpMask, spotEdited.enaExpMask);
assignFromKeyfile(keyFile, "Locallab", "CCmaskexpCurve_" + std::to_string(i), pedited, spot.CCmaskexpcurve, spotEdited.CCmaskexpcurve);
assignFromKeyfile(keyFile, "Locallab", "LLmaskexpCurve_" + std::to_string(i), pedited, spot.LLmaskexpcurve, spotEdited.LLmaskexpcurve);
assignFromKeyfile(keyFile, "Locallab", "HHmaskexpCurve_" + std::to_string(i), pedited, spot.HHmaskexpcurve, spotEdited.HHmaskexpcurve);

View File

@ -965,15 +965,15 @@ struct LocallabParams {
int structcol;
int blendmaskcol;
Glib::ustring qualitycurveMethod;
Glib::ustring showmaskcolMethod;
std::vector<double> llcurve;
std::vector<double> cccurve;
std::vector<double> LHcurve;
std::vector<double> HHcurve;
bool invers;
bool enaColorMask;
std::vector<double> CCmaskcurve;
std::vector<double> LLmaskcurve;
std::vector<double> HHmaskcurve;
bool invers;
// Exposure
bool expexpose;
int expcomp;
@ -986,7 +986,7 @@ struct LocallabParams {
int structexp;
int blurexpde;
std::vector<double> excurve;
Glib::ustring showmaskexpMethod;
bool enaExpMask;
std::vector<double> CCmaskexpcurve;
std::vector<double> LLmaskexpcurve;
std::vector<double> HHmaskexpcurve;

View File

@ -523,7 +523,7 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
0, // unused
LUMINANCECURVE, // EvLocallabSpotCreated
LUMINANCECURVE, // EvLocallabSpotDeleted
M_VOID, // EvLocallabSpotSelected
LUMINANCECURVE, // EvLocallabSpotSelected
M_VOID, // EvLocallabSpotName
M_VOID, // EvLocallabSpotVisibility
LUMINANCECURVE, // EvLocallabSpotShape
@ -617,33 +617,35 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
LUMINANCECURVE, // Evlocallabadjblur
LUMINANCECURVE, // Evlocallabbilateral
LUMINANCECURVE, // Evlocallabsensiden
LUMINANCECURVE, // Evlocallabavoid
LUMINANCECURVE, // Evlocallabsharcontrast
LUMINANCECURVE, //EvLocenacontrast
LUMINANCECURVE, //Evlocallablcradius
LUMINANCECURVE, //Evlocallablcamount
LUMINANCECURVE, //Evlocallablcdarkness
LUMINANCECURVE, //Evlocallablclightness
LUMINANCECURVE, //Evlocallabsensilc
LUMINANCECURVE, //Evlocallabdehaz
LUMINANCECURVE, //EvLocenasoft
LUMINANCECURVE, //EvLocallabstreng
LUMINANCECURVE, //EvLocallabsensisf
LUMINANCECURVE, //Evlocallabsharblur
LUMINANCECURVE, //EvLocenalabregion
LUMINANCECURVE, //EvlocallabshowmaskcolMethod
LUMINANCECURVE, //EvlocallabshowmaskexpMethod
LUMINANCECURVE, //EvlocallabCCmaskshape
LUMINANCECURVE, //EvlocallabLLmaskshape
LUMINANCECURVE, //EvlocallabCCmaskexpshape
LUMINANCECURVE, //EvlocallabLLmaskexpshape
LUMINANCECURVE, //EvlocallabHHmaskshape
LUMINANCECURVE, //Evlocallabstructcol
LUMINANCECURVE, //Evlocallabstructexp
LUMINANCECURVE, //EvlocallabHHmaskexpshape
LUMINANCECURVE, //Evlocallabblendmaskcol
LUMINANCECURVE, //Evlocallabblendmaskexp
LUMINANCECURVE //Evlocallabblurexpde
LUMINANCECURVE, // Evlocallabavoid
LUMINANCECURVE, // Evlocallabsharcontrast
LUMINANCECURVE, // EvLocenacontrast
LUMINANCECURVE, // Evlocallablcradius
LUMINANCECURVE, // Evlocallablcamount
LUMINANCECURVE, // Evlocallablcdarkness
LUMINANCECURVE, // Evlocallablclightness
LUMINANCECURVE, // Evlocallabsensilc
LUMINANCECURVE, // Evlocallabdehaz
LUMINANCECURVE, // EvLocenasoft
LUMINANCECURVE, // EvLocallabstreng
LUMINANCECURVE, // EvLocallabsensisf
LUMINANCECURVE, // Evlocallabsharblur
LUMINANCECURVE, // EvLocenalabregion
LUMINANCECURVE, // EvlocallabshowmaskcolMethod
LUMINANCECURVE, // EvlocallabshowmaskexpMethod
LUMINANCECURVE, // EvlocallabCCmaskshape
LUMINANCECURVE, // EvlocallabLLmaskshape
LUMINANCECURVE, // EvlocallabCCmaskexpshape
LUMINANCECURVE, // EvlocallabLLmaskexpshape
LUMINANCECURVE, // EvlocallabHHmaskshape
LUMINANCECURVE, // Evlocallabstructcol
LUMINANCECURVE, // Evlocallabstructexp
LUMINANCECURVE, // EvlocallabHHmaskexpshape
LUMINANCECURVE, // Evlocallabblendmaskcol
LUMINANCECURVE, // Evlocallabblendmaskexp
LUMINANCECURVE, // Evlocallabblurexpde
LUMINANCECURVE, // EvLocallabEnaColorMask
LUMINANCECURVE // EvLocallabEnaExpMask
};

View File

@ -484,6 +484,8 @@ public:
virtual void updateUnLock() = 0;
virtual void setLocallabMaskVisibility(int locallColorMask, int locallExpMask) = 0;
/** Creates and returns a Crop instance that acts as a window on the image
* @param editDataProvider pointer to the EditDataProvider that communicates with the EditSubscriber
* @return a pointer to the Crop object that handles the image data trough its own pipeline */

View File

@ -1151,8 +1151,9 @@ private:
hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, avg,
1);
// No Locallab mask is shown in exported picture
ipf.Lab_Local(2, sp, (float**)shbuffer, labView, labView, reservView, 0, 0, fw, fh, 1, locRETgainCurve, lllocalcurve, loclhCurve, lochhCurve, locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
LHutili, HHutili, cclocalcurve, localskutili, sklocalcurve, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, huerefblu, huere, chromare, lumare, sobelre);
LHutili, HHutili, cclocalcurve, localskutili, sklocalcurve, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, huerefblu, huere, chromare, lumare, sobelre, 0, 0);
// Clear local curves
lllocalcurve.clear();

View File

@ -148,6 +148,9 @@ Locallab::Locallab():
// Color & Light
curvactiv(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_CURV")))),
invers(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_INVERS")))),
enaColorMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))),
// Exposure
enaExpMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))),
// Vibrance
protectSkins(Gtk::manage(new Gtk::CheckButton(M("TP_VIBRANCE_PROTECTSKINS")))),
avoidColorShift(Gtk::manage(new Gtk::CheckButton(M("TP_VIBRANCE_AVOIDCOLORSHIFT")))),
@ -181,6 +184,9 @@ Locallab::Locallab():
lumacontrastMinusButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMACONTRAST_MINUS")))),
lumaneutralButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMANEUTRAL")))),
lumacontrastPlusButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMACONTRAST_PLUS")))),
transLabels(Gtk::manage (new Gtk::Label ("---"))),
transLabels2(Gtk::manage (new Gtk::Label ("---"))),
maskcolFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_SHOW")))),
// Others
defparams(nullptr),
@ -219,7 +225,9 @@ Locallab::Locallab():
sensi->set_tooltip_text(M("TP_LOCALLAB_SENSI_TOOLTIP"));
sensi->setAdjusterListener(this);
structcol->setAdjusterListener(this);
blendmaskcol->setAdjusterListener(this);
qualitycurveMethod->append(M("TP_LOCALLAB_CURVNONE"));
@ -233,17 +241,6 @@ Locallab::Locallab():
qualitycurveMethod->set_tooltip_markup(M("TP_LOCALLAB_CURVEMETHOD_TOOLTIP"));
qualitycurveMethodConn = qualitycurveMethod->signal_changed().connect(sigc::mem_fun(*this, &Locallab::qualitycurveMethodChanged));
showmaskcolMethod->append(M("TP_LOCALLAB_SHOWMNONE"));
showmaskcolMethod->append(M("TP_LOCALLAB_SHOWMODIF"));
showmaskcolMethod->append(M("TP_LOCALLAB_SHOWMODIFMASK"));
showmaskcolMethod->append(M("TP_LOCALLAB_USEMASK"));
showmaskcolMethod->append(M("TP_LOCALLAB_SHOWMASK"));
showmaskcolMethod->append(M("TP_LOCALLAB_SHOWSTRUC"));
showmaskcolMethod->set_active(0);
showmaskcolMethod->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP"));
showmaskcolMethodConn = showmaskcolMethod->signal_changed().connect(sigc::mem_fun(*this, &Locallab::showmaskcolMethodChanged));
llCurveEditorG->setCurveListener(this);
llshape = static_cast<DiagonalCurveEditor*>(llCurveEditorG->addCurve(CT_Diagonal, "L(L)"));
@ -298,10 +295,22 @@ Locallab::Locallab():
HHshape->setBottomBarBgGradient(mHHshape);
llCurveEditorG->curveListComplete();
maskCurveEditorG->setCurveListener(this);
inversConn = invers->signal_toggled().connect(sigc::mem_fun(*this, &Locallab::inversChanged));
transLabels = Gtk::manage (new Gtk::Label ("---"));
showmaskcolMethod->append(M("TP_LOCALLAB_SHOWMNONE"));
showmaskcolMethod->append(M("TP_LOCALLAB_SHOWMODIF"));
showmaskcolMethod->append(M("TP_LOCALLAB_SHOWMODIFMASK"));
showmaskcolMethod->append(M("TP_LOCALLAB_SHOWMASK"));
showmaskcolMethod->append(M("TP_LOCALLAB_SHOWSTRUC"));
showmaskcolMethod->set_active(0);
showmaskcolMethod->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP"));
showmaskcolMethodConn = showmaskcolMethod->signal_changed().connect(sigc::mem_fun(*this, &Locallab::showmaskcolMethodChanged));
enaColorMaskConn = enaColorMask->signal_toggled().connect(sigc::mem_fun(*this, &Locallab::enaColorMaskChanged));
maskCurveEditorG->setCurveListener(this);
CCmaskshape = static_cast<FlatCurveEditor*>(maskCurveEditorG->addCurve(CT_Flat, "C(C)", nullptr, false, false));
CCmaskshape->setIdentityValue(0.);
@ -343,14 +352,13 @@ Locallab::Locallab():
colorBox->pack_start(*qualcurvbox);
colorBox->pack_start(*llCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor
colorBox->pack_start(*invers);
maskcolFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_SHOW")));
maskcolFrame->set_label_align(0.025, 0.5);
ToolParamBlock* const maskcolBox = Gtk::manage(new ToolParamBlock());
maskcolBox->pack_start(*transLabels, Gtk::PACK_SHRINK, 4);
maskcolBox->pack_start(*showmaskcolMethod, Gtk::PACK_SHRINK, 0);
maskcolBox->pack_start(*enaColorMask, Gtk::PACK_SHRINK, 0);
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);
maskcolFrame->add(*maskcolBox);
colorBox->pack_start(*maskcolFrame);
@ -378,8 +386,11 @@ Locallab::Locallab():
sensiex->set_tooltip_text(M("TP_LOCALLAB_SENSI_TOOLTIP"));
sensiex->setAdjusterListener(this);
structexp->setAdjusterListener(this);
blurexpde->setAdjusterListener(this);
blendmaskexp->setAdjusterListener(this);
curveEditorG->setCurveListener(this);
@ -394,12 +405,12 @@ Locallab::Locallab():
shapeexpos->setLeftBarBgGradient(mshapeexpos);
curveEditorG->curveListComplete();
maskexpCurveEditorG->setCurveListener(this);
transLabels2 = Gtk::manage (new Gtk::Label ("---"));
enaExpMaskConn = enaExpMask->signal_toggled().connect(sigc::mem_fun(*this, &Locallab::enaExpMaskChanged));
showmaskexpMethod->append(M("TP_LOCALLAB_SHOWMNONE"));
showmaskexpMethod->append(M("TP_LOCALLAB_SHOWMODIF"));
showmaskexpMethod->append(M("TP_LOCALLAB_SHOWMODIFMASK"));
showmaskexpMethod->append(M("TP_LOCALLAB_USEMASK"));
showmaskexpMethod->append(M("TP_LOCALLAB_SHOWMASK"));
showmaskexpMethod->append(M("TP_LOCALLAB_SHOWSTRUC"));
@ -407,12 +418,13 @@ Locallab::Locallab():
showmaskexpMethod->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP"));
showmaskexpMethodConn = showmaskexpMethod->signal_changed().connect(sigc::mem_fun(*this, &Locallab::showmaskexpMethodChanged));
maskexpCurveEditorG->setCurveListener(this);
CCmaskexpshape = static_cast<FlatCurveEditor*>(maskexpCurveEditorG->addCurve(CT_Flat, "C(C)", nullptr, false, false));
CCmaskexpshape->setIdentityValue(0.);
CCmaskexpshape->setResetCurve(FlatCurveType(defSpot.CCmaskexpcurve.at(0)), defSpot.CCmaskexpcurve);
CCmaskexpshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP"));
CCmaskexpshape->setBottomBarColorProvider(this, 7);
const ColorToningParams default_params;
LLmaskexpshape = static_cast<FlatCurveEditor*>(maskexpCurveEditorG->addCurve(CT_Flat, "L(L)", nullptr, false, false));
LLmaskexpshape->setIdentityValue(0.);
@ -427,20 +439,8 @@ Locallab::Locallab():
HHmaskexpshape->setCurveColorProvider(this, 6);
HHmaskexpshape->setBottomBarColorProvider(this, 6);
maskexpCurveEditorG->curveListComplete();
maskexpFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_SHOW")));
maskexpFrame->set_label_align(0.025, 0.5);
ToolParamBlock* const maskexpBox = Gtk::manage(new ToolParamBlock());
maskexpBox->pack_start(*transLabels2, Gtk::PACK_SHRINK, 4);
maskexpBox->pack_start(*showmaskexpMethod, Gtk::PACK_SHRINK, 0);
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);
maskexpFrame->add(*maskexpBox);
ToolParamBlock* const exposeBox = Gtk::manage(new ToolParamBlock());
exposeBox->pack_start(*expcomp);
exposeBox->pack_start(*hlcompr);
@ -452,6 +452,15 @@ Locallab::Locallab():
exposeBox->pack_start(*structexp);
exposeBox->pack_start(*blurexpde);
exposeBox->pack_start(*curveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor
Gtk::Frame* const maskexpFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_SHOW")));
maskexpFrame->set_label_align(0.025, 0.5);
ToolParamBlock* const maskexpBox = Gtk::manage(new ToolParamBlock());
maskexpBox->pack_start(*transLabels2, Gtk::PACK_SHRINK, 4);
maskexpBox->pack_start(*showmaskexpMethod, Gtk::PACK_SHRINK, 0);
maskexpBox->pack_start(*enaExpMask, Gtk::PACK_SHRINK, 0);
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);
maskexpFrame->add(*maskexpBox);
exposeBox->pack_start(*maskexpFrame);
expexpose->add(*exposeBox);
@ -1501,7 +1510,6 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
pp->locallab.spots.at(pp->locallab.selspot).chroma = chroma->getIntValue();
pp->locallab.spots.at(pp->locallab.selspot).sensi = sensi->getIntValue();
pp->locallab.spots.at(pp->locallab.selspot).structcol = structcol->getIntValue();
pp->locallab.spots.at(pp->locallab.selspot).blendmaskcol = blendmaskcol->getIntValue();
if (qualitycurveMethod->get_active_row_number() == 0) {
pp->locallab.spots.at(pp->locallab.selspot).qualitycurveMethod = "none";
@ -1511,31 +1519,16 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
pp->locallab.spots.at(pp->locallab.selspot).qualitycurveMethod = "enh";
}
if (showmaskcolMethod->get_active_row_number() == 0) {
pp->locallab.spots.at(pp->locallab.selspot).showmaskcolMethod = "none";
} else if (showmaskcolMethod->get_active_row_number() == 1) {
pp->locallab.spots.at(pp->locallab.selspot).showmaskcolMethod = "color";
} else if (showmaskcolMethod->get_active_row_number() == 2) {
pp->locallab.spots.at(pp->locallab.selspot).showmaskcolMethod = "colormask";
} else if (showmaskcolMethod->get_active_row_number() == 3) {
pp->locallab.spots.at(pp->locallab.selspot).showmaskcolMethod = "mask";
} else if (showmaskcolMethod->get_active_row_number() == 4) {
pp->locallab.spots.at(pp->locallab.selspot).showmaskcolMethod = "showmask";
} else if (showmaskcolMethod->get_active_row_number() == 5) {
pp->locallab.spots.at(pp->locallab.selspot).showmaskcolMethod = "showstruc";
}
pp->locallab.spots.at(pp->locallab.selspot).llcurve = llshape->getCurve();
pp->locallab.spots.at(pp->locallab.selspot).cccurve = ccshape->getCurve();
pp->locallab.spots.at(pp->locallab.selspot).LHcurve = LHshape->getCurve();
pp->locallab.spots.at(pp->locallab.selspot).HHcurve = HHshape->getCurve();
pp->locallab.spots.at(pp->locallab.selspot).invers = invers->get_active();
pp->locallab.spots.at(pp->locallab.selspot).enaColorMask = enaColorMask->get_active();
pp->locallab.spots.at(pp->locallab.selspot).CCmaskcurve = CCmaskshape->getCurve();
pp->locallab.spots.at(pp->locallab.selspot).LLmaskcurve = LLmaskshape->getCurve();
pp->locallab.spots.at(pp->locallab.selspot).HHmaskcurve = HHmaskshape->getCurve();
pp->locallab.spots.at(pp->locallab.selspot).invers = invers->get_active();
pp->locallab.spots.at(pp->locallab.selspot).structexp = structexp->getIntValue();
pp->locallab.spots.at(pp->locallab.selspot).blurexpde = blurexpde->getIntValue();
pp->locallab.spots.at(pp->locallab.selspot).blendmaskexp = blendmaskexp->getIntValue();
pp->locallab.spots.at(pp->locallab.selspot).blendmaskcol = blendmaskcol->getIntValue();
// Exposure
pp->locallab.spots.at(pp->locallab.selspot).expexpose = expexpose->getEnabled();
pp->locallab.spots.at(pp->locallab.selspot).expcomp = expcomp->getIntValue();
@ -1545,24 +1538,14 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
pp->locallab.spots.at(pp->locallab.selspot).shcompr = shcompr->getIntValue();
pp->locallab.spots.at(pp->locallab.selspot).warm = warm->getIntValue();
pp->locallab.spots.at(pp->locallab.selspot).sensiex = sensiex->getIntValue();
pp->locallab.spots.at(pp->locallab.selspot).structexp = structexp->getIntValue();
pp->locallab.spots.at(pp->locallab.selspot).blurexpde = blurexpde->getIntValue();
pp->locallab.spots.at(pp->locallab.selspot).excurve = shapeexpos->getCurve();
if (showmaskexpMethod->get_active_row_number() == 0) {
pp->locallab.spots.at(pp->locallab.selspot).showmaskexpMethod = "none";
} else if (showmaskexpMethod->get_active_row_number() == 1) {
pp->locallab.spots.at(pp->locallab.selspot).showmaskexpMethod = "expo";
} else if (showmaskexpMethod->get_active_row_number() == 2) {
pp->locallab.spots.at(pp->locallab.selspot).showmaskexpMethod = "expomask";
} else if (showmaskexpMethod->get_active_row_number() == 3) {
pp->locallab.spots.at(pp->locallab.selspot).showmaskexpMethod = "mask";
} else if (showmaskexpMethod->get_active_row_number() == 4) {
pp->locallab.spots.at(pp->locallab.selspot).showmaskexpMethod = "showmask";
} else if (showmaskexpMethod->get_active_row_number() == 5) {
pp->locallab.spots.at(pp->locallab.selspot).showmaskexpMethod = "showstruc";
}
pp->locallab.spots.at(pp->locallab.selspot).enaExpMask = enaExpMask->get_active();
pp->locallab.spots.at(pp->locallab.selspot).LLmaskexpcurve = LLmaskexpshape->getCurve();
pp->locallab.spots.at(pp->locallab.selspot).CCmaskexpcurve = CCmaskexpshape->getCurve();
pp->locallab.spots.at(pp->locallab.selspot).HHmaskexpcurve = HHmaskexpshape->getCurve();
pp->locallab.spots.at(pp->locallab.selspot).blendmaskexp = blendmaskexp->getIntValue();
// Vibrance
pp->locallab.spots.at(pp->locallab.selspot).expvibrance = expvibrance->getEnabled();
pp->locallab.spots.at(pp->locallab.selspot).saturated = saturated->getIntValue();
@ -1694,17 +1677,17 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
pe->locallab.spots.at(pp->locallab.selspot).chroma = pe->locallab.spots.at(pp->locallab.selspot).chroma || chroma->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).sensi = pe->locallab.spots.at(pp->locallab.selspot).sensi || sensi->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).structcol = pe->locallab.spots.at(pp->locallab.selspot).structcol || structcol->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).blendmaskcol = pe->locallab.spots.at(pp->locallab.selspot).blendmaskcol || blendmaskcol->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).qualitycurveMethod = pe->locallab.spots.at(pp->locallab.selspot).qualitycurveMethod || qualitycurveMethod->get_active_text() != M("GENERAL_UNCHANGED");
pe->locallab.spots.at(pp->locallab.selspot).showmaskcolMethod = pe->locallab.spots.at(pp->locallab.selspot).showmaskcolMethod || showmaskcolMethod->get_active_text() != M("GENERAL_UNCHANGED");
pe->locallab.spots.at(pp->locallab.selspot).llcurve = pe->locallab.spots.at(pp->locallab.selspot).llcurve || !llshape->isUnChanged();
pe->locallab.spots.at(pp->locallab.selspot).cccurve = pe->locallab.spots.at(pp->locallab.selspot).cccurve || !ccshape->isUnChanged();
pe->locallab.spots.at(pp->locallab.selspot).LHcurve = pe->locallab.spots.at(pp->locallab.selspot).LHcurve || !LHshape->isUnChanged();
pe->locallab.spots.at(pp->locallab.selspot).HHcurve = pe->locallab.spots.at(pp->locallab.selspot).HHcurve || !HHshape->isUnChanged();
pe->locallab.spots.at(pp->locallab.selspot).invers = pe->locallab.spots.at(pp->locallab.selspot).invers || !invers->get_inconsistent();
pe->locallab.spots.at(pp->locallab.selspot).enaColorMask = pe->locallab.spots.at(pp->locallab.selspot).enaColorMask || !enaColorMask->get_inconsistent();
pe->locallab.spots.at(pp->locallab.selspot).CCmaskcurve = pe->locallab.spots.at(pp->locallab.selspot).CCmaskcurve || !CCmaskshape->isUnChanged();
pe->locallab.spots.at(pp->locallab.selspot).LLmaskcurve = pe->locallab.spots.at(pp->locallab.selspot).LLmaskcurve || !LLmaskshape->isUnChanged();
pe->locallab.spots.at(pp->locallab.selspot).HHmaskcurve = pe->locallab.spots.at(pp->locallab.selspot).HHmaskcurve || !HHmaskshape->isUnChanged();
pe->locallab.spots.at(pp->locallab.selspot).invers = pe->locallab.spots.at(pp->locallab.selspot).invers || !invers->get_inconsistent();
pe->locallab.spots.at(pp->locallab.selspot).blendmaskcol = pe->locallab.spots.at(pp->locallab.selspot).blendmaskcol || blendmaskcol->getEditedState();
// 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).expcomp = pe->locallab.spots.at(pp->locallab.selspot).expcomp || expcomp->getEditedState();
@ -1717,7 +1700,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
pe->locallab.spots.at(pp->locallab.selspot).structexp = pe->locallab.spots.at(pp->locallab.selspot).structexp || structexp->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).blurexpde = pe->locallab.spots.at(pp->locallab.selspot).blurexpde || blurexpde->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).excurve = pe->locallab.spots.at(pp->locallab.selspot).excurve || !shapeexpos->isUnChanged();
pe->locallab.spots.at(pp->locallab.selspot).showmaskexpMethod = pe->locallab.spots.at(pp->locallab.selspot).showmaskexpMethod || showmaskexpMethod->get_active_text() != M("GENERAL_UNCHANGED");
pe->locallab.spots.at(pp->locallab.selspot).enaExpMask = pe->locallab.spots.at(pp->locallab.selspot).enaExpMask || !enaExpMask->get_inconsistent();
pe->locallab.spots.at(pp->locallab.selspot).CCmaskexpcurve = pe->locallab.spots.at(pp->locallab.selspot).CCmaskexpcurve || !CCmaskexpshape->isUnChanged();
pe->locallab.spots.at(pp->locallab.selspot).LLmaskexpcurve = pe->locallab.spots.at(pp->locallab.selspot).LLmaskexpcurve || !LLmaskexpshape->isUnChanged();
pe->locallab.spots.at(pp->locallab.selspot).HHmaskexpcurve = pe->locallab.spots.at(pp->locallab.selspot).HHmaskexpcurve || !HHmaskexpshape->isUnChanged();
@ -1840,17 +1823,17 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
pedited->locallab.spots.at(pp->locallab.selspot).chroma = pedited->locallab.spots.at(pp->locallab.selspot).chroma || chroma->getEditedState();
pedited->locallab.spots.at(pp->locallab.selspot).sensi = pedited->locallab.spots.at(pp->locallab.selspot).sensi || sensi->getEditedState();
pedited->locallab.spots.at(pp->locallab.selspot).structcol = pedited->locallab.spots.at(pp->locallab.selspot).structcol || structcol->getEditedState();
pedited->locallab.spots.at(pp->locallab.selspot).blendmaskcol = pedited->locallab.spots.at(pp->locallab.selspot).blendmaskcol || blendmaskcol->getEditedState();
pedited->locallab.spots.at(pp->locallab.selspot).qualitycurveMethod = pedited->locallab.spots.at(pp->locallab.selspot).qualitycurveMethod || qualitycurveMethod->get_active_text() != M("GENERAL_UNCHANGED");
pedited->locallab.spots.at(pp->locallab.selspot).showmaskcolMethod = pedited->locallab.spots.at(pp->locallab.selspot).showmaskcolMethod || showmaskcolMethod->get_active_text() != M("GENERAL_UNCHANGED");
pedited->locallab.spots.at(pp->locallab.selspot).llcurve = pedited->locallab.spots.at(pp->locallab.selspot).llcurve || !llshape->isUnChanged();
pedited->locallab.spots.at(pp->locallab.selspot).cccurve = pedited->locallab.spots.at(pp->locallab.selspot).cccurve || !ccshape->isUnChanged();
pedited->locallab.spots.at(pp->locallab.selspot).LHcurve = pedited->locallab.spots.at(pp->locallab.selspot).LHcurve || !LHshape->isUnChanged();
pedited->locallab.spots.at(pp->locallab.selspot).HHcurve = pedited->locallab.spots.at(pp->locallab.selspot).HHcurve || !HHshape->isUnChanged();
pedited->locallab.spots.at(pp->locallab.selspot).invers = pedited->locallab.spots.at(pp->locallab.selspot).invers || !invers->get_inconsistent();
pedited->locallab.spots.at(pp->locallab.selspot).enaColorMask = pedited->locallab.spots.at(pp->locallab.selspot).enaColorMask || !enaColorMask->get_inconsistent();
pedited->locallab.spots.at(pp->locallab.selspot).CCmaskcurve = pedited->locallab.spots.at(pp->locallab.selspot).CCmaskcurve || !CCmaskshape->isUnChanged();
pedited->locallab.spots.at(pp->locallab.selspot).LLmaskcurve = pedited->locallab.spots.at(pp->locallab.selspot).LLmaskcurve || !LLmaskshape->isUnChanged();
pedited->locallab.spots.at(pp->locallab.selspot).HHmaskcurve = pedited->locallab.spots.at(pp->locallab.selspot).HHmaskcurve || !HHmaskshape->isUnChanged();
pedited->locallab.spots.at(pp->locallab.selspot).invers = pedited->locallab.spots.at(pp->locallab.selspot).invers || !invers->get_inconsistent();
pedited->locallab.spots.at(pp->locallab.selspot).blendmaskcol = pedited->locallab.spots.at(pp->locallab.selspot).blendmaskcol || blendmaskcol->getEditedState();
// 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).expcomp = pedited->locallab.spots.at(pp->locallab.selspot).expcomp || expcomp->getEditedState();
@ -1863,7 +1846,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
pedited->locallab.spots.at(pp->locallab.selspot).structexp = pedited->locallab.spots.at(pp->locallab.selspot).structexp || structexp->getEditedState();
pedited->locallab.spots.at(pp->locallab.selspot).blurexpde = pedited->locallab.spots.at(pp->locallab.selspot).blurexpde || blurexpde->getEditedState();
pedited->locallab.spots.at(pp->locallab.selspot).excurve = pedited->locallab.spots.at(pp->locallab.selspot).excurve || !shapeexpos->isUnChanged();
pedited->locallab.spots.at(pp->locallab.selspot).showmaskexpMethod = pedited->locallab.spots.at(pp->locallab.selspot).showmaskexpMethod || showmaskexpMethod->get_active_text() != M("GENERAL_UNCHANGED");
pedited->locallab.spots.at(pp->locallab.selspot).enaExpMask = pedited->locallab.spots.at(pp->locallab.selspot).enaExpMask || !enaExpMask->get_inconsistent();
pedited->locallab.spots.at(pp->locallab.selspot).CCmaskexpcurve = pedited->locallab.spots.at(pp->locallab.selspot).CCmaskexpcurve || !CCmaskexpshape->isUnChanged();
pedited->locallab.spots.at(pp->locallab.selspot).LLmaskexpcurve = pedited->locallab.spots.at(pp->locallab.selspot).LLmaskexpcurve || !LLmaskexpshape->isUnChanged();
pedited->locallab.spots.at(pp->locallab.selspot).HHmaskexpcurve = pedited->locallab.spots.at(pp->locallab.selspot).HHmaskexpcurve || !HHmaskexpshape->isUnChanged();
@ -2181,8 +2164,6 @@ void Locallab::blurMethodChanged()
}
}
void Locallab::qualitycurveMethodChanged()
{
// printf("qualitycurveMethodChanged\n");
@ -2196,42 +2177,95 @@ void Locallab::qualitycurveMethodChanged()
void Locallab::showmaskcolMethodChanged()
{
if((showmaskcolMethod->get_active_row_number() == 1 || showmaskcolMethod->get_active_row_number() == 2 || showmaskcolMethod->get_active_row_number() == 4 || showmaskcolMethod->get_active_row_number() == 5) && expcolor->getEnabled()) {
showmaskexpMethod->set_active(0);
expexpose->setEnabled(false);
}
// printf("showmaskcolMethodChanged\n");
if((showmaskcolMethod->get_active_row_number() == 2 || showmaskcolMethod->get_active_row_number() == 3) && expcolor->getEnabled()) {
blendmaskcol->show();
} else {
blendmaskcol->hide();
}
// When one mask state is changed, other masks are deactivated
disableListener();
showmaskexpMethod->set_active(0);
enableListener();
if (getEnabled() && expcolor->getEnabled()) {
if (listener) {
listener->panelChanged(EvlocallabshowmaskcolMethod , showmaskcolMethod->get_active_text());
}
if (listener) {
listener->panelChanged(EvlocallabshowmaskcolMethod, "");
}
}
void Locallab::showmaskexpMethodChanged()
{
// printf("showmaskexpMethodChanged\n");
if((showmaskexpMethod->get_active_row_number() == 1 || showmaskexpMethod->get_active_row_number() == 2 || showmaskexpMethod->get_active_row_number() == 4 || showmaskexpMethod->get_active_row_number() == 5) && expexpose->getEnabled()) {
// When one mask state is changed, other masks are deactivated
disableListener();
showmaskcolMethod->set_active(0);
enableListener();
showmaskcolMethod->set_active(0);
expcolor->setEnabled(false);
if (listener) {
listener->panelChanged(EvlocallabshowmaskexpMethod, "");
}
}
void Locallab::resetMaskVisibility()
{
// printf("resetMaskVisibility\n");
disableListener();
showmaskcolMethod->set_active(0);
showmaskexpMethod->set_active(0);
enableListener();
}
Locallab::llMaskVisibility* Locallab::getMaskVisibility()
{
llMaskVisibility* maskStruct = new llMaskVisibility();
maskStruct->colorMask = showmaskcolMethod->get_active_row_number();
maskStruct->expMask = showmaskexpMethod->get_active_row_number();
return maskStruct;
}
void Locallab::enaColorMaskChanged()
{
// printf("enaColorMaskChanged\n");
if (multiImage) {
if (enaColorMask->get_inconsistent()) {
enaColorMask->set_inconsistent(false);
enaColorMaskConn.block(true);
enaColorMask->set_active(false);
enaColorMaskConn.block(false);
}
}
if((showmaskexpMethod->get_active_row_number() == 2 || showmaskexpMethod->get_active_row_number() == 3) && expexpose->getEnabled()) {
blendmaskexp->show();
} else {
blendmaskexp->hide();
if (getEnabled() && expcolor->getEnabled()) {
if (listener) {
if (enaColorMask->get_active()) {
listener->panelChanged(EvLocallabEnaColorMask, M("GENERAL_ENABLED"));
} else {
listener->panelChanged(EvLocallabEnaColorMask, M("GENERAL_DISABLED"));
}
}
}
}
void Locallab::enaExpMaskChanged()
{
// printf("enaExpMaskChanged\n");
if (multiImage) {
if (enaExpMask->get_inconsistent()) {
enaExpMask->set_inconsistent(false);
enaExpMaskConn.block(true);
enaExpMask->set_active(false);
enaExpMaskConn.block(false);
}
}
if (getEnabled() && expexpose->getEnabled()) {
if (listener) {
listener->panelChanged(EvlocallabshowmaskexpMethod , showmaskexpMethod->get_active_text());
if (enaExpMask->get_active()) {
listener->panelChanged(EvLocallabEnaExpMask, M("GENERAL_ENABLED"));
} else {
listener->panelChanged(EvLocallabEnaExpMask, M("GENERAL_DISABLED"));
}
}
}
}
@ -2257,6 +2291,7 @@ void Locallab::inversChanged()
qualitycurveMethod->show();
labqualcurv->show();
maskcolFrame->show();
showmaskcolMethod->hide(); // Being able to change Color & Light mask visibility is useless in batch mode
} else if (invers->get_active()) {
sensi->show();
llCurveEditorG->hide();
@ -2271,6 +2306,9 @@ void Locallab::inversChanged()
qualitycurveMethod->show();
labqualcurv->show();
maskcolFrame->show();
if (batchMode) {
showmaskcolMethod->hide(); // Being able to change Color & Light mask visibility is useless in batch mode
}
}
if (getEnabled() && expcolor->getEnabled()) {
@ -3323,13 +3361,14 @@ void Locallab::setBatchMode(bool batchMode)
// Set batch mode for comboBoxText
// Color & Light
qualitycurveMethod->append(M("GENERAL_UNCHANGED"));
showmaskcolMethod->append(M("GENERAL_UNCHANGED"));
//Exposure
showmaskexpMethod->append(M("GENERAL_UNCHANGED"));
// Blur & Noise
blurMethod->append(M("GENERAL_UNCHANGED"));
// Retinex
retinexMethod->append(M("GENERAL_UNCHANGED"));
// In batch mode, being able to change mask visibility is useless
showmaskcolMethod->hide();
showmaskexpMethod->hide();
}
std::vector<double> Locallab::getCurvePoints(ThresholdSelector* tAdjuster) const
@ -3466,9 +3505,11 @@ void Locallab::enableListener()
qualitycurveMethodConn.block(false);
inversConn.block(false);
showmaskcolMethodConn.block(false);
enaColorMaskConn.block(false);
// Exposure
enableexposeConn.block(false);
showmaskexpMethodConn.block(false);
enaExpMaskConn.block(false);
// Vibrance
enablevibranceConn.block(false);
pskinsconn.block(false);
@ -3509,11 +3550,13 @@ void Locallab::disableListener()
enablecolorConn.block(true);
curvactivConn.block(true);
qualitycurveMethodConn.block(true);
showmaskcolMethodConn.block(true);
inversConn.block(true);
showmaskcolMethodConn.block(true);
enaColorMaskConn.block(true);
// Exposure
enableexposeConn.block(true);
showmaskexpMethodConn.block(true);
enaExpMaskConn.block(true);
// Vibrance
enablevibranceConn.block(true);
pskinsconn.block(true);
@ -3559,7 +3602,6 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
chroma->setValue(pp->locallab.spots.at(index).chroma);
sensi->setValue(pp->locallab.spots.at(index).sensi);
structcol->setValue(pp->locallab.spots.at(index).structcol);
blendmaskcol->setValue(pp->locallab.spots.at(index).blendmaskcol);
if (pp->locallab.spots.at(index).qualitycurveMethod == "none") {
qualitycurveMethod->set_active(0);
@ -3575,27 +3617,16 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
qualitycurveMethod->set_active(5);
}
if (pp->locallab.spots.at(index).showmaskcolMethod == "none") {
showmaskcolMethod->set_active(0);
} else if (pp->locallab.spots.at(index).showmaskcolMethod == "color") {
showmaskcolMethod->set_active(1);
} else if (pp->locallab.spots.at(index).showmaskcolMethod == "colormask") {
showmaskcolMethod->set_active(2);
} else if (pp->locallab.spots.at(index).showmaskcolMethod == "mask") {
showmaskcolMethod->set_active(3);
} else if (pp->locallab.spots.at(index).showmaskcolMethod == "showmask") {
showmaskcolMethod->set_active(4);
} else if (pp->locallab.spots.at(index).showmaskcolMethod == "showstruc") {
showmaskcolMethod->set_active(5);
}
llshape->setCurve(pp->locallab.spots.at(index).llcurve);
ccshape->setCurve(pp->locallab.spots.at(index).cccurve);
LHshape->setCurve(pp->locallab.spots.at(index).LHcurve);
HHshape->setCurve(pp->locallab.spots.at(index).HHcurve);
invers->set_active(pp->locallab.spots.at(index).invers);
enaColorMask->set_active(pp->locallab.spots.at(index).enaColorMask);
CCmaskshape->setCurve(pp->locallab.spots.at(index).CCmaskcurve);
LLmaskshape->setCurve(pp->locallab.spots.at(index).LLmaskcurve);
HHmaskshape->setCurve(pp->locallab.spots.at(index).HHmaskcurve);
invers->set_active(pp->locallab.spots.at(index).invers);
blendmaskcol->setValue(pp->locallab.spots.at(index).blendmaskcol);
// Exposure
expexpose->setEnabled(pp->locallab.spots.at(index).expexpose);
@ -3609,19 +3640,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
structexp->setValue(pp->locallab.spots.at(index).structexp);
blurexpde->setValue(pp->locallab.spots.at(index).blurexpde);
shapeexpos->setCurve(pp->locallab.spots.at(index).excurve);
if (pp->locallab.spots.at(index).showmaskexpMethod == "none") {
showmaskexpMethod->set_active(0);
} else if (pp->locallab.spots.at(index).showmaskexpMethod == "expo") {
showmaskexpMethod->set_active(1);
} else if (pp->locallab.spots.at(index).showmaskexpMethod == "expormask") {
showmaskexpMethod->set_active(2);
} else if (pp->locallab.spots.at(index).showmaskexpMethod == "mask") {
showmaskexpMethod->set_active(3);
} else if (pp->locallab.spots.at(index).showmaskexpMethod == "showmask") {
showmaskexpMethod->set_active(4);
} else if (pp->locallab.spots.at(index).showmaskexpMethod == "showstruc") {
showmaskexpMethod->set_active(5);
}
enaExpMask->set_active(pp->locallab.spots.at(index).enaExpMask);
CCmaskexpshape->setCurve(pp->locallab.spots.at(index).CCmaskexpcurve);
LLmaskexpshape->setCurve(pp->locallab.spots.at(index).LLmaskexpcurve);
HHmaskexpshape->setCurve(pp->locallab.spots.at(index).HHmaskexpcurve);
@ -3779,23 +3798,21 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
chroma->setEditedState(spotState->chroma ? Edited : UnEdited);
sensi->setEditedState(spotState->sensi ? Edited : UnEdited);
structcol->setEditedState(spotState->structcol ? Edited : UnEdited);
blendmaskcol->setEditedState(spotState->blendmaskcol ? Edited : UnEdited);
if (!spotState->qualitycurveMethod) {
qualitycurveMethod->set_active_text(M("GENERAL_UNCHANGED"));
}
if (!spotState->showmaskcolMethod) {
showmaskcolMethod->set_active_text(M("GENERAL_UNCHANGED"));
}
llshape->setUnChanged(!spotState->llcurve);
ccshape->setUnChanged(!spotState->cccurve);
LHshape->setUnChanged(!spotState->LHcurve);
HHshape->setUnChanged(!spotState->HHcurve);
invers->set_inconsistent(multiImage && !spotState->invers);
enaColorMask->set_inconsistent(multiImage && !spotState->enaColorMask);
CCmaskshape->setUnChanged(!spotState->CCmaskcurve);
LLmaskshape->setUnChanged(!spotState->LLmaskcurve);
HHmaskshape->setUnChanged(!spotState->HHmaskcurve);
invers->set_inconsistent(multiImage && !spotState->invers);
blendmaskcol->setEditedState(spotState->blendmaskcol ? Edited : UnEdited);
// Exposure
expexpose->set_inconsistent(!spotState->expexpose);
@ -3809,9 +3826,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
structexp->setEditedState(spotState->structexp ? Edited : UnEdited);
blurexpde->setEditedState(spotState->blurexpde ? Edited : UnEdited);
shapeexpos->setUnChanged(!spotState->excurve);
if (!spotState->showmaskexpMethod) {
showmaskexpMethod->set_active_text(M("GENERAL_UNCHANGED"));
}
enaExpMask->set_inconsistent(multiImage && !spotState->enaExpMask);
CCmaskexpshape->setUnChanged(!spotState->CCmaskexpcurve);
LLmaskexpshape->setUnChanged(!spotState->LLmaskexpcurve);
HHmaskexpshape->setUnChanged(!spotState->HHmaskexpcurve);
@ -3925,7 +3940,6 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
void Locallab::updateSpecificGUIState()
{
// Update Color & Light GUI according to invers button state (to be compliant with inversChanged function)
if (multiImage && invers->get_inconsistent()) {
sensi->show();
llCurveEditorG->show();
@ -3933,13 +3947,14 @@ void Locallab::updateSpecificGUIState()
qualitycurveMethod->show();
labqualcurv->show();
maskcolFrame->show();
showmaskcolMethod->hide(); // Being able to change Color & Light mask visibility is useless in batch mode
} else if (invers->get_active()) {
sensi->show();
llCurveEditorG->hide();
curvactiv->hide();
qualitycurveMethod->hide();
maskcolFrame->hide();
labqualcurv->hide();
maskcolFrame->hide();
} else {
sensi->show();
llCurveEditorG->show();
@ -3947,6 +3962,9 @@ void Locallab::updateSpecificGUIState()
qualitycurveMethod->show();
labqualcurv->show();
maskcolFrame->show();
if (batchMode) {
showmaskcolMethod->hide(); // Being able to change Color & Light mask visibility is useless in batch mode
}
}
// Update Exposure GUI according to black adjuster state (to be compliant with adjusterChanged function)
@ -3986,34 +4004,6 @@ void Locallab::updateSpecificGUIState()
strength->show();
}
//update showmethod
if (multiImage && showmaskcolMethod->get_active_text() == M("GENERAL_UNCHANGED")) {
showmaskexpMethod->set_active(0);
} else if((showmaskcolMethod->get_active_row_number() == 1 || showmaskcolMethod->get_active_row_number() == 2 || showmaskcolMethod->get_active_row_number() == 4 || showmaskcolMethod->get_active_row_number() == 5)) {
if((showmaskcolMethod->get_active_row_number() == 2 || showmaskcolMethod->get_active_row_number() == 3)) {
blendmaskcol->show();
} else {
blendmaskcol->hide();
}
showmaskexpMethod->set_active(0);
expexpose->setEnabled(false);
}
if (multiImage && showmaskexpMethod->get_active_text() == M("GENERAL_UNCHANGED")) {
showmaskcolMethod->set_active(0);
} else if((showmaskexpMethod->get_active_row_number() == 1 || showmaskexpMethod->get_active_row_number() == 2 || showmaskexpMethod->get_active_row_number() == 4 || showmaskexpMethod->get_active_row_number() == 5)) {
if((showmaskexpMethod->get_active_row_number() == 2 || showmaskexpMethod->get_active_row_number() == 3)) {
blendmaskexp->show();
} else {
blendmaskexp->hide();
}
showmaskcolMethod->set_active(0);
expcolor->setEnabled(false);
}
// Update Retinex GUI according to inversret button state (to be compliant with inversretChanged function)
if (multiImage && inversret->get_inconsistent()) {
sensih->show();

View File

@ -72,7 +72,6 @@ private:
FlatCurveEditor* CCmaskshape;
FlatCurveEditor* LLmaskshape;
FlatCurveEditor* HHmaskshape;
// Exposure
CurveEditorGroup* const curveEditorG;
CurveEditorGroup* const maskexpCurveEditorG;
@ -95,7 +94,6 @@ private:
Adjuster* const sensi;
Adjuster* const structcol;
Adjuster* const blendmaskcol;
// Exposure
Adjuster* const expcomp;
Adjuster* const hlcompr;
@ -167,7 +165,11 @@ private:
// Color & Light
Gtk::CheckButton* const curvactiv;
Gtk::CheckButton* const invers;
sigc::connection curvactivConn, inversConn;
Gtk::CheckButton* const enaColorMask;
sigc::connection curvactivConn, inversConn, enaColorMaskConn;
// Exposure
Gtk::CheckButton* const enaExpMask;
sigc::connection enaExpMaskConn;
// Vibrance
Gtk::CheckButton* const protectSkins;
Gtk::CheckButton* const avoidColorShift;
@ -195,7 +197,6 @@ private:
//Exposure
MyComboBoxText* const showmaskexpMethod;
sigc::connection showmaskexpMethodConn;
// Blur & Noise
MyComboBoxText* const blurMethod;
sigc::connection blurMethodConn;
@ -215,10 +216,7 @@ private:
sigc::connection lumacontrastMinusPressedConn, lumaneutralPressedConn, lumacontrastPlusPressedConn;
Gtk::Label* transLabels;
Gtk::Label* transLabels2;
//Frame
Gtk::Frame* maskcolFrame;
Gtk::Frame* maskexpFrame;
// Others
/**
@ -245,10 +243,9 @@ private:
// Color & Light
void curvactivChanged();
void inversChanged();
void showmaskcolMethodChanged();
//Exposure
void showmaskexpMethodChanged();
void enaColorMaskChanged();
// Exposure
void enaExpMaskChanged();
// Vibrance
void protectskins_toggled();
void avoidcolorshift_toggled();
@ -265,6 +262,9 @@ private:
// ComboBox event functions
// Color & Light
void qualitycurveMethodChanged();
void showmaskcolMethodChanged();
//Exposure
void showmaskexpMethodChanged();
// Blur & Noise
void blurMethodChanged();
// Retinex
@ -337,9 +337,18 @@ public:
void disableListener();
void writeOptions(std::vector<int> &tpOpen);
void updateToolState(std::vector<int> &tpOpen);
void refChanged (double huer, double lumar, double chromar);
bool refComputed_ ();
void updateLabel ();
void refChanged(double huer, double lumar, double chromar);
bool refComputed_();
void updateLabel();
// Mask visibility management functions
struct llMaskVisibility {
int colorMask;
int expMask;
};
void resetMaskVisibility();
llMaskVisibility* getMaskVisibility();
// EditProvider management function
void setEditProvider(EditDataProvider* provider);

View File

@ -951,15 +951,15 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
locallab.spots.at(j).structcol = locallab.spots.at(j).structcol && pSpot.structcol == otherSpot.structcol;
locallab.spots.at(j).blendmaskcol = locallab.spots.at(j).blendmaskcol && pSpot.blendmaskcol == otherSpot.blendmaskcol;
locallab.spots.at(j).qualitycurveMethod = locallab.spots.at(j).qualitycurveMethod && pSpot.qualitycurveMethod == otherSpot.qualitycurveMethod;
locallab.spots.at(j).showmaskcolMethod = locallab.spots.at(j).showmaskcolMethod && pSpot.showmaskcolMethod == otherSpot.showmaskcolMethod;
locallab.spots.at(j).llcurve = locallab.spots.at(j).llcurve && pSpot.llcurve == otherSpot.llcurve;
locallab.spots.at(j).cccurve = locallab.spots.at(j).cccurve && pSpot.cccurve == otherSpot.cccurve;
locallab.spots.at(j).LHcurve = locallab.spots.at(j).LHcurve && pSpot.LHcurve == otherSpot.LHcurve;
locallab.spots.at(j).HHcurve = locallab.spots.at(j).HHcurve && pSpot.HHcurve == otherSpot.HHcurve;
locallab.spots.at(j).invers = locallab.spots.at(j).invers && pSpot.invers == otherSpot.invers;
locallab.spots.at(j).enaColorMask = locallab.spots.at(j).enaColorMask && pSpot.enaColorMask == otherSpot.enaColorMask;
locallab.spots.at(j).CCmaskcurve = locallab.spots.at(j).CCmaskcurve && pSpot.CCmaskcurve == otherSpot.CCmaskcurve;
locallab.spots.at(j).LLmaskcurve = locallab.spots.at(j).LLmaskcurve && pSpot.LLmaskcurve == otherSpot.LLmaskcurve;
locallab.spots.at(j).HHmaskcurve = locallab.spots.at(j).HHmaskcurve && pSpot.HHmaskcurve == otherSpot.HHmaskcurve;
locallab.spots.at(j).invers = locallab.spots.at(j).invers && pSpot.invers == otherSpot.invers;
// Exposure
locallab.spots.at(j).expexpose = locallab.spots.at(j).expexpose && pSpot.expexpose == otherSpot.expexpose;
locallab.spots.at(j).expcomp = locallab.spots.at(j).expcomp && pSpot.expcomp == otherSpot.expcomp;
@ -972,7 +972,7 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
locallab.spots.at(j).structexp = locallab.spots.at(j).structexp && pSpot.structexp == otherSpot.structexp;
locallab.spots.at(j).blurexpde = locallab.spots.at(j).blurexpde && pSpot.blurexpde == otherSpot.blurexpde;
locallab.spots.at(j).excurve = locallab.spots.at(j).excurve && pSpot.excurve == otherSpot.excurve;
locallab.spots.at(j).showmaskexpMethod = locallab.spots.at(j).showmaskexpMethod && pSpot.showmaskexpMethod == otherSpot.showmaskexpMethod;
locallab.spots.at(j).enaExpMask = locallab.spots.at(j).enaExpMask && pSpot.enaExpMask == otherSpot.enaExpMask;
locallab.spots.at(j).CCmaskexpcurve = locallab.spots.at(j).CCmaskexpcurve && pSpot.CCmaskexpcurve == otherSpot.CCmaskexpcurve;
locallab.spots.at(j).LLmaskexpcurve = locallab.spots.at(j).LLmaskexpcurve && pSpot.LLmaskexpcurve == otherSpot.LLmaskexpcurve;
locallab.spots.at(j).HHmaskexpcurve = locallab.spots.at(j).HHmaskexpcurve && pSpot.HHmaskexpcurve == otherSpot.HHmaskexpcurve;
@ -2593,10 +2593,6 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).qualitycurveMethod = mods.locallab.spots.at(i).qualitycurveMethod;
}
if (locallab.spots.at(i).showmaskcolMethod) {
toEdit.locallab.spots.at(i).showmaskcolMethod = mods.locallab.spots.at(i).showmaskcolMethod;
}
if (locallab.spots.at(i).llcurve) {
toEdit.locallab.spots.at(i).llcurve = mods.locallab.spots.at(i).llcurve;
}
@ -2613,6 +2609,14 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).HHcurve = mods.locallab.spots.at(i).HHcurve;
}
if (locallab.spots.at(i).invers) {
toEdit.locallab.spots.at(i).invers = mods.locallab.spots.at(i).invers;
}
if (locallab.spots.at(i).enaColorMask) {
toEdit.locallab.spots.at(i).enaColorMask = mods.locallab.spots.at(i).enaColorMask;
}
if (locallab.spots.at(i).CCmaskcurve) {
toEdit.locallab.spots.at(i).CCmaskcurve = mods.locallab.spots.at(i).CCmaskcurve;
}
@ -2625,10 +2629,6 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).HHmaskcurve = mods.locallab.spots.at(i).HHmaskcurve;
}
if (locallab.spots.at(i).invers) {
toEdit.locallab.spots.at(i).invers = mods.locallab.spots.at(i).invers;
}
// Exposure
if (locallab.spots.at(i).expexpose) {
toEdit.locallab.spots.at(i).expexpose = mods.locallab.spots.at(i).expexpose;
@ -2674,8 +2674,8 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).excurve = mods.locallab.spots.at(i).excurve;
}
if (locallab.spots.at(i).showmaskexpMethod) {
toEdit.locallab.spots.at(i).showmaskexpMethod = mods.locallab.spots.at(i).showmaskexpMethod;
if (locallab.spots.at(i).enaExpMask) {
toEdit.locallab.spots.at(i).enaExpMask = mods.locallab.spots.at(i).enaExpMask;
}
if (locallab.spots.at(i).CCmaskexpcurve) {
@ -3948,15 +3948,15 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
structcol(v),
blendmaskcol(v),
qualitycurveMethod(v),
showmaskcolMethod(v),
llcurve(v),
cccurve(v),
LHcurve(v),
HHcurve(v),
invers(v),
enaColorMask(v),
CCmaskcurve(v),
LLmaskcurve(v),
HHmaskcurve(v),
invers(v),
// Exposure
expexpose(v),
expcomp(v),
@ -3969,7 +3969,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
structexp(v),
blurexpde(v),
excurve(v),
showmaskexpMethod(v),
enaExpMask(v),
CCmaskexpcurve(v),
LLmaskexpcurve(v),
HHmaskexpcurve(v),
@ -4086,15 +4086,15 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
structcol = v;
blendmaskcol = v;
qualitycurveMethod = v;
showmaskcolMethod = v;
llcurve = v;
cccurve = v;
LHcurve = v;
HHcurve = v;
invers = v;
enaColorMask = v;
CCmaskcurve = v;
LLmaskcurve = v;
HHmaskcurve = v;
invers = v;
// Exposure
expexpose = v;
expcomp = v;
@ -4107,7 +4107,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
structexp = v;
blurexpde = v;
excurve = v;
showmaskexpMethod = v;
enaExpMask = v;
CCmaskexpcurve = v;
LLmaskexpcurve = v;
HHmaskexpcurve = v;

View File

@ -490,15 +490,15 @@ public:
bool structcol;
bool blendmaskcol;
bool qualitycurveMethod;
bool showmaskcolMethod;
bool llcurve;
bool cccurve;
bool LHcurve;
bool HHcurve;
bool invers;
bool enaColorMask;
bool CCmaskcurve;
bool LLmaskcurve;
bool HHmaskcurve;
bool invers;
// Exposure
bool expexpose;
bool expcomp;
@ -511,7 +511,7 @@ public:
bool structexp;
bool blurexpde;
bool excurve;
bool showmaskexpMethod;
bool enaExpMask;
bool CCmaskexpcurve;
bool LLmaskexpcurve;
bool HHmaskexpcurve;

View File

@ -28,7 +28,7 @@
using namespace rtengine::procparams;
ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), favoritePanelSW(nullptr), hasChanged (false), editDataProvider (nullptr)
ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), favoritePanelSW(nullptr), hasChanged (false), editDataProvider (nullptr), photoLoadedOnce(false)
{
favoritePanel = Gtk::manage (new ToolVBox ());
@ -457,6 +457,12 @@ void ToolPanelCoordinator::panelChanged(const rtengine::ProcEvent& event, const
resize->write(params);
}
// Manage Locallab mask visibility
if (event == rtengine::EvlocallabshowmaskcolMethod || event == rtengine::EvlocallabshowmaskexpMethod) {
Locallab::llMaskVisibility* maskStruc = locallab->getMaskVisibility();
ipc->setLocallabMaskVisibility(maskStruc->colorMask, maskStruc->expMask);
}
ipc->endUpdateParams(changeFlags); // starts the IPC processing
hasChanged = true;
@ -559,6 +565,12 @@ void ToolPanelCoordinator::profileChange(
gradient->updateGeometry(params->gradient.centerX, params->gradient.centerY, params->gradient.feather, params->gradient.degree, fw, fh);
}
// Reset Locallab mask visibility when a picture is loaded
if (event == rtengine::EvPhotoLoaded) {
locallab->resetMaskVisibility();
ipc->setLocallabMaskVisibility(0, 0);
}
// start the IPC processing
if (filterRawRefresh) {
ipc->endUpdateParams(rtengine::RefreshMapper::getInstance()->getAction(event) & ALLNORAW);