Add mask method

This commit is contained in:
Desmis
2015-11-12 08:58:07 +01:00
parent a1fd3d72b2
commit 44490e81ae
19 changed files with 750 additions and 28 deletions

View File

@@ -50,9 +50,11 @@ void ParamsEdited::set (bool v)
toneCurve.hrenabled = v;
toneCurve.method = v;
retinex.cdcurve = v;
retinex.mapcurve = v;
retinex.cdHcurve = v;
retinex.lhcurve = v;
retinex.retinexMethod = v;
retinex.mapMethod = v;
retinex.retinexcolorspace = v;
retinex.gammaretinex = v;
retinex.enabled = v;
@@ -73,6 +75,12 @@ void ParamsEdited::set (bool v)
// retinex.grbl = v;
retinex.medianmap = v;
retinex.transmissionCurve = v;
retinex.highlights = v;
retinex.htonalwidth = v;
retinex.shadows = v;
retinex.stonalwidth = v;
retinex.radius = v;
retinex.retinex = v;
labCurve.lcurve = v;
labCurve.acurve = v;
@@ -530,10 +538,12 @@ void ParamsEdited::initFrom (const std::vector<rtengine::procparams::ProcParams>
toneCurve.hrenabled = toneCurve.hrenabled && p.toneCurve.hrenabled == other.toneCurve.hrenabled;
toneCurve.method = toneCurve.method && p.toneCurve.method == other.toneCurve.method;
retinex.cdcurve = retinex.cdcurve && p.retinex.cdcurve == other.retinex.cdcurve;
retinex.mapcurve = retinex.mapcurve && p.retinex.mapcurve == other.retinex.mapcurve;
retinex.cdHcurve = retinex.cdHcurve && p.retinex.cdHcurve == other.retinex.cdHcurve;
retinex.lhcurve = retinex.lhcurve && p.retinex.lhcurve == other.retinex.lhcurve;
retinex.transmissionCurve = retinex.transmissionCurve && p.retinex.transmissionCurve == other.retinex.transmissionCurve;
retinex.retinexMethod = retinex.retinexMethod && p.retinex.retinexMethod == other.retinex.retinexMethod;
retinex.mapMethod = retinex.mapMethod && p.retinex.mapMethod == other.retinex.mapMethod;
retinex.retinexcolorspace = retinex.retinexcolorspace && p.retinex.retinexcolorspace == other.retinex.retinexcolorspace;
retinex.gammaretinex = retinex.gammaretinex && p.retinex.gammaretinex == other.retinex.gammaretinex;
retinex.str = retinex.str && p.retinex.str == other.retinex.str;
@@ -552,6 +562,12 @@ void ParamsEdited::initFrom (const std::vector<rtengine::procparams::ProcParams>
retinex.baselog = retinex.baselog && p.retinex.baselog == other.retinex.baselog;
// retinex.grbl = retinex.grbl && p.retinex.grbl == other.retinex.grbl;
retinex.medianmap = retinex.medianmap && p.retinex.medianmap == other.retinex.medianmap;
retinex.highlights = retinex.highlights && p.retinex.highlights == other.retinex.highlights;
retinex.htonalwidth = retinex.htonalwidth && p.retinex.htonalwidth == other.retinex.htonalwidth;
retinex.shadows = retinex.shadows && p.retinex.shadows == other.retinex.shadows;
retinex.stonalwidth = retinex.stonalwidth && p.retinex.stonalwidth == other.retinex.stonalwidth;
retinex.radius = retinex.radius && p.retinex.radius == other.retinex.radius;
retinex.enabled = retinex.enabled && p.retinex.enabled == other.retinex.enabled;
labCurve.lcurve = labCurve.lcurve && p.labCurve.lcurve == other.labCurve.lcurve;
labCurve.acurve = labCurve.acurve && p.labCurve.acurve == other.labCurve.acurve;
@@ -1052,6 +1068,10 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
toEdit.retinex.cdcurve = mods.retinex.cdcurve;
}
if (retinex.mapcurve) {
toEdit.retinex.mapcurve = mods.retinex.mapcurve;
}
if (retinex.cdHcurve) {
toEdit.retinex.cdHcurve = mods.retinex.cdHcurve;
}
@@ -1068,6 +1088,10 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
toEdit.retinex.retinexMethod = mods.retinex.retinexMethod;
}
if (retinex.mapMethod) {
toEdit.retinex.mapMethod = mods.retinex.mapMethod;
}
if (retinex.retinexcolorspace) {
toEdit.retinex.retinexcolorspace = mods.retinex.retinexcolorspace;
}
@@ -1144,6 +1168,28 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
toEdit.retinex.vart = dontforceSet && options.baBehav[ADDSET_RETI_VART] ? toEdit.retinex.vart + mods.retinex.vart : mods.retinex.vart;
}
if (retinex.highlights) {
toEdit.retinex.highlights = mods.retinex.highlights;
}
if (retinex.htonalwidth) {
toEdit.retinex.htonalwidth = mods.retinex.htonalwidth;
}
if (retinex.shadows) {
toEdit.retinex.shadows = mods.retinex.shadows;
}
if (retinex.stonalwidth) {
toEdit.retinex.stonalwidth = mods.retinex.stonalwidth;
}
if (retinex.radius) {
toEdit.retinex.radius = mods.retinex.radius;
}
if (labCurve.lcurve) {
toEdit.labCurve.lcurve = mods.labCurve.lcurve;
}

View File

@@ -70,6 +70,7 @@ public:
bool gain;
bool offs;
bool retinexMethod;
bool mapMethod;
bool retinexcolorspace;
bool gammaretinex;
bool vart;
@@ -80,11 +81,18 @@ public:
bool method;
bool transmissionCurve;
bool cdcurve;
bool mapcurve;
bool cdHcurve;
bool lhcurve;
bool retinex;
bool medianmap;
bool isUnchanged() const;
bool highlights;
bool htonalwidth;
bool shadows;
bool stonalwidth;
bool radius;
};

View File

@@ -83,6 +83,17 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"),
curveEditorGDH->curveListComplete();
curveEditormap = new CurveEditorGroup (options.lastRetinexDir, M("TP_RETINEX_CONTEDIT_MAP"));
curveEditormap->setCurveListener (this);
mapshape = static_cast<DiagonalCurveEditor*>(curveEditormap->addCurve(CT_Diagonal, M("TP_RETINEX_CURVEEDITOR_MAP")));
mapshape->setTooltip(M("TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP"));
std::vector<GradientMilestone> milestones222;
milestones222.push_back( GradientMilestone(0., 0., 0., 0.) );
milestones222.push_back( GradientMilestone(1., 1., 1., 1.) );
mapshape->setBottomBarBgGradient(milestones222);
mapshape->setLeftBarBgGradient(milestones222);
curveEditormap->curveListComplete();
// Transmission map curve
transmissionCurveEditorG = new CurveEditorGroup (options.lastRetinexDir, M("TP_RETINEX_TRANSMISSION"));
@@ -163,6 +174,28 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"),
limd->set_tooltip_markup (M("TP_RETINEX_THRESHOLD_TOOLTIP"));
baselog->set_tooltip_markup (M("TP_RETINEX_BASELOG_TOOLTIP"));
mapbox = Gtk::manage (new Gtk::HBox ());
labmap = Gtk::manage (new Gtk::Label (M("TP_RETINEX_MAP") + ":"));
mapbox->pack_start (*labmap, Gtk::PACK_SHRINK, 1);
mapMethod = Gtk::manage (new MyComboBoxText ());
mapMethod->append_text (M("TP_RETINEX_MAP_NONE"));
mapMethod->append_text (M("TP_RETINEX_MAP_CURV"));
mapMethod->append_text (M("TP_RETINEX_MAP_GAUS"));
mapMethod->append_text (M("TP_RETINEX_MAP_MAPP"));
mapMethod->append_text (M("TP_RETINEX_MAP_MAPT"));
mapMethod->set_active(0);
mapMethodConn = mapMethod->signal_changed().connect ( sigc::mem_fun(*this, &Retinex::mapMethodChanged) );
mapMethod->set_tooltip_markup (M("TP_RETINEX_MAP_METHOD_TOOLTIP"));
highlights = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_HIGHLIGHTS"), 0, 100, 1, 0));
h_tonalwidth = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_HLTONALW"), 10, 100, 1, 80));
shadows = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_SHADOWS"), 0, 100, 1, 0));
s_tonalwidth = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_SHTONALW"), 10, 100, 1, 80));
radius = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_RADIUS"), 5, 100, 1, 40));
curveEditorGH = new CurveEditorGroup (options.lastRetinexDir, M("TP_RETINEX_CONTEDIT_LH"));
curveEditorGH->setCurveListener (this);
@@ -241,6 +274,24 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"),
settingsVBox->pack_start (*limd);
limd->show ();
settingsVBox->pack_start (*Gtk::manage (new Gtk::HSeparator()));
mapbox->pack_start(*mapMethod);
settingsVBox->pack_start(*mapbox);
settingsVBox->pack_start (*curveEditormap, Gtk::PACK_SHRINK, 4);
curveEditormap->show();
settingsVBox->pack_start (*highlights);
highlights->show();
settingsVBox->pack_start (*h_tonalwidth);
h_tonalwidth->show();
settingsVBox->pack_start (*shadows);
shadows->show();
settingsVBox->pack_start (*s_tonalwidth);
s_tonalwidth->show();
settingsVBox->pack_start (*radius);
radius->show();
// settingsVBox->pack_start (*highl);
// highl->show ();
@@ -249,6 +300,7 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"),
// settingsVBox->pack_start (*grbl);
// grbl->show ();
settingsVBox->pack_start (*Gtk::manage (new Gtk::HSeparator()));
settingsVBox->pack_start( *transmissionCurveEditorG, Gtk::PACK_SHRINK, 2);
transmissionCurveEditorG->show();
@@ -354,6 +406,32 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"),
baselog->delay = 200;
}
radius->setAdjusterListener (this);
if (radius->delay < 200) {
radius->delay = 200;
}
highlights->setAdjusterListener (this);
if (highlights->delay < 200) {
highlights->delay = 200;
}
h_tonalwidth->setAdjusterListener (this);
if (h_tonalwidth->delay < 200) {
h_tonalwidth->delay = 200;
}
shadows->setAdjusterListener (this);
if (shadows->delay < 200) {
shadows->delay = 200;
}
s_tonalwidth->setAdjusterListener (this);
if (s_tonalwidth->delay < 200) {
s_tonalwidth->delay = 200;
}
/* grbl->setAdjusterListener (this);
if (grbl->delay < 200) {
@@ -378,6 +456,7 @@ Retinex::~Retinex()
delete curveEditorGDH;
delete transmissionCurveEditorG;
delete curveEditorGH;
delete curveEditormap;
}
void Retinex::neutral_pressed ()
@@ -396,10 +475,20 @@ void Retinex::neutral_pressed ()
baselog->resetValue(false);
gam->resetValue(false);
slope->resetValue(false);
highlights->resetValue(false);
h_tonalwidth->resetValue(false);
shadows->resetValue(false);
s_tonalwidth->resetValue(false);
radius->resetValue(false);
mapMethod->set_active(0);
retinexMethod->set_active(2);
retinexcolorspace->set_active(0);
gammaretinex->set_active(0);
transmissionShape->reset();
cdshape->reset();
cdshapeH->reset();
lhshape->reset();
mapshape->reset();
}
void Retinex::foldAllButMe (GdkEventButton* event, MyExpander *expander)
@@ -509,6 +598,7 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited)
retinexMethodConn.block(true);
retinexColorSpaceConn.block(true);
gammaretinexConn.block(true);
mapMethodConn.block(true);
if (pedited) {
@@ -528,12 +618,21 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited)
// grbl->setEditedState (pedited->retinex.grbl ? Edited : UnEdited);
set_inconsistent (multiImage && !pedited->retinex.enabled);
medianmap->set_inconsistent (!pedited->retinex.medianmap);
radius->setEditedState (pedited->retinex.radius ? Edited : UnEdited);
highlights->setEditedState (pedited->retinex.highlights ? Edited : UnEdited);
h_tonalwidth->setEditedState (pedited->retinex.htonalwidth ? Edited : UnEdited);
shadows->setEditedState (pedited->retinex.shadows ? Edited : UnEdited);
s_tonalwidth->setEditedState (pedited->retinex.stonalwidth ? Edited : UnEdited);
if (!pedited->retinex.retinexMethod) {
retinexMethod->set_active_text(M("GENERAL_UNCHANGED"));
}
if (!pedited->retinex.mapMethod) {
mapMethod->set_active_text(M("GENERAL_UNCHANGED"));
}
if (!pedited->retinex.retinexcolorspace) {
retinexcolorspace->set_active_text(M("GENERAL_UNCHANGED"));
}
@@ -546,6 +645,7 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited)
cdshapeH->setUnChanged (!pedited->retinex.cdHcurve);
transmissionShape->setUnChanged (!pedited->retinex.transmissionCurve);
lhshape->setUnChanged (!pedited->retinex.lhcurve);
mapshape->setUnChanged (!pedited->retinex.mapcurve);
}
@@ -563,6 +663,13 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited)
slope->setValue (pp->retinex.slope);
highl->setValue (pp->retinex.highl);
baselog->setValue (pp->retinex.baselog);
radius->setValue (pp->retinex.radius);
highlights->setValue (pp->retinex.highlights);
h_tonalwidth->setValue (pp->retinex.htonalwidth);
shadows->setValue (pp->retinex.shadows);
s_tonalwidth->setValue (pp->retinex.stonalwidth);
// grbl->setValue (pp->retinex.grbl);
if(pp->retinex.iter == 1) {
grad->set_sensitive(false);
@@ -593,6 +700,19 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited)
// retinexMethod->set_active (4);
}
if (pp->retinex.mapMethod == "none") {
mapMethod->set_active (0);
} else if (pp->retinex.mapMethod == "curv") {
mapMethod->set_active (1);
} else if (pp->retinex.mapMethod == "gaus") {
mapMethod->set_active (2);
} else if (pp->retinex.mapMethod == "map") {
mapMethod->set_active (3);
} else if (pp->retinex.mapMethod == "mapT") {
mapMethod->set_active (4);
}
if (pp->retinex.retinexcolorspace == "Lab") {
retinexcolorspace->set_active (0);
} else if (pp->retinex.retinexcolorspace == "HSLLOG") {
@@ -616,6 +736,7 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited)
retinexMethodChanged ();
retinexColorSpaceChanged();
gammaretinexChanged();
mapMethodChanged ();
medianmapConn.block(true);
medianmapChanged ();
@@ -624,10 +745,12 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited)
cdshape->setCurve (pp->retinex.cdcurve);
cdshapeH->setCurve (pp->retinex.cdHcurve);
lhshape->setCurve (pp->retinex.lhcurve);
mapshape->setCurve (pp->retinex.mapcurve);
retinexMethodConn.block(false);
retinexColorSpaceConn.block(false);
gammaretinexConn.block(false);
mapMethodConn.block(false);
transmissionShape->setCurve (pp->retinex.transmissionCurve);
@@ -657,14 +780,22 @@ void Retinex::write (ProcParams* pp, ParamsEdited* pedited)
pp->retinex.cdcurve = cdshape->getCurve ();
pp->retinex.lhcurve = lhshape->getCurve ();
pp->retinex.cdHcurve = cdshapeH->getCurve ();
pp->retinex.mapcurve = mapshape->getCurve ();
pp->retinex.transmissionCurve = transmissionShape->getCurve ();
pp->retinex.enabled = getEnabled();
pp->retinex.medianmap = medianmap->get_active();
pp->retinex.radius = (int)radius->getValue ();
pp->retinex.highlights = (int)highlights->getValue ();
pp->retinex.htonalwidth = (int)h_tonalwidth->getValue ();
pp->retinex.shadows = (int)shadows->getValue ();
pp->retinex.stonalwidth = (int)s_tonalwidth->getValue ();
if (pedited) {
pedited->retinex.retinexMethod = retinexMethod->get_active_text() != M("GENERAL_UNCHANGED");
pedited->retinex.retinexcolorspace = retinexcolorspace->get_active_text() != M("GENERAL_UNCHANGED");
pedited->retinex.gammaretinex = gammaretinex->get_active_text() != M("GENERAL_UNCHANGED");
pedited->retinex.mapMethod = mapMethod->get_active_text() != M("GENERAL_UNCHANGED");
//%%%%%%%%%%%%%%%%%%%%%%
pedited->retinex.str = str->getEditedState ();
@@ -685,10 +816,17 @@ void Retinex::write (ProcParams* pp, ParamsEdited* pedited)
pedited->retinex.cdcurve = !cdshape->isUnChanged ();
pedited->retinex.cdHcurve = !cdshapeH->isUnChanged ();
pedited->retinex.transmissionCurve = !transmissionShape->isUnChanged ();
pedited->retinex.mapcurve = !mapshape->isUnChanged ();
pedited->retinex.enabled = !get_inconsistent();
pedited->retinex.medianmap = !medianmap->get_inconsistent();
pedited->retinex.lhcurve = !lhshape->isUnChanged ();
pedited->retinex.radius = radius->getEditedState ();
pedited->retinex.highlights = highlights->getEditedState ();
pedited->retinex.htonalwidth = h_tonalwidth->getEditedState ();
pedited->retinex.shadows = shadows->getEditedState ();
pedited->retinex.stonalwidth = s_tonalwidth->getEditedState ();
}
if (retinexMethod->get_active_row_number() == 0) {
@@ -703,6 +841,18 @@ void Retinex::write (ProcParams* pp, ParamsEdited* pedited)
// pp->retinex.retinexMethod = "highliplus";
}
if (mapMethod->get_active_row_number() == 0) {
pp->retinex.mapMethod = "none";
} else if (mapMethod->get_active_row_number() == 1) {
pp->retinex.mapMethod = "curv";
} else if (mapMethod->get_active_row_number() == 2) {
pp->retinex.mapMethod = "gaus";
} else if (mapMethod->get_active_row_number() == 3) {
pp->retinex.mapMethod = "map";
} else if (mapMethod->get_active_row_number() == 4) {
pp->retinex.mapMethod = "mapT";
}
if (retinexcolorspace->get_active_row_number() == 0) {
pp->retinex.retinexcolorspace = "Lab";
} else if (retinexcolorspace->get_active_row_number() == 1) {
@@ -739,6 +889,40 @@ void Retinex::retinexMethodChanged()
}
}
void Retinex::mapMethodChanged()
{
if(mapMethod->get_active_row_number() >= 1) {
curveEditormap->show();
highlights->show();
h_tonalwidth->show();
shadows->show();
s_tonalwidth->show();
radius->show();
/* } else if(mapMethod->get_active_row_number() == 1) {
curveEditormap->show();
highlights->hide();
h_tonalwidth->hide();
shadows->hide();
s_tonalwidth->hide();
radius->hide();*/
} else {
curveEditormap->hide();
highlights->hide();
h_tonalwidth->hide();
shadows->hide();
s_tonalwidth->hide();
radius->hide();
}
if (listener) {
listener->panelChanged (EvmapMethod, mapMethod->get_active_text ());
}
}
void Retinex::ColorSpaceUpdateUI ()
{
if (!batchMode) {
@@ -838,6 +1022,12 @@ void Retinex::setDefaults (const ProcParams* defParams, const ParamsEdited* pedi
gam->setDefault (defParams->retinex.gam);
slope->setDefault (defParams->retinex.slope);
radius->setDefault (defParams->retinex.radius);
highlights->setDefault (defParams->retinex.highlights);
h_tonalwidth->setDefault (defParams->retinex.htonalwidth);
shadows->setDefault (defParams->retinex.shadows);
s_tonalwidth->setDefault (defParams->retinex.stonalwidth);
if (pedited) {
neigh->setDefaultEditedState (pedited->retinex.neigh ? Edited : UnEdited);
gain->setDefaultEditedState (pedited->retinex.gain ? Edited : UnEdited);
@@ -855,6 +1045,12 @@ void Retinex::setDefaults (const ProcParams* defParams, const ParamsEdited* pedi
gam->setDefaultEditedState (pedited->retinex.gam ? Edited : UnEdited);
slope->setDefaultEditedState (pedited->retinex.slope ? Edited : UnEdited);
radius->setDefaultEditedState (pedited->retinex.radius ? Edited : UnEdited);
highlights->setDefaultEditedState (pedited->retinex.highlights ? Edited : UnEdited);
h_tonalwidth->setDefaultEditedState (pedited->retinex.htonalwidth ? Edited : UnEdited);
shadows->setDefaultEditedState (pedited->retinex.shadows ? Edited : UnEdited);
s_tonalwidth->setDefaultEditedState (pedited->retinex.stonalwidth ? Edited : UnEdited);
} else {
neigh->setDefaultEditedState (Irrelevant);
gain->setDefaultEditedState (Irrelevant);
@@ -871,6 +1067,13 @@ void Retinex::setDefaults (const ProcParams* defParams, const ParamsEdited* pedi
grads->setDefaultEditedState (Irrelevant);
gam->setDefaultEditedState (Irrelevant);
slope->setDefaultEditedState (Irrelevant);
radius->setDefaultEditedState (Irrelevant);
highlights->setDefaultEditedState (Irrelevant);
h_tonalwidth->setDefaultEditedState (Irrelevant);
shadows->setDefaultEditedState (Irrelevant);
s_tonalwidth->setDefaultEditedState (Irrelevant);
}
}
@@ -935,8 +1138,20 @@ void Retinex::adjusterChanged (Adjuster* a, double newval)
listener->panelChanged (EvLgam, gam->getTextValue());
} else if (a == slope) {
listener->panelChanged (EvLslope, slope->getTextValue());
} else if (a == highlights) {
listener->panelChanged (EvLhighlights, highlights->getTextValue());
} else if (a == h_tonalwidth) {
listener->panelChanged (EvLh_tonalwidth, h_tonalwidth->getTextValue());
} else if (a == shadows) {
listener->panelChanged (EvLshadows, shadows->getTextValue());
} else if (a == s_tonalwidth) {
listener->panelChanged (EvLs_tonalwidth, s_tonalwidth->getTextValue());
} else if (a == radius) {
listener->panelChanged (EvLradius, radius->getTextValue());
}
}
@@ -947,6 +1162,7 @@ void Retinex::autoOpenCurve ()
cdshapeH->openIfNonlinear();
transmissionShape->openIfNonlinear();
lhshape->openIfNonlinear();
mapshape->openIfNonlinear();
}
@@ -962,6 +1178,8 @@ void Retinex::curveChanged (CurveEditor* ce)
listener->panelChanged (EvRetinextransmission, M("HISTORY_CUSTOMCURVE"));
} else if (ce == lhshape) {
listener->panelChanged (EvRetinexlhcurve, M("HISTORY_CUSTOMCURVE"));
} else if (ce == mapshape) {
listener->panelChanged (EvRetinexmapcurve, M("HISTORY_CUSTOMCURVE"));
}
}
}
@@ -998,6 +1216,8 @@ void Retinex::trimValues (rtengine::procparams::ProcParams* pp)
// grbl->trimValue(pp->retinex.grbl);
gam->trimValue(pp->retinex.gam);
slope->trimValue(pp->retinex.slope);
highlights->trimValue(pp->retinex.highlights);
shadows->trimValue(pp->retinex.shadows);
}
void Retinex::updateCurveBackgroundHistogram (LUTu & histToneCurve, LUTu & histLCurve, LUTu & histCCurve,/* LUTu & histCLurve, LUTu & histLLCurve,*/ LUTu & histLCAM, LUTu & histCCAM, LUTu & histRed, LUTu & histGreen, LUTu & histBlue, LUTu & histLuma, LUTu & histLRETI)
@@ -1070,11 +1290,19 @@ void Retinex::setBatchMode (bool batchMode)
limd->showEditedCB ();
highl->showEditedCB ();
baselog->showEditedCB ();
radius->showEditedCB ();
highlights->showEditedCB ();
h_tonalwidth->showEditedCB ();
shadows->showEditedCB ();
s_tonalwidth->showEditedCB ();
// grbl->showEditedCB ();
curveEditorGD->setBatchMode (batchMode);
curveEditorGDH->setBatchMode (batchMode);
transmissionCurveEditorG->setBatchMode (batchMode);
curveEditorGH->setBatchMode (batchMode);
curveEditormap->setBatchMode (batchMode);
}

View File

@@ -22,6 +22,7 @@ protected:
CurveEditorGroup* curveEditorGD;
CurveEditorGroup* curveEditorGDH;
CurveEditorGroup* curveEditorGH;
CurveEditorGroup* curveEditormap;
Adjuster* str;
Adjuster* scal;
Adjuster* grad;
@@ -37,10 +38,19 @@ protected:
Adjuster* grbl;
Adjuster* gam;
Adjuster* slope;
Adjuster* highlights;
Adjuster* h_tonalwidth;
Adjuster* shadows;
Adjuster* s_tonalwidth;
Adjuster* radius;
MyExpander* expsettings;
Gtk::Label* labmdh;
Gtk::HBox* dhbox;
Gtk::HBox* mapbox;
Gtk::Label* labmap;
Gtk::Label* labgam;
Gtk::HBox* gambox;
Gtk::Button* neutral;
@@ -49,6 +59,7 @@ protected:
MyComboBoxText* retinexMethod;
MyComboBoxText* retinexcolorspace;
MyComboBoxText* gammaretinex;
MyComboBoxText* mapMethod;
Gtk::CheckButton* medianmap;
double nextmin;
double nextmax;
@@ -65,8 +76,9 @@ protected:
DiagonalCurveEditor* cdshape;
DiagonalCurveEditor* cdshapeH;
DiagonalCurveEditor* mapshape;
CurveEditorGroup* transmissionCurveEditorG;
sigc::connection retinexMethodConn, neutralconn;
sigc::connection retinexMethodConn, neutralconn, mapMethodConn;
sigc::connection retinexColorSpaceConn;
sigc::connection gammaretinexConn;
FlatCurveEditor* transmissionShape;
@@ -95,6 +107,7 @@ public:
void enabledChanged ();
void curveChanged (CurveEditor* ce);
void retinexMethodChanged();
void mapMethodChanged();
void retinexColorSpaceChanged();
void gammaretinexChanged();
void ColorSpaceUpdateUI();