From 44bb8a0cc860678f3d619eb927e02685de4cd6b3 Mon Sep 17 00:00:00 2001 From: Desmis Date: Sun, 4 Aug 2019 13:46:27 +0200 Subject: [PATCH] Format iplocallab locallab --- rtengine/iplocallab.cc | 2 +- rtgui/locallab.cc | 27 ++++++++++++++++----------- rtgui/locallab.h | 2 +- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index d53c4919f..00afe897f 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -4910,7 +4910,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o const LocCCmasktmCurve & locccmastmCurve, bool &lcmastmutili, const LocLLmasktmCurve & locllmastmCurve, bool &llmastmutili, const LocHHmasktmCurve & lochhmastmCurve, bool & lhmastmutili, const LocCCmaskblCurve & locccmasblCurve, bool &lcmasblutili, const LocLLmaskblCurve & locllmasblCurve, bool &llmasblutili, const LocHHmaskblCurve & lochhmasblCurve, bool & lhmasblutili, const LocwavCurve & locwavCurve, - bool & LHutili, bool & HHutili, LUTf & cclocalcurve, bool & localcutili, bool & localexutili, LUTf & exlocalcurve, LUTf & hltonecurveloc, LUTf & shtonecurveloc, LUTf & tonecurveloc, LUTf & lightCurveloc, double & huerefblur, double &chromarefblur, double & lumarefblur, double & hueref, double & chromaref, double & lumaref, double & sobelref, int llColorMask, + bool & LHutili, bool & HHutili, LUTf & cclocalcurve, bool & localcutili, bool & localexutili, LUTf & exlocalcurve, LUTf & hltonecurveloc, LUTf & shtonecurveloc, LUTf & tonecurveloc, LUTf & lightCurveloc, double & huerefblur, double &chromarefblur, double & lumarefblur, double & hueref, double & chromaref, double & lumaref, double & sobelref, int llColorMask, int llExpMask, int llSHMask, int llcbMask, int llretiMask, int llsoftMask, int lltmMask, int llblMask) { /* comment on processus deltaE diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index f1c93f539..8c78f0ff0 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -163,7 +163,7 @@ Locallab::Locallab(): curveEditorGG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_VIBRANCE_CURVEEDITOR_SKINTONES_LABEL"))), //Blur maskblCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK"))), - + //TM masktmCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK"))), // Retinex @@ -1526,6 +1526,7 @@ Locallab::Locallab(): if (showtooltip) { fftwlc->set_tooltip_text(M("TP_LOCALLAB_LC_FFTW_TOOLTIP")); } + LocalcurveEditorwav->setCurveListener(this); wavshape = static_cast(LocalcurveEditorwav->addCurve(CT_Flat, "", nullptr, false, false)); @@ -1543,7 +1544,7 @@ Locallab::Locallab(): localcontMethod->set_active(0); if (showtooltip) { - // localcontMethod->set_tooltip_markup(M("TP_LOCALLAB_LOCMETHOD_TOOLTIP")); + // localcontMethod->set_tooltip_markup(M("TP_LOCALLAB_LOCMETHOD_TOOLTIP")); } localcontMethodConn = localcontMethod->signal_changed().connect(sigc::mem_fun(*this, &Locallab::localcontMethodChanged)); @@ -1556,10 +1557,11 @@ Locallab::Locallab(): lclightness->setAdjusterListener(this); levelwav->setAdjusterListener(this); + if (showtooltip) { levelwav->set_tooltip_markup(M("TP_LOCALLAB_LEVELWAV_TOOLTIP")); } - + residcont->setAdjusterListener(this); sensilc->setAdjusterListener(this); @@ -2003,8 +2005,8 @@ void Locallab::refChanged(double huer, double lumar, double chromar) CCmaskblshape->updateLocallabBackground(normChromar); LLmaskblshape->updateLocallabBackground(normLumar); HHmaskblshape->updateLocallabBackground(normHuer); - - + + // Update TM mask background CCmasktmshape->updateLocallabBackground(normChromar); LLmasktmshape->updateLocallabBackground(normLumar); @@ -2840,13 +2842,13 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pp->locallab.spots.at(pp->locallab.selspot).sensilc = sensilc->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).fftwlc = fftwlc->get_active(); pp->locallab.spots.at(pp->locallab.selspot).locwavcurve = wavshape->getCurve(); - + if (localcontMethod->get_active_row_number() == 0) { pp->locallab.spots.at(pp->locallab.selspot).localcontMethod = "loc"; } else if (localcontMethod->get_active_row_number() == 1) { pp->locallab.spots.at(pp->locallab.selspot).localcontMethod = "wav"; } - + // Contrast by detail levels pp->locallab.spots.at(pp->locallab.selspot).expcbdl = expcbdl->getEnabled(); @@ -3686,7 +3688,7 @@ void Locallab::curveChanged(CurveEditor* ce) } } - + // Local contrast if (getEnabled() && expcontrast->getEnabled()) { if (ce == wavshape) { @@ -3695,7 +3697,7 @@ void Locallab::curveChanged(CurveEditor* ce) } } } - + } void Locallab::localcontMethodChanged() @@ -3719,7 +3721,7 @@ void Locallab::localcontMethodChanged() LocalcurveEditorwav->show(); fftwlc->hide(); } - + // printf("localcontMethodChanged\n"); if (getEnabled() && expcontrast->getEnabled()) { if (listener) { @@ -6234,7 +6236,7 @@ void Locallab::setBatchMode(bool batchMode) //Local contrast localcontMethod->append(M("GENERAL_UNCHANGED")); - + // In batch mode, being able to change mask visibility is useless showmaskcolMethod->hide(); showmaskexpMethod->hide(); @@ -6746,11 +6748,13 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con residcont->setValue(pp->locallab.spots.at(index).residcont); sensilc->setValue(pp->locallab.spots.at(index).sensilc); fftwlc->set_active(pp->locallab.spots.at(index).fftwlc); + if (pp->locallab.spots.at(index).localcontMethod == "loc") { localcontMethod->set_active(0); } else if (pp->locallab.spots.at(index).localcontMethod == "wav") { localcontMethod->set_active(1); } + wavshape->setCurve(pp->locallab.spots.at(index).locwavcurve); // Contrast by detail levels @@ -7040,6 +7044,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con sensilc->setEditedState(spotState->sensilc ? Edited : UnEdited); fftwlc->set_inconsistent(multiImage && !spotState->fftwlc); wavshape->setUnChanged(!spotState->locwavcurve); + if (!spotState->retinexMethod) { localcontMethod->set_active_text(M("GENERAL_UNCHANGED")); } diff --git a/rtgui/locallab.h b/rtgui/locallab.h index 29226f99d..082ab2588 100644 --- a/rtgui/locallab.h +++ b/rtgui/locallab.h @@ -116,7 +116,7 @@ private: //local contrast CurveEditorGroup* const LocalcurveEditorwav; FlatCurveEditor* wavshape; - + //Cbdl CurveEditorGroup* const maskcbCurveEditorG; FlatCurveEditor* CCmaskcbshape;