Merge of Locallab tools with actual GUI
Improvements: - Simplification of default values setting/management Limitations: - Possibility to add/remove Locallab tool isn't working - Even if not fully deactivated, batch mode isn't working anymore for Locallab - Mask preview isn't working anymore
This commit is contained in:
parent
e4701101c9
commit
53eeffbebf
@ -24,8 +24,11 @@
|
|||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include "editwidgets.h"
|
#include "editwidgets.h"
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
|
using namespace procparams;
|
||||||
|
|
||||||
extern Options options;
|
extern Options options;
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@ -806,25 +809,6 @@ void ControlSpotPanel::updateParamVisibility()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ControlSpotPanel::adjusterAutoToggled(Adjuster* a, bool newval)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
void ControlSpotPanel::adjusterChanged(ThresholdAdjuster* a, double newBottom, double newTop)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
void ControlSpotPanel::adjusterChanged(ThresholdAdjuster* a, double newBottomLeft, double newTopLeft, double newBottomRight, double newTopRight)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
void ControlSpotPanel::adjusterChanged(ThresholdAdjuster* a, int newBottom, int newTop)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
void ControlSpotPanel::adjusterChanged(ThresholdAdjuster* a, int newBottomLeft, int newTopLeft, int newBottomRight, int newTopRight)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
void ControlSpotPanel::adjusterChanged2(ThresholdAdjuster* a, int newBottomL, int newTopL, int newBottomR, int newTopR)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void ControlSpotPanel::adjusterChanged(Adjuster* a, double newval)
|
void ControlSpotPanel::adjusterChanged(Adjuster* a, double newval)
|
||||||
{
|
{
|
||||||
// printf("adjusterChanged\n");
|
// printf("adjusterChanged\n");
|
||||||
@ -2070,85 +2054,33 @@ void ControlSpotPanel::setEditedStates(SpotEdited* se)
|
|||||||
disableParamlistener(false);
|
disableParamlistener(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ControlSpotPanel::setDefaults(const rtengine::procparams::ProcParams * defParams, const ParamsEdited * pedited, int id)
|
void ControlSpotPanel::setDefaults(const rtengine::procparams::ProcParams * defParams, const ParamsEdited * pedited)
|
||||||
{
|
{
|
||||||
// Find vector index of given spot id (index = -1 if not found)
|
const int index = defParams->locallab.selspot;
|
||||||
int index = -1;
|
|
||||||
|
|
||||||
for (int i = 0; i < (int)defParams->locallab.spots.size(); i++) {
|
if (index < (int)defParams->locallab.spots.size()) {
|
||||||
if (defParams->locallab.spots.at(i).id == id) {
|
const LocallabParams::LocallabSpot defSpot = defParams->locallab.spots.at(index);
|
||||||
index = i;
|
|
||||||
|
|
||||||
break;
|
// Set default values for adjuster widgets
|
||||||
}
|
sensiexclu_->setDefault((double)defSpot.sensiexclu);
|
||||||
|
structexclu_->setDefault((double)defSpot.structexclu);
|
||||||
|
struc_->setDefault(defSpot.struc);
|
||||||
|
locX_->setDefault((double)defSpot.locX);
|
||||||
|
locXL_->setDefault((double)defSpot.locXL);
|
||||||
|
locY_->setDefault((double)defSpot.locY);
|
||||||
|
locYT_->setDefault((double)defSpot.locYT);
|
||||||
|
centerX_->setDefault((double)defSpot.centerX);
|
||||||
|
centerY_->setDefault((double)defSpot.centerY);
|
||||||
|
circrad_->setDefault((double)defSpot.circrad);
|
||||||
|
transit_->setDefault((double)defSpot.transit);
|
||||||
|
thresh_->setDefault(defSpot.thresh);
|
||||||
|
iter_->setDefault(defSpot.iter);
|
||||||
|
balan_->setDefault(defSpot.balan);
|
||||||
|
transitweak_->setDefault(defSpot.transitweak);
|
||||||
|
transitgrad_->setDefault(defSpot.transitgrad);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set default values for adjusters
|
// Note: No need to manage pedited as batch mode is deactivated for Locallab
|
||||||
const rtengine::procparams::LocallabParams::LocallabSpot* defSpot = new rtengine::procparams::LocallabParams::LocallabSpot();
|
|
||||||
|
|
||||||
if (index != -1 && index < (int)defParams->locallab.spots.size()) {
|
|
||||||
defSpot = &defParams->locallab.spots.at(index);
|
|
||||||
}
|
|
||||||
|
|
||||||
sensiexclu_->setDefault((double)defSpot->sensiexclu);
|
|
||||||
structexclu_->setDefault((double)defSpot->structexclu);
|
|
||||||
struc_->setDefault(defSpot->struc);
|
|
||||||
locX_->setDefault((double)defSpot->locX);
|
|
||||||
locXL_->setDefault((double)defSpot->locXL);
|
|
||||||
locY_->setDefault((double)defSpot->locY);
|
|
||||||
locYT_->setDefault((double)defSpot->locYT);
|
|
||||||
centerX_->setDefault((double)defSpot->centerX);
|
|
||||||
centerY_->setDefault((double)defSpot->centerY);
|
|
||||||
circrad_->setDefault((double)defSpot->circrad);
|
|
||||||
transit_->setDefault((double)defSpot->transit);
|
|
||||||
thresh_->setDefault(defSpot->thresh);
|
|
||||||
iter_->setDefault(defSpot->iter);
|
|
||||||
balan_->setDefault(defSpot->balan);
|
|
||||||
transitweak_->setDefault(defSpot->transitweak);
|
|
||||||
transitgrad_->setDefault(defSpot->transitgrad);
|
|
||||||
|
|
||||||
// Set default edited states for adjusters
|
|
||||||
if (!pedited) {
|
|
||||||
sensiexclu_->setDefaultEditedState(Irrelevant);
|
|
||||||
structexclu_->setDefaultEditedState(Irrelevant);
|
|
||||||
struc_->setDefaultEditedState(Irrelevant);
|
|
||||||
locX_->setDefaultEditedState(Irrelevant);
|
|
||||||
locXL_->setDefaultEditedState(Irrelevant);
|
|
||||||
locY_->setDefaultEditedState(Irrelevant);
|
|
||||||
locYT_->setDefaultEditedState(Irrelevant);
|
|
||||||
centerX_->setDefaultEditedState(Irrelevant);
|
|
||||||
centerY_->setDefaultEditedState(Irrelevant);
|
|
||||||
circrad_->setDefaultEditedState(Irrelevant);
|
|
||||||
transit_->setDefaultEditedState(Irrelevant);
|
|
||||||
thresh_->setDefaultEditedState(Irrelevant);
|
|
||||||
iter_->setDefaultEditedState(Irrelevant);
|
|
||||||
balan_->setDefaultEditedState(Irrelevant);
|
|
||||||
transitweak_->setDefaultEditedState(Irrelevant);
|
|
||||||
transitgrad_->setDefaultEditedState(Irrelevant);
|
|
||||||
} else {
|
|
||||||
const LocallabParamsEdited::LocallabSpotEdited* defSpotState = new LocallabParamsEdited::LocallabSpotEdited(true);
|
|
||||||
|
|
||||||
if (index != 1 && index < (int)pedited->locallab.spots.size()) {
|
|
||||||
defSpotState = &pedited->locallab.spots.at(index);
|
|
||||||
}
|
|
||||||
|
|
||||||
sensiexclu_->setDefaultEditedState(defSpotState->sensiexclu ? Edited : UnEdited);
|
|
||||||
structexclu_->setDefaultEditedState(defSpotState->structexclu ? Edited : UnEdited);
|
|
||||||
struc_->setDefaultEditedState(defSpotState->struc ? Edited : UnEdited);
|
|
||||||
locX_->setDefaultEditedState(defSpotState->locX ? Edited : UnEdited);
|
|
||||||
locXL_->setDefaultEditedState(defSpotState->locXL ? Edited : UnEdited);
|
|
||||||
locY_->setDefaultEditedState(defSpotState->locY ? Edited : UnEdited);
|
|
||||||
locYT_->setDefaultEditedState(defSpotState->locYT ? Edited : UnEdited);
|
|
||||||
centerX_->setDefaultEditedState(defSpotState->centerX ? Edited : UnEdited);
|
|
||||||
centerY_->setDefaultEditedState(defSpotState->centerY ? Edited : UnEdited);
|
|
||||||
circrad_->setDefaultEditedState(defSpotState->circrad ? Edited : UnEdited);
|
|
||||||
transit_->setDefaultEditedState(defSpotState->transit ? Edited : UnEdited);
|
|
||||||
thresh_->setDefaultEditedState(defSpotState->thresh ? Edited : UnEdited);
|
|
||||||
iter_->setDefaultEditedState(defSpotState->iter ? Edited : UnEdited);
|
|
||||||
balan_->setDefaultEditedState(defSpotState->balan ? Edited : UnEdited);
|
|
||||||
transitweak_->setDefaultEditedState(defSpotState->transitweak ? Edited : UnEdited);
|
|
||||||
transitgrad_->setDefaultEditedState(defSpotState->transitgrad ? Edited : UnEdited);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ControlSpotPanel::setBatchMode(bool batchMode)
|
void ControlSpotPanel::setBatchMode(bool batchMode)
|
||||||
|
@ -29,7 +29,6 @@
|
|||||||
#include "toolpanel.h"
|
#include "toolpanel.h"
|
||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "thresholdadjuster.h"
|
|
||||||
|
|
||||||
class ControlSpotPanel:
|
class ControlSpotPanel:
|
||||||
public ToolParamBlock,
|
public ToolParamBlock,
|
||||||
@ -206,10 +205,9 @@ public:
|
|||||||
* Implementation of setDefaults function of toolpanel.h
|
* Implementation of setDefaults function of toolpanel.h
|
||||||
*
|
*
|
||||||
* @param defParams ProcParams containing default values to set to the adjusters
|
* @param defParams ProcParams containing default values to set to the adjusters
|
||||||
* @param pedited ParamsEdited containing default state values to set to the adjusters
|
* @param pedited ParamsEdited containing default state values to set to the adjusters (not used because batch mode is deactivated for Locallab)
|
||||||
* @param id Spot id to consider to update adjusters default values and default state values
|
|
||||||
*/
|
*/
|
||||||
void setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr, int id = 0);
|
void setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr);
|
||||||
/**
|
/**
|
||||||
* Variant of setDefaults function which only update adjuster default states
|
* Variant of setDefaults function which only update adjuster default states
|
||||||
*
|
*
|
||||||
@ -256,12 +254,6 @@ private:
|
|||||||
void qualityMethodChanged();
|
void qualityMethodChanged();
|
||||||
void updateParamVisibility();
|
void updateParamVisibility();
|
||||||
void adjusterChanged(Adjuster* a, double newval);
|
void adjusterChanged(Adjuster* a, double newval);
|
||||||
void adjusterAutoToggled(Adjuster* a, bool newval);
|
|
||||||
void adjusterChanged(ThresholdAdjuster* a, double newBottom, double newTop);
|
|
||||||
void adjusterChanged(ThresholdAdjuster* a, double newBottomLeft, double newTopLeft, double newBottomRight, double newTopRight);
|
|
||||||
void adjusterChanged(ThresholdAdjuster* a, int newBottom, int newTop);
|
|
||||||
void adjusterChanged(ThresholdAdjuster* a, int newBottomLeft, int newTopLeft, int newBottomRight, int newTopRight);
|
|
||||||
void adjusterChanged2(ThresholdAdjuster* a, int newBottomL, int newTopL, int newBottomR, int newTopR);
|
|
||||||
void avoidChanged();
|
void avoidChanged();
|
||||||
|
|
||||||
void disableParamlistener(bool cond);
|
void disableParamlistener(bool cond);
|
||||||
|
6624
rtgui/locallab.cc
6624
rtgui/locallab.cc
File diff suppressed because it is too large
Load Diff
477
rtgui/locallab.h
477
rtgui/locallab.h
@ -17,454 +17,53 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* 2017 Jacques Desmis <jdesmis@gmail.com>
|
* 2017 Jacques Desmis <jdesmis@gmail.com>
|
||||||
* 2018 Pierre Cabrera <pierre.cab@gmail.com>
|
* 2019 Pierre Cabrera <pierre.cab@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
#ifndef _LOCALLAB_H_
|
||||||
|
#define _LOCALLAB_H_
|
||||||
|
|
||||||
#include <gtkmm.h>
|
#include "controlspotpanel.h"
|
||||||
#include "adjuster.h"
|
#include "locallabtools.h"
|
||||||
#include "toolpanel.h"
|
#include "toolpanel.h"
|
||||||
#include "editcallbacks.h"
|
#include "editcallbacks.h"
|
||||||
#include "curveeditor.h"
|
|
||||||
#include "curveeditorgroup.h"
|
|
||||||
#include "toolpanel.h"
|
|
||||||
#include "options.h"
|
|
||||||
#include "thresholdadjuster.h"
|
|
||||||
#include "controlspotpanel.h"
|
|
||||||
#include "labgrid.h"
|
|
||||||
|
|
||||||
class Locallab :
|
class Locallab :
|
||||||
public ToolParamBlock,
|
public ToolParamBlock,
|
||||||
public AdjusterListener,
|
|
||||||
public FoldableToolPanel,
|
public FoldableToolPanel,
|
||||||
public CurveListener,
|
|
||||||
public ColorProvider,
|
|
||||||
public ThresholdCurveProvider,
|
|
||||||
public rtengine::LocallabListener,
|
public rtengine::LocallabListener,
|
||||||
public ThresholdAdjusterListener
|
public LocallabToolListener
|
||||||
|
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
IdleRegister idle_register;
|
// Spot control panel widget
|
||||||
|
|
||||||
// Expander widgets
|
|
||||||
ControlSpotPanel* const expsettings;
|
ControlSpotPanel* const expsettings;
|
||||||
MyExpander* const expcolor;
|
|
||||||
MyExpander* const expexpose;
|
|
||||||
MyExpander* const expshadhigh;
|
|
||||||
MyExpander* const expvibrance;
|
|
||||||
MyExpander* const expsoft;
|
|
||||||
MyExpander* const expblur;
|
|
||||||
MyExpander* const exptonemap;
|
|
||||||
MyExpander* const expreti;
|
|
||||||
MyExpander* const expsharp;
|
|
||||||
MyExpander* const expcontrast;
|
|
||||||
MyExpander* const expcbdl;
|
|
||||||
MyExpander* const expdenoi;
|
|
||||||
MyExpander* const expmaskcol;
|
|
||||||
MyExpander* const expmaskexp;
|
|
||||||
MyExpander* const expmasksh;
|
|
||||||
MyExpander* const expmaskcb;
|
|
||||||
MyExpander* const expmaskreti;
|
|
||||||
MyExpander* const expmasktm;
|
|
||||||
sigc::connection enablecolorConn, enableexposeConn, enableshadhighConn, enablevibranceConn, enablesoftConn, enableblurConn, enabletonemapConn, enableretiConn, enablesharpConn, enablecontrastConn, enablecbdlConn, enabledenoiConn;
|
|
||||||
|
|
||||||
// Curve widgets
|
// Locallab tool widgets
|
||||||
// Color & Light
|
LocallabColor* expcolor;
|
||||||
CurveEditorGroup* const llCurveEditorG;
|
LocallabExposure* expexpose;
|
||||||
CurveEditorGroup* const HCurveEditorG;
|
LocallabShadow* expshadhigh;
|
||||||
CurveEditorGroup* const maskCurveEditorG;
|
LocallabVibrance* expvibrance;
|
||||||
DiagonalCurveEditor* llshape;
|
LocallabSoft* expsoft;
|
||||||
DiagonalCurveEditor* ccshape;
|
LocallabBlur* expblur;
|
||||||
FlatCurveEditor* LHshape;
|
LocallabTone* exptonemap;
|
||||||
FlatCurveEditor* HHshape;
|
LocallabRetinex* expreti;
|
||||||
FlatCurveEditor* CCmaskshape;
|
LocallabSharp* expsharp;
|
||||||
FlatCurveEditor* LLmaskshape;
|
LocallabContrast* expcontrast;
|
||||||
FlatCurveEditor* HHmaskshape;
|
LocallabCBDL* expcbdl;
|
||||||
// Exposure
|
LocallabDenoise* expdenoi;
|
||||||
CurveEditorGroup* const curveEditorG;
|
|
||||||
CurveEditorGroup* const maskexpCurveEditorG;
|
|
||||||
DiagonalCurveEditor* shapeexpos;
|
|
||||||
FlatCurveEditor* CCmaskexpshape;
|
|
||||||
FlatCurveEditor* LLmaskexpshape;
|
|
||||||
FlatCurveEditor* HHmaskexpshape;
|
|
||||||
//Shadows Highlight
|
|
||||||
CurveEditorGroup* const maskSHCurveEditorG;
|
|
||||||
FlatCurveEditor* CCmaskSHshape;
|
|
||||||
FlatCurveEditor* LLmaskSHshape;
|
|
||||||
FlatCurveEditor* HHmaskSHshape;
|
|
||||||
// Vibrance
|
|
||||||
CurveEditorGroup* const curveEditorGG;
|
|
||||||
DiagonalCurveEditor* skinTonesCurve;
|
|
||||||
// TM
|
|
||||||
CurveEditorGroup* const masktmCurveEditorG;
|
|
||||||
FlatCurveEditor* CCmasktmshape;
|
|
||||||
FlatCurveEditor* LLmasktmshape;
|
|
||||||
FlatCurveEditor* HHmasktmshape;
|
|
||||||
// Retinex
|
|
||||||
CurveEditorGroup* const LocalcurveEditorgainT;
|
|
||||||
CurveEditorGroup* const maskretiCurveEditorG;
|
|
||||||
FlatCurveEditor* cTgainshape;
|
|
||||||
FlatCurveEditor* CCmaskretishape;
|
|
||||||
FlatCurveEditor* LLmaskretishape;
|
|
||||||
FlatCurveEditor* HHmaskretishape;
|
|
||||||
//local contrast
|
|
||||||
CurveEditorGroup* const LocalcurveEditorwav;
|
|
||||||
FlatCurveEditor* wavshape;
|
|
||||||
|
|
||||||
//Cbdl
|
|
||||||
CurveEditorGroup* const maskcbCurveEditorG;
|
|
||||||
FlatCurveEditor* CCmaskcbshape;
|
|
||||||
FlatCurveEditor* LLmaskcbshape;
|
|
||||||
FlatCurveEditor* HHmaskcbshape;
|
|
||||||
|
|
||||||
// Adjuster widgets
|
|
||||||
// Color & Light
|
|
||||||
Adjuster* const lightness;
|
|
||||||
Adjuster* const contrast;
|
|
||||||
Adjuster* const chroma;
|
|
||||||
Adjuster* const strengthgrid;
|
|
||||||
Adjuster* const sensi;
|
|
||||||
Adjuster* const structcol;
|
|
||||||
Adjuster* const blurcolde;
|
|
||||||
Adjuster* const blendmaskcol;
|
|
||||||
Adjuster* const radmaskcol;
|
|
||||||
Adjuster* const chromaskcol;
|
|
||||||
Adjuster* const gammaskcol;
|
|
||||||
Adjuster* const slomaskcol;
|
|
||||||
Adjuster* const softradiuscol;
|
|
||||||
// Exposure
|
|
||||||
Adjuster* const expcomp;
|
|
||||||
Adjuster* const hlcompr;
|
|
||||||
Adjuster* const hlcomprthresh;
|
|
||||||
Adjuster* const black;
|
|
||||||
Adjuster* const shadex;
|
|
||||||
Adjuster* const shcompr;
|
|
||||||
Adjuster* const expchroma;
|
|
||||||
Adjuster* const warm;
|
|
||||||
Adjuster* const sensiex;
|
|
||||||
Adjuster* const structexp;
|
|
||||||
Adjuster* const blurexpde;
|
|
||||||
Adjuster* const blendmaskexp;
|
|
||||||
Adjuster* const radmaskexp;
|
|
||||||
Adjuster* const chromaskexp;
|
|
||||||
Adjuster* const gammaskexp;
|
|
||||||
Adjuster* const slomaskexp;
|
|
||||||
Adjuster* const softradiusexp;
|
|
||||||
Adjuster* const laplacexp;
|
|
||||||
Adjuster* const balanexp;
|
|
||||||
Adjuster* const linear;
|
|
||||||
//Shadow highlight
|
|
||||||
Adjuster* const highlights;
|
|
||||||
Adjuster* const h_tonalwidth;
|
|
||||||
Adjuster* const shadows;
|
|
||||||
Adjuster* const s_tonalwidth;
|
|
||||||
Adjuster* const sh_radius;
|
|
||||||
Adjuster* const sensihs;
|
|
||||||
Adjuster* const blendmaskSH;
|
|
||||||
Adjuster* const radmaskSH;
|
|
||||||
Adjuster* const blurSHde;
|
|
||||||
Adjuster* const chromaskSH;
|
|
||||||
Adjuster* const gammaskSH;
|
|
||||||
Adjuster* const slomaskSH;
|
|
||||||
// Vibrance
|
|
||||||
Adjuster* const saturated;
|
|
||||||
Adjuster* const pastels;
|
|
||||||
Adjuster* const sensiv;
|
|
||||||
// Soft Light
|
|
||||||
Adjuster* const streng;
|
|
||||||
Adjuster* const laplace;
|
|
||||||
Adjuster* const sensisf;
|
|
||||||
// Blur & Noise
|
|
||||||
Adjuster* const radius;
|
|
||||||
Adjuster* const strength;
|
|
||||||
Adjuster* const sensibn;
|
|
||||||
// Tone Mapping
|
|
||||||
Adjuster* const stren;
|
|
||||||
Adjuster* const gamma;
|
|
||||||
Adjuster* const estop;
|
|
||||||
Adjuster* const scaltm;
|
|
||||||
Adjuster* const rewei;
|
|
||||||
Adjuster* const sensitm;
|
|
||||||
Adjuster* const softradiustm;
|
|
||||||
Adjuster* const amount;
|
|
||||||
Adjuster* const satur;
|
|
||||||
Adjuster* const blendmasktm;
|
|
||||||
Adjuster* const radmasktm;
|
|
||||||
Adjuster* const chromasktm;
|
|
||||||
Adjuster* const gammasktm;
|
|
||||||
Adjuster* const slomasktm;
|
|
||||||
// Retinex
|
|
||||||
Adjuster* const str;
|
|
||||||
Adjuster* const chrrt;
|
|
||||||
Adjuster* const neigh;
|
|
||||||
Adjuster* const vart;
|
|
||||||
Adjuster* const dehaz;
|
|
||||||
Adjuster* const sensih;
|
|
||||||
Adjuster* const softradiusret;
|
|
||||||
|
|
||||||
Adjuster* const blendmaskreti;
|
|
||||||
Adjuster* const radmaskreti;
|
|
||||||
Adjuster* const chromaskreti;
|
|
||||||
Adjuster* const gammaskreti;
|
|
||||||
Adjuster* const slomaskreti;
|
|
||||||
Adjuster* const scalereti;
|
|
||||||
Adjuster* const darkness;
|
|
||||||
Adjuster* const lightnessreti;
|
|
||||||
Adjuster* const limd;
|
|
||||||
|
|
||||||
// Sharpening
|
|
||||||
Adjuster* const sharcontrast;
|
|
||||||
Adjuster* const sharradius;
|
|
||||||
Adjuster* const sharamount;
|
|
||||||
Adjuster* const shardamping;
|
|
||||||
Adjuster* const shariter;
|
|
||||||
Adjuster* const sharblur;
|
|
||||||
Adjuster* const sensisha;
|
|
||||||
// Local Contrast
|
|
||||||
Adjuster* const lcradius;
|
|
||||||
Adjuster* const lcamount;
|
|
||||||
Adjuster* const lcdarkness;
|
|
||||||
Adjuster* const lclightness;
|
|
||||||
Adjuster* const levelwav;
|
|
||||||
Adjuster* const residcont;
|
|
||||||
Adjuster* const sensilc;
|
|
||||||
// Contrast by detail levels
|
|
||||||
Adjuster* multiplier[6];
|
|
||||||
Adjuster* const chromacbdl;
|
|
||||||
Adjuster* const threshold;
|
|
||||||
Adjuster* const clarityml;
|
|
||||||
Adjuster* const contresid;
|
|
||||||
Adjuster* const blurcbdl;
|
|
||||||
Adjuster* const sensicb;
|
|
||||||
Adjuster* const softradiuscb;
|
|
||||||
Adjuster* const blendmaskcb;
|
|
||||||
Adjuster* const radmaskcb;
|
|
||||||
Adjuster* const chromaskcb;
|
|
||||||
Adjuster* const gammaskcb;
|
|
||||||
Adjuster* const slomaskcb;
|
|
||||||
|
|
||||||
// Denoise
|
|
||||||
Adjuster* const noiselumf;
|
|
||||||
Adjuster* const noiselumf0;
|
|
||||||
Adjuster* const noiselumf2;
|
|
||||||
Adjuster* const noiselumc;
|
|
||||||
Adjuster* const noiselumdetail;
|
|
||||||
Adjuster* const noiselequal;
|
|
||||||
Adjuster* const noisechrof;
|
|
||||||
Adjuster* const noisechroc;
|
|
||||||
Adjuster* const noisechrodetail;
|
|
||||||
Adjuster* const adjblur;
|
|
||||||
Adjuster* const bilateral;
|
|
||||||
Adjuster* const sensiden;
|
|
||||||
|
|
||||||
// ButtonCheck widgets
|
|
||||||
// Color & Light
|
|
||||||
Gtk::CheckButton* const curvactiv;
|
|
||||||
Gtk::CheckButton* const invers;
|
|
||||||
Gtk::CheckButton* const enaColorMask;
|
|
||||||
sigc::connection curvactivConn, inversConn, enaColorMaskConn;
|
|
||||||
// Exposure
|
|
||||||
Gtk::CheckButton* const enaExpMask;
|
|
||||||
sigc::connection enaExpMaskConn;
|
|
||||||
Gtk::CheckButton* const inversex;
|
|
||||||
sigc::connection inversexConn;
|
|
||||||
//Shadows highlight
|
|
||||||
Gtk::CheckButton* const enaSHMask;
|
|
||||||
sigc::connection enaSHMaskConn;
|
|
||||||
Gtk::CheckButton* const inverssh;
|
|
||||||
sigc::connection inversshConn;
|
|
||||||
// Vibrance
|
|
||||||
Gtk::CheckButton* const protectSkins;
|
|
||||||
Gtk::CheckButton* const avoidColorShift;
|
|
||||||
Gtk::CheckButton* const pastSatTog;
|
|
||||||
sigc::connection pskinsconn, ashiftconn, pastsattogconn;
|
|
||||||
// Blur & Noise
|
|
||||||
Gtk::CheckButton* const activlum;
|
|
||||||
sigc::connection activlumConn;
|
|
||||||
//Tone mapping
|
|
||||||
Gtk::CheckButton* const equiltm;
|
|
||||||
sigc::connection equiltmConn;
|
|
||||||
Gtk::CheckButton* const enatmMask;
|
|
||||||
sigc::connection enatmMaskConn;
|
|
||||||
// Retinex
|
|
||||||
Gtk::CheckButton* const equilret;
|
|
||||||
sigc::connection equilretConn;
|
|
||||||
Gtk::CheckButton* const inversret;
|
|
||||||
sigc::connection inversretConn;
|
|
||||||
Gtk::CheckButton* const enaretiMask;
|
|
||||||
sigc::connection enaretiMaskConn;
|
|
||||||
Gtk::CheckButton* const enaretiMasktmap;
|
|
||||||
sigc::connection enaretiMasktmapConn;
|
|
||||||
Gtk::CheckButton* const fftwreti;
|
|
||||||
sigc::connection fftwretiConn;
|
|
||||||
// Sharpening
|
|
||||||
Gtk::CheckButton* const inverssha;
|
|
||||||
sigc::connection inversshaConn;
|
|
||||||
//local contrast
|
|
||||||
Gtk::CheckButton* const fftwlc;
|
|
||||||
sigc::connection fftwlcConn;
|
|
||||||
|
|
||||||
//CBDL
|
|
||||||
Gtk::CheckButton* const enacbMask;
|
|
||||||
sigc::connection enacbMaskConn;
|
|
||||||
|
|
||||||
// ComboBox widgets
|
|
||||||
// Color & Light
|
|
||||||
MyComboBoxText* const qualitycurveMethod;
|
|
||||||
sigc::connection qualitycurveMethodConn;
|
|
||||||
MyComboBoxText* const gridMethod;
|
|
||||||
sigc::connection gridMethodConn;
|
|
||||||
MyComboBoxText* const showmaskcolMethod;
|
|
||||||
sigc::connection showmaskcolMethodConn;
|
|
||||||
//Exposure
|
|
||||||
MyComboBoxText* const showmaskexpMethod;
|
|
||||||
sigc::connection showmaskexpMethodConn;
|
|
||||||
MyComboBoxText* const expMethod;
|
|
||||||
sigc::connection expMethodConn;
|
|
||||||
//Shadows Highlight
|
|
||||||
MyComboBoxText* const showmaskSHMethod;
|
|
||||||
sigc::connection showmaskSHMethodConn;
|
|
||||||
// Blur & Noise
|
|
||||||
MyComboBoxText* const blurMethod;
|
|
||||||
sigc::connection blurMethodConn;
|
|
||||||
//soft light
|
|
||||||
MyComboBoxText* const softMethod;
|
|
||||||
sigc::connection softMethodConn;
|
|
||||||
MyComboBoxText* const showmasksoftMethod;
|
|
||||||
sigc::connection showmasksoftMethodConn;
|
|
||||||
//TM
|
|
||||||
MyComboBoxText* const showmasktmMethod;
|
|
||||||
sigc::connection showmasktmMethodConn;
|
|
||||||
// Retinex
|
|
||||||
MyComboBoxText* const retinexMethod;
|
|
||||||
sigc::connection retinexMethodConn;
|
|
||||||
MyComboBoxText* const showmaskretiMethod;
|
|
||||||
sigc::connection showmaskretiMethodConn;
|
|
||||||
//local contrast
|
|
||||||
MyComboBoxText* const localcontMethod;
|
|
||||||
sigc::connection localcontMethodConn;
|
|
||||||
//CBDL
|
|
||||||
MyComboBoxText* const showmaskcbMethod;
|
|
||||||
sigc::connection showmaskcbMethodConn;
|
|
||||||
// ThresholdAdjuster widgets
|
|
||||||
// Vibrance
|
|
||||||
ThresholdAdjuster* const psThreshold;
|
|
||||||
|
|
||||||
// Other widgets
|
|
||||||
Gtk::Label* const labqualcurv;
|
|
||||||
Gtk::Button* const lumacontrastMinusButton;
|
|
||||||
Gtk::Button* const lumaneutralButton;
|
|
||||||
Gtk::Button* const lumacontrastPlusButton;
|
|
||||||
sigc::connection lumacontrastMinusPressedConn, lumaneutralPressedConn, lumacontrastPlusPressedConn;
|
|
||||||
Gtk::Frame* gridFrame;
|
|
||||||
Gtk::Frame* pdeFrame;
|
|
||||||
Gtk::Frame* residFrame;
|
|
||||||
LabGrid *labgrid;
|
|
||||||
// Others
|
|
||||||
Gtk::HBox* ctboxsoftmethod;
|
|
||||||
/**
|
|
||||||
* Used to store the default ProcParams when setDefaults function is called
|
|
||||||
* When an other spot is selected, this default ProcParams is used to update adjusters default values
|
|
||||||
*/
|
|
||||||
const rtengine::procparams::ProcParams* defparams;
|
|
||||||
/**
|
|
||||||
* Used to store the default ParamsEdited when setDefaults function is called
|
|
||||||
* When an other spot is selected, this default ParamsEdited is used to update adjusters default edited state
|
|
||||||
*/
|
|
||||||
const ParamsEdited* defpedited;
|
|
||||||
/**
|
|
||||||
* Used to store the default ParamsEdited when setDefaults function is called
|
|
||||||
* This ParamsEdited is updated when control spots are modified and is used to update adjusters edited state
|
|
||||||
*/
|
|
||||||
ParamsEdited* pe;
|
|
||||||
|
|
||||||
// Expander management functions
|
|
||||||
void foldAllButMe(GdkEventButton* event, MyExpander *expander);
|
|
||||||
void enableToggled(MyExpander *expander);
|
|
||||||
|
|
||||||
// ButtonCheck event functions
|
|
||||||
// Color & Light
|
|
||||||
void curvactivChanged();
|
|
||||||
void inversChanged();
|
|
||||||
void enaColorMaskChanged();
|
|
||||||
// Exposure
|
|
||||||
void enaExpMaskChanged();
|
|
||||||
void inversexChanged();
|
|
||||||
//Shadows Highlight
|
|
||||||
void enaSHMaskChanged();
|
|
||||||
void inversshChanged();
|
|
||||||
// Vibrance
|
|
||||||
void protectskins_toggled();
|
|
||||||
void avoidcolorshift_toggled();
|
|
||||||
void pastsattog_toggled();
|
|
||||||
// Blur & Noise
|
|
||||||
void activlumChanged();
|
|
||||||
//TM
|
|
||||||
void equiltmChanged();
|
|
||||||
void enatmMaskChanged();
|
|
||||||
// Retinex
|
|
||||||
void equilretChanged();
|
|
||||||
void inversretChanged();
|
|
||||||
void enaretiMaskChanged();
|
|
||||||
void enaretiMasktmapChanged();
|
|
||||||
void fftwretiChanged();
|
|
||||||
// Sharpening
|
|
||||||
void inversshaChanged();
|
|
||||||
// local contrast
|
|
||||||
void fftwlcChanged();
|
|
||||||
//CBDL
|
|
||||||
void enacbMaskChanged();
|
|
||||||
// ComboBox event functions
|
|
||||||
// Color & Light
|
|
||||||
void qualitycurveMethodChanged();
|
|
||||||
void gridMethodChanged();
|
|
||||||
void showmaskcolMethodChanged();
|
|
||||||
//Exposure
|
|
||||||
void showmaskexpMethodChanged();
|
|
||||||
void expMethodChanged();
|
|
||||||
//Shadows Highlight
|
|
||||||
void showmaskSHMethodChanged();
|
|
||||||
// Blur & Noise
|
|
||||||
void blurMethodChanged();
|
|
||||||
// Soft light
|
|
||||||
void softMethodChanged();
|
|
||||||
void showmasksoftMethodChanged();
|
|
||||||
//TM
|
|
||||||
void showmasktmMethodChanged();
|
|
||||||
// Retinex
|
|
||||||
void retinexMethodChanged();
|
|
||||||
void showmaskretiMethodChanged();
|
|
||||||
//Local contrast
|
|
||||||
void localcontMethodChanged();
|
|
||||||
//CBDL
|
|
||||||
void showmaskcbMethodChanged();
|
|
||||||
// Other widgets event functions
|
|
||||||
void lumacontrastMinusPressed();
|
|
||||||
void lumaneutralPressed();
|
|
||||||
void lumacontrastPlusPressed();
|
|
||||||
|
|
||||||
// Locallab GUI management function
|
|
||||||
void updateLocallabGUI(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited, int index);
|
|
||||||
void updateSpecificGUIState();
|
|
||||||
void setParamEditable(bool cond);
|
|
||||||
|
|
||||||
|
std::vector<LocallabTool*> locallabTools;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Locallab();
|
Locallab();
|
||||||
~Locallab();
|
|
||||||
|
|
||||||
// FoldableToolPanel management functions
|
// FoldableToolPanel management functions
|
||||||
void read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr);
|
void read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr);
|
||||||
void write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr);
|
void write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr);
|
||||||
void setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr);
|
void setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr);
|
||||||
void setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited, int id);
|
|
||||||
void setBatchMode(bool batchMode);
|
|
||||||
void trimValues(rtengine::procparams::ProcParams* pp);
|
|
||||||
void setListener(ToolPanelListener* tpl);
|
void setListener(ToolPanelListener* tpl);
|
||||||
void enableListener();
|
|
||||||
void disableListener();
|
// Locallab tools mask background management function
|
||||||
void writeOptions(std::vector<int> &tpOpen);
|
|
||||||
void updateToolState(std::vector<int> &tpOpen);
|
|
||||||
void refChanged(double huer, double lumar, double chromar);
|
void refChanged(double huer, double lumar, double chromar);
|
||||||
|
|
||||||
// Mask visibility management functions
|
// Mask visibility management functions
|
||||||
@ -492,19 +91,21 @@ public:
|
|||||||
// Curve management function
|
// Curve management function
|
||||||
void autoOpenCurve();
|
void autoOpenCurve();
|
||||||
|
|
||||||
// Curve event function
|
// Locallab tools expanders management functions
|
||||||
void curveChanged(CurveEditor* ce);
|
void foldAllButOne(LocallabTool* except);
|
||||||
|
|
||||||
// Adjuster event function
|
private:
|
||||||
void adjusterChanged(Adjuster* a, double newval);
|
// Locallab tools management functions
|
||||||
void adjusterAutoToggled(Adjuster* a, bool newval);
|
void addTool(Gtk::Box* where, LocallabTool* tool);
|
||||||
|
|
||||||
// ThresholdAdjuster event functions
|
// Locallab tools management functions
|
||||||
virtual void colorForValue(double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller* caller);
|
void openAllTools();
|
||||||
std::vector<double> getCurvePoints(ThresholdSelector* tAdjuster) const;
|
|
||||||
void adjusterChanged(ThresholdAdjuster* a, int newBottom, int newTop);
|
// Locallab GUI management function
|
||||||
void adjusterChanged(ThresholdAdjuster* a, double newBottom, double newTop);
|
void setParamEditable(bool cond);
|
||||||
void adjusterChanged(ThresholdAdjuster* a, double newBottomLeft, double newTopLeft, double newBottomRight, double newTopRight);
|
|
||||||
void adjusterChanged(ThresholdAdjuster* a, int newBottomLeft, int newTopLeft, int newBottomRight, int newTopRight);
|
// LocallabToolListener function
|
||||||
void adjusterChanged2(ThresholdAdjuster* a, int newBottomL, int newTopL, int newBottomR, int newTopR);
|
void resetOtherMaskView(LocallabTool* current);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "multilangmgr.h"
|
#include "multilangmgr.h"
|
||||||
#include "../rtengine/procparams.h"
|
#include "../rtengine/procparams.h"
|
||||||
|
#include "locallab.h"
|
||||||
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
using namespace procparams;
|
using namespace procparams;
|
||||||
@ -66,6 +67,7 @@ LocallabTool::LocallabTool(Gtk::Box* content, Glib::ustring toolName, Glib::ustr
|
|||||||
}
|
}
|
||||||
|
|
||||||
exp = Gtk::manage(new MyExpander(true, titleBox));
|
exp = Gtk::manage(new MyExpander(true, titleBox));
|
||||||
|
exp->signal_button_release_event().connect_notify(sigc::mem_fun(this, &LocallabTool::foldThemAll));
|
||||||
enaExpConn = exp->signal_enabled_toggled().connect(sigc::mem_fun(*this, &LocallabTool::enabledChanged));
|
enaExpConn = exp->signal_enabled_toggled().connect(sigc::mem_fun(*this, &LocallabTool::enabledChanged));
|
||||||
|
|
||||||
ToolParamBlock* const totalBox = Gtk::manage(new ToolParamBlock());
|
ToolParamBlock* const totalBox = Gtk::manage(new ToolParamBlock());
|
||||||
@ -207,6 +209,7 @@ void LocallabTool::resetMaskView()
|
|||||||
|
|
||||||
void LocallabTool::refChanged(double huer, double lumar, double chromar)
|
void LocallabTool::refChanged(double huer, double lumar, double chromar)
|
||||||
{
|
{
|
||||||
|
if (useMask) {
|
||||||
// Hue reference normalization (between 0 and 1)
|
// Hue reference normalization (between 0 and 1)
|
||||||
double normHuer = huer;
|
double normHuer = huer;
|
||||||
float h = Color::huelab_to_huehsv2(normHuer);
|
float h = Color::huelab_to_huehsv2(normHuer);
|
||||||
@ -239,6 +242,7 @@ void LocallabTool::refChanged(double huer, double lumar, double chromar)
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void LocallabTool::colorForValue(double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller* caller)
|
void LocallabTool::colorForValue(double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller* caller)
|
||||||
{
|
{
|
||||||
@ -258,7 +262,6 @@ void LocallabTool::colorForValue(double valX, double valY, enum ColorCaller::Ele
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 2: // HHmaskshape
|
case 2: // HHmaskshape
|
||||||
// TODO
|
|
||||||
float x = valX - 1.f / 6.f;
|
float x = valX - 1.f / 6.f;
|
||||||
|
|
||||||
if (x < 0.f) {
|
if (x < 0.f) {
|
||||||
@ -266,7 +269,6 @@ void LocallabTool::colorForValue(double valX, double valY, enum ColorCaller::Ele
|
|||||||
}
|
}
|
||||||
|
|
||||||
x = log2lin(x, 3.f);
|
x = log2lin(x, 3.f);
|
||||||
// float x = valX;
|
|
||||||
Color::hsv2rgb01(x, 0.5f, 0.5f, R, G, B);
|
Color::hsv2rgb01(x, 0.5f, 0.5f, R, G, B);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -319,6 +321,15 @@ bool LocallabTool::on_remove_change(GdkEventButton* event)
|
|||||||
return true; // No event propagation further (to avoid closing expander when mouse clicking on remove image)
|
return true; // No event propagation further (to avoid closing expander when mouse clicking on remove image)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LocallabTool::foldThemAll(GdkEventButton* event)
|
||||||
|
{
|
||||||
|
if (event->button == GDK_BUTTON_SECONDARY) {
|
||||||
|
if (locToolListener) {
|
||||||
|
(static_cast<Locallab*>(locToolListener))->foldAllButOne(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* ==== LocallabColor ==== */
|
/* ==== LocallabColor ==== */
|
||||||
LocallabColor::LocallabColor():
|
LocallabColor::LocallabColor():
|
||||||
LocallabTool(this, "Locallab Color&Light", M("TP_LOCALLAB_COFR"), false, MaskNormal),
|
LocallabTool(this, "Locallab Color&Light", M("TP_LOCALLAB_COFR"), false, MaskNormal),
|
||||||
@ -519,7 +530,7 @@ void LocallabColor::colorForValue(double valX, double valY, enum ColorCaller::El
|
|||||||
|
|
||||||
void LocallabColor::setListener(ToolPanelListener* tpl)
|
void LocallabColor::setListener(ToolPanelListener* tpl)
|
||||||
{
|
{
|
||||||
LocallabTool::setListener(tpl); //TODO Check if working
|
LocallabTool::setListener(tpl);
|
||||||
|
|
||||||
labgrid->setListener(tpl);
|
labgrid->setListener(tpl);
|
||||||
}
|
}
|
||||||
@ -667,7 +678,32 @@ void LocallabColor::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pe
|
|||||||
|
|
||||||
void LocallabColor::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
|
void LocallabColor::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
|
||||||
{
|
{
|
||||||
// TODO
|
const int index = defParams->locallab.selspot;
|
||||||
|
|
||||||
|
if (index < (int)defParams->locallab.spots.size()) {
|
||||||
|
const LocallabParams::LocallabSpot defSpot = defParams->locallab.spots.at(index);
|
||||||
|
|
||||||
|
// Set default value for adjuster and labgrid widgets
|
||||||
|
lightness->setDefault((double)defSpot.lightness);
|
||||||
|
contrast->setDefault((double)defSpot.contrast);
|
||||||
|
chroma->setDefault((double)defSpot.chroma);
|
||||||
|
labgrid->setDefault(defSpot.labgridALow / LocallabParams::LABGRIDL_CORR_MAX,
|
||||||
|
defSpot.labgridBLow / LocallabParams::LABGRIDL_CORR_MAX,
|
||||||
|
defSpot.labgridAHigh / LocallabParams::LABGRIDL_CORR_MAX,
|
||||||
|
defSpot.labgridBHigh / LocallabParams::LABGRIDL_CORR_MAX);
|
||||||
|
strengthgrid->setDefault((double) defSpot.strengthgrid);
|
||||||
|
sensi->setDefault((double)defSpot.sensi);
|
||||||
|
structcol->setDefault((double)defSpot.structcol);
|
||||||
|
blurcolde->setDefault((double)defSpot.blurcolde);
|
||||||
|
softradiuscol->setDefault(defSpot.softradiuscol);
|
||||||
|
blendMask->setDefault((double)defSpot.blendmaskcol);
|
||||||
|
radMask->setDefault(defSpot.radmaskcol);
|
||||||
|
chroMask->setDefault(defSpot.chromaskcol);
|
||||||
|
gamMask->setDefault(defSpot.gammaskcol);
|
||||||
|
sloMask->setDefault(defSpot.slomaskcol);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Note: No need to manage pedited as batch mode is deactivated for Locallab
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocallabColor::adjusterChanged(Adjuster* a, double newval)
|
void LocallabColor::adjusterChanged(Adjuster* a, double newval)
|
||||||
@ -1197,7 +1233,35 @@ void LocallabExposure::write(rtengine::procparams::ProcParams* pp, ParamsEdited*
|
|||||||
|
|
||||||
void LocallabExposure::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
|
void LocallabExposure::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
|
||||||
{
|
{
|
||||||
// TODO
|
const int index = defParams->locallab.selspot;
|
||||||
|
|
||||||
|
if (index < (int)defParams->locallab.spots.size()) {
|
||||||
|
const LocallabParams::LocallabSpot defSpot = defParams->locallab.spots.at(index);
|
||||||
|
|
||||||
|
// Set default values for adjuster widgets
|
||||||
|
laplacexp->setDefault(defSpot.laplacexp);
|
||||||
|
linear->setDefault(defSpot.linear);
|
||||||
|
balanexp->setDefault(defSpot.balanexp);
|
||||||
|
expcomp->setDefault(defSpot.expcomp);
|
||||||
|
hlcompr->setDefault((double)defSpot.hlcompr);
|
||||||
|
hlcomprthresh->setDefault((double)defSpot.hlcomprthresh);
|
||||||
|
black->setDefault((double)defSpot.black);
|
||||||
|
shadex->setDefault((double)defSpot.shadex);
|
||||||
|
shcompr->setDefault((double)defSpot.shcompr);
|
||||||
|
expchroma->setDefault((double)defSpot.expchroma);
|
||||||
|
warm->setDefault((double)defSpot.warm);
|
||||||
|
sensiex->setDefault((double)defSpot.sensiex);
|
||||||
|
structexp->setDefault((double)defSpot.structexp);
|
||||||
|
blurexpde->setDefault((double)defSpot.blurexpde);
|
||||||
|
softradiusexp->setDefault(defSpot.softradiusexp);
|
||||||
|
blendMask->setDefault((double)defSpot.blendmaskexp);
|
||||||
|
radMask->setDefault(defSpot.radmaskexp);
|
||||||
|
chroMask->setDefault(defSpot.chromaskexp);
|
||||||
|
gamMask->setDefault(defSpot.gammaskexp);
|
||||||
|
sloMask->setDefault(defSpot.slomaskexp);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Note: No need to manage pedited as batch mode is deactivated for Locallab
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocallabExposure::adjusterChanged(Adjuster* a, double newval)
|
void LocallabExposure::adjusterChanged(Adjuster* a, double newval)
|
||||||
@ -1632,7 +1696,27 @@ void LocallabShadow::write(rtengine::procparams::ProcParams* pp, ParamsEdited* p
|
|||||||
|
|
||||||
void LocallabShadow::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
|
void LocallabShadow::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
|
||||||
{
|
{
|
||||||
// TODO
|
const int index = defParams->locallab.selspot;
|
||||||
|
|
||||||
|
if (index < (int)defParams->locallab.spots.size()) {
|
||||||
|
const LocallabParams::LocallabSpot defSpot = defParams->locallab.spots.at(index);
|
||||||
|
|
||||||
|
// Set default values for adjuster widgets
|
||||||
|
highlights->setDefault((double)defSpot.highlights);
|
||||||
|
h_tonalwidth->setDefault((double)defSpot.h_tonalwidth);
|
||||||
|
shadows->setDefault((double)defSpot.shadows);
|
||||||
|
s_tonalwidth->setDefault((double)defSpot.s_tonalwidth);
|
||||||
|
sh_radius->setDefault((double)defSpot.sh_radius);
|
||||||
|
sensihs->setDefault((double)defSpot.sensihs);
|
||||||
|
blurSHde->setDefault((double)defSpot.blurSHde);
|
||||||
|
blendMask->setDefault((double)defSpot.blendmaskSH);
|
||||||
|
radMask->setDefault(defSpot.radmaskSH);
|
||||||
|
chroMask->setDefault(defSpot.chromaskSH);
|
||||||
|
gamMask->setDefault(defSpot.gammaskSH);
|
||||||
|
sloMask->setDefault(defSpot.slomaskSH);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Note: No need to manage pedited as batch mode is deactivated for Locallab
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocallabShadow::adjusterChanged(Adjuster* a, double newval)
|
void LocallabShadow::adjusterChanged(Adjuster* a, double newval)
|
||||||
@ -1965,7 +2049,19 @@ void LocallabVibrance::write(rtengine::procparams::ProcParams* pp, ParamsEdited*
|
|||||||
|
|
||||||
void LocallabVibrance::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
|
void LocallabVibrance::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
|
||||||
{
|
{
|
||||||
// TODO
|
const int index = defParams->locallab.selspot;
|
||||||
|
|
||||||
|
if (index < (int)defParams->locallab.spots.size()) {
|
||||||
|
const LocallabParams::LocallabSpot defSpot = defParams->locallab.spots.at(index);
|
||||||
|
|
||||||
|
// Set default values for adjuster and threshold adjuster widgets
|
||||||
|
saturated->setDefault((double)defSpot.saturated);
|
||||||
|
pastels->setDefault((double)defSpot.pastels);
|
||||||
|
psThreshold->setDefault<int>(defSpot.psthreshold);
|
||||||
|
sensiv->setDefault((double)defSpot.sensiv);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Note: No need to manage pedited as batch mode is deactivated for Locallab
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocallabVibrance::adjusterChanged(Adjuster* a, double newval)
|
void LocallabVibrance::adjusterChanged(Adjuster* a, double newval)
|
||||||
@ -2272,7 +2368,18 @@ void LocallabSoft::write(rtengine::procparams::ProcParams* pp, ParamsEdited* ped
|
|||||||
|
|
||||||
void LocallabSoft::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
|
void LocallabSoft::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
|
||||||
{
|
{
|
||||||
// TODO
|
const int index = defParams->locallab.selspot;
|
||||||
|
|
||||||
|
if (index < (int)defParams->locallab.spots.size()) {
|
||||||
|
const LocallabParams::LocallabSpot defSpot = defParams->locallab.spots.at(index);
|
||||||
|
|
||||||
|
// Set default value for adjuster widgets
|
||||||
|
streng->setDefault((double)defSpot.streng);
|
||||||
|
laplace->setDefault(defSpot.laplace);
|
||||||
|
sensisf->setDefault((double)defSpot.sensisf);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Note: No need to manage pedited as batch mode is deactivated for Locallab
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocallabSoft::adjusterChanged(Adjuster* a, double newval)
|
void LocallabSoft::adjusterChanged(Adjuster* a, double newval)
|
||||||
@ -2301,6 +2408,13 @@ void LocallabSoft::adjusterChanged(Adjuster* a, double newval)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LocallabSoft::resetMaskView()
|
||||||
|
{
|
||||||
|
showmasksoftMethodConn.block(true);
|
||||||
|
showmasksoftMethod->set_active(0);
|
||||||
|
showmasksoftMethodConn.block(false);
|
||||||
|
}
|
||||||
|
|
||||||
void LocallabSoft::enabledChanged()
|
void LocallabSoft::enabledChanged()
|
||||||
{
|
{
|
||||||
if (isLocActivated) {
|
if (isLocActivated) {
|
||||||
@ -2469,7 +2583,18 @@ void LocallabBlur::write(rtengine::procparams::ProcParams* pp, ParamsEdited* ped
|
|||||||
|
|
||||||
void LocallabBlur::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
|
void LocallabBlur::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
|
||||||
{
|
{
|
||||||
// TODO
|
const int index = defParams->locallab.selspot;
|
||||||
|
|
||||||
|
if (index < (int)defParams->locallab.spots.size()) {
|
||||||
|
const LocallabParams::LocallabSpot defSpot = defParams->locallab.spots.at(index);
|
||||||
|
|
||||||
|
// Set default value for adjuster widgets
|
||||||
|
radius->setDefault(defSpot.radius);
|
||||||
|
strength->setDefault((double)defSpot.strength);
|
||||||
|
sensibn->setDefault((double)defSpot.sensibn);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Note: No need to manage pedited as batch mode is deactivated for Locallab
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocallabBlur::adjusterChanged(Adjuster* a, double newval)
|
void LocallabBlur::adjusterChanged(Adjuster* a, double newval)
|
||||||
|
@ -95,6 +95,17 @@ public:
|
|||||||
return exp;
|
return exp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Getter/setter for Locallab tool expanded status
|
||||||
|
void setExpanded(bool expanded)
|
||||||
|
{
|
||||||
|
exp->set_expanded(expanded);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool getExpanded()
|
||||||
|
{
|
||||||
|
return exp->get_expanded();
|
||||||
|
}
|
||||||
|
|
||||||
// Setter for Locallab activation indicator
|
// Setter for Locallab activation indicator
|
||||||
void isLocallabActivated(bool cond)
|
void isLocallabActivated(bool cond)
|
||||||
{
|
{
|
||||||
@ -149,6 +160,9 @@ private:
|
|||||||
// Remove button event function
|
// Remove button event function
|
||||||
bool on_remove_change(GdkEventButton* event);
|
bool on_remove_change(GdkEventButton* event);
|
||||||
|
|
||||||
|
// Tool expander event function
|
||||||
|
void foldThemAll(GdkEventButton* event);
|
||||||
|
|
||||||
// To be implemented
|
// To be implemented
|
||||||
virtual void enabledChanged() {};
|
virtual void enabledChanged() {};
|
||||||
};
|
};
|
||||||
@ -376,6 +390,8 @@ public:
|
|||||||
void setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr);
|
void setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr);
|
||||||
void adjusterChanged(Adjuster* a, double newval);
|
void adjusterChanged(Adjuster* a, double newval);
|
||||||
|
|
||||||
|
void resetMaskView();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void enabledChanged();
|
void enabledChanged();
|
||||||
|
|
||||||
|
@ -266,7 +266,29 @@ void LocallabTone::write(rtengine::procparams::ProcParams* pp, ParamsEdited* ped
|
|||||||
|
|
||||||
void LocallabTone::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
|
void LocallabTone::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
|
||||||
{
|
{
|
||||||
// TODO
|
const int index = defParams->locallab.selspot;
|
||||||
|
|
||||||
|
if (index < (int)defParams->locallab.spots.size()) {
|
||||||
|
const LocallabParams::LocallabSpot defSpot = defParams->locallab.spots.at(index);
|
||||||
|
|
||||||
|
// Set default values for adjuster widgets
|
||||||
|
amount->setDefault(defSpot.amount);
|
||||||
|
stren->setDefault(defSpot.stren);
|
||||||
|
gamma->setDefault(defSpot.gamma);
|
||||||
|
satur->setDefault(defSpot.satur);
|
||||||
|
estop->setDefault(defSpot.estop);
|
||||||
|
scaltm->setDefault(defSpot.scaltm);
|
||||||
|
rewei->setDefault((double)defSpot.rewei);
|
||||||
|
softradiustm->setDefault(defSpot.softradiustm);
|
||||||
|
sensitm->setDefault((double)defSpot.sensitm);
|
||||||
|
blendMask->setDefault((double)defSpot.blendmasktm);
|
||||||
|
radMask->setDefault(defSpot.radmasktm);
|
||||||
|
chroMask->setDefault(defSpot.chromasktm);
|
||||||
|
gamMask->setDefault(defSpot.gammasktm);
|
||||||
|
sloMask->setDefault(defSpot.slomasktm);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Note: No need to manage pedited as batch mode is deactivated for Locallab
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocallabTone::adjusterChanged(Adjuster* a, double newval)
|
void LocallabTone::adjusterChanged(Adjuster* a, double newval)
|
||||||
@ -702,7 +724,31 @@ void LocallabRetinex::write(rtengine::procparams::ProcParams* pp, ParamsEdited*
|
|||||||
|
|
||||||
void LocallabRetinex::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
|
void LocallabRetinex::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
|
||||||
{
|
{
|
||||||
// TODO
|
const int index = defParams->locallab.selspot;
|
||||||
|
|
||||||
|
if (index < (int)defParams->locallab.spots.size()) {
|
||||||
|
const LocallabParams::LocallabSpot defSpot = defParams->locallab.spots.at(index);
|
||||||
|
|
||||||
|
// Set default values for adjuster widgets
|
||||||
|
str->setDefault(defSpot.str);
|
||||||
|
chrrt->setDefault(defSpot.chrrt);
|
||||||
|
neigh->setDefault(defSpot.neigh);
|
||||||
|
vart->setDefault(defSpot.vart);
|
||||||
|
scalereti->setDefault(defSpot.scalereti);
|
||||||
|
limd->setDefault(defSpot.limd);
|
||||||
|
darkness->setDefault(defSpot.darkness);
|
||||||
|
lightnessreti->setDefault(defSpot.lightnessreti);
|
||||||
|
dehaz->setDefault((double)defSpot.dehaz);
|
||||||
|
softradiusret->setDefault(defSpot.softradiusret);
|
||||||
|
sensih->setDefault((double)defSpot.sensih);
|
||||||
|
blendMask->setDefault((double)defSpot.blendmaskreti);
|
||||||
|
radMask->setDefault(defSpot.radmaskreti);
|
||||||
|
chroMask->setDefault(defSpot.chromaskreti);
|
||||||
|
gamMask->setDefault(defSpot.gammaskreti);
|
||||||
|
sloMask->setDefault(defSpot.slomaskreti);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Note: No need to manage pedited as batch mode is deactivated for Locallab
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocallabRetinex::adjusterChanged(Adjuster* a, double newval)
|
void LocallabRetinex::adjusterChanged(Adjuster* a, double newval)
|
||||||
@ -1108,7 +1154,22 @@ void LocallabSharp::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pe
|
|||||||
|
|
||||||
void LocallabSharp::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
|
void LocallabSharp::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
|
||||||
{
|
{
|
||||||
// TODO
|
const int index = defParams->locallab.selspot;
|
||||||
|
|
||||||
|
if (index < (int)defParams->locallab.spots.size()) {
|
||||||
|
const LocallabParams::LocallabSpot defSpot = defParams->locallab.spots.at(index);
|
||||||
|
|
||||||
|
// Set default values for adjuster widgets
|
||||||
|
sharcontrast->setDefault((double)defSpot.sharcontrast);
|
||||||
|
sharradius->setDefault(defSpot.sharradius);
|
||||||
|
sharamount->setDefault((double)defSpot.sharamount);
|
||||||
|
shardamping->setDefault((double)defSpot.shardamping);
|
||||||
|
shariter->setDefault((double)defSpot.shariter);
|
||||||
|
sharblur->setDefault(defSpot.sharblur);
|
||||||
|
sensisha->setDefault((double)defSpot.sensisha);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Note: No need to manage pedited as batch mode is deactivated for Locallab
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocallabSharp::adjusterChanged(Adjuster* a, double newval)
|
void LocallabSharp::adjusterChanged(Adjuster* a, double newval)
|
||||||
@ -1360,7 +1421,22 @@ void LocallabContrast::write(rtengine::procparams::ProcParams* pp, ParamsEdited*
|
|||||||
|
|
||||||
void LocallabContrast::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
|
void LocallabContrast::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
|
||||||
{
|
{
|
||||||
// TODO
|
const int index = defParams->locallab.selspot;
|
||||||
|
|
||||||
|
if (index < (int)defParams->locallab.spots.size()) {
|
||||||
|
const LocallabParams::LocallabSpot defSpot = defParams->locallab.spots.at(index);
|
||||||
|
|
||||||
|
// Set default values for adjuster widgets
|
||||||
|
lcradius->setDefault((double)defSpot.lcradius);
|
||||||
|
lcamount->setDefault(defSpot.lcamount);
|
||||||
|
lcdarkness->setDefault(defSpot.lcdarkness);
|
||||||
|
lclightness->setDefault(defSpot.lclightness);
|
||||||
|
levelwav->setDefault(defSpot.levelwav);
|
||||||
|
residcont->setDefault(defSpot.residcont);
|
||||||
|
sensilc->setDefault((double)defSpot.sensilc);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Note: No need to manage pedited as batch mode is deactivated for Locallab
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocallabContrast::adjusterChanged(Adjuster* a, double newval)
|
void LocallabContrast::adjusterChanged(Adjuster* a, double newval)
|
||||||
@ -1680,7 +1756,31 @@ void LocallabCBDL::write(rtengine::procparams::ProcParams* pp, ParamsEdited* ped
|
|||||||
|
|
||||||
void LocallabCBDL::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
|
void LocallabCBDL::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
|
||||||
{
|
{
|
||||||
// TODO
|
const int index = defParams->locallab.selspot;
|
||||||
|
|
||||||
|
if (index < (int)defParams->locallab.spots.size()) {
|
||||||
|
const LocallabParams::LocallabSpot defSpot = defParams->locallab.spots.at(index);
|
||||||
|
|
||||||
|
// Set default values for adjuster widgets
|
||||||
|
for (int i = 0; i < 6; i++) {
|
||||||
|
multiplier[i]->setDefault(defSpot.mult[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
chromacbdl->setDefault(defSpot.chromacbdl);
|
||||||
|
threshold->setDefault(defSpot.threshold);
|
||||||
|
blurcbdl->setDefault(defSpot.blurcbdl);
|
||||||
|
clarityml->setDefault(defSpot.clarityml);
|
||||||
|
contresid->setDefault((double)defSpot.contresid);
|
||||||
|
softradiuscb->setDefault(defSpot.softradiuscb);
|
||||||
|
sensicb->setDefault((double)defSpot.sensicb);
|
||||||
|
blendMask->setDefault((double)defSpot.blendmaskcb);
|
||||||
|
radMask->setDefault(defSpot.radmaskcb);
|
||||||
|
chroMask->setDefault(defSpot.chromaskcb);
|
||||||
|
gamMask->setDefault(defSpot.gammaskcb);
|
||||||
|
sloMask->setDefault(defSpot.slomaskcb);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Note: No need to manage pedited as batch mode is deactivated for Locallab
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocallabCBDL::adjusterChanged(Adjuster* a, double newval)
|
void LocallabCBDL::adjusterChanged(Adjuster* a, double newval)
|
||||||
@ -2013,7 +2113,27 @@ void LocallabDenoise::write(rtengine::procparams::ProcParams* pp, ParamsEdited*
|
|||||||
|
|
||||||
void LocallabDenoise::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
|
void LocallabDenoise::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited)
|
||||||
{
|
{
|
||||||
// TODO
|
const int index = defParams->locallab.selspot;
|
||||||
|
|
||||||
|
if (index < (int)defParams->locallab.spots.size()) {
|
||||||
|
const LocallabParams::LocallabSpot defSpot = defParams->locallab.spots.at(index);
|
||||||
|
|
||||||
|
// Set default values for adjuster widgets
|
||||||
|
noiselumf0->setDefault((double)defSpot.noiselumf0);
|
||||||
|
noiselumf->setDefault((double)defSpot.noiselumf);
|
||||||
|
noiselumf2->setDefault((double)defSpot.noiselumf2);
|
||||||
|
noiselumc->setDefault((double)defSpot.noiselumc);
|
||||||
|
noiselumdetail->setDefault((double)defSpot.noiselumdetail);
|
||||||
|
noiselequal->setDefault((double)defSpot.noiselequal);
|
||||||
|
noisechrof->setDefault((double)defSpot.noisechrof);
|
||||||
|
noisechroc->setDefault((double)defSpot.noisechroc);
|
||||||
|
noisechrodetail->setDefault((double)defSpot.noisechrodetail);
|
||||||
|
adjblur->setDefault((double)defSpot.adjblur);
|
||||||
|
bilateral->setDefault((double)defSpot.bilateral);
|
||||||
|
sensiden->setDefault((double)defSpot.sensiden);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Note: No need to manage pedited as batch mode is deactivated for Locallab
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocallabDenoise::adjusterChanged(Adjuster* a, double newval)
|
void LocallabDenoise::adjusterChanged(Adjuster* a, double newval)
|
||||||
|
@ -718,13 +718,8 @@ void ToolPanelCoordinator::updateToolState()
|
|||||||
temp.push_back(options.tpOpen.at(i + expList.size()));
|
temp.push_back(options.tpOpen.at(i + expList.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
locallab->updateToolState(temp);
|
|
||||||
locallab->setExpanded(true);
|
|
||||||
|
|
||||||
wavelet->updateToolState(temp);
|
wavelet->updateToolState(temp);
|
||||||
retinex->updateToolState(temp);
|
retinex->updateToolState(temp);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -753,7 +748,6 @@ void ToolPanelCoordinator::writeToolExpandedStatus(std::vector<int> &tpOpen)
|
|||||||
tpOpen.push_back(expList.at(i)->get_expanded());
|
tpOpen.push_back(expList.at(i)->get_expanded());
|
||||||
}
|
}
|
||||||
|
|
||||||
locallab->writeOptions(tpOpen);
|
|
||||||
wavelet->writeOptions(tpOpen);
|
wavelet->writeOptions(tpOpen);
|
||||||
retinex->writeOptions(tpOpen);
|
retinex->writeOptions(tpOpen);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user