remove unused retinex.gain and retinex.baselog

This commit is contained in:
heckflosse 2017-07-09 21:37:39 +02:00
parent 22692f5a04
commit f98ef980d9
10 changed files with 7 additions and 135 deletions

View File

@ -144,8 +144,6 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e
constexpr float eps = 2.f; constexpr float eps = 2.f;
bool useHsl = deh.retinexcolorspace == "HSLLOG"; bool useHsl = deh.retinexcolorspace == "HSLLOG";
bool useHslLin = deh.retinexcolorspace == "HSLLIN"; bool useHslLin = deh.retinexcolorspace == "HSLLIN";
float gain2 = (float) deh.gain / 100.f; //def =1 not use
gain2 = useHslLin ? gain2 * 0.5f : gain2;
float offse = (float) deh.offs; //def = 0 not use float offse = (float) deh.offs; //def = 0 not use
int iter = deh.iter; int iter = deh.iter;
int gradient = deh.scal; int gradient = deh.scal;
@ -160,23 +158,15 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e
limD *= useHslLin ? 10.f : 1.f; limD *= useHslLin ? 10.f : 1.f;
float ilimD = 1.f / limD; float ilimD = 1.f / limD;
float hig = ((float) deh.highl) / 100.f; float hig = ((float) deh.highl) / 100.f;
float elogt;
float hl = deh.baselog;
scal = deh.skal; scal = deh.skal;
if(hl >= 2.71828f) {
elogt = 2.71828f + SQR(SQR(hl - 2.71828f));
} else {
elogt = hl;
}
int H_L = height; int H_L = height;
int W_L = width; int W_L = width;
float *tran[H_L] ALIGNED16; float *tran[H_L] ALIGNED16;
float *tranBuffer = nullptr; float *tranBuffer = nullptr;
elogt = 2.71828f;//disabled baselog constexpr float elogt = 2.71828f;
bool lhutili = false; bool lhutili = false;
FlatCurve* shcurve = new FlatCurve(deh.lhcurve); //curve L=f(H) FlatCurve* shcurve = new FlatCurve(deh.lhcurve); //curve L=f(H)
@ -661,7 +651,6 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e
delta = 1.0f; delta = 1.0f;
} }
// float cdfactor = gain2 * 32768.f / delta;
float cdfactor = 32768.f / delta; float cdfactor = 32768.f / delta;
maxCD = -9999999.f; maxCD = -9999999.f;
minCD = 9999999.f; minCD = 9999999.f;

View File

@ -451,7 +451,7 @@ enum ProcEvent {
EvLgam = 421, EvLgam = 421,
EvLslope = 422, EvLslope = 422,
EvLhighl = 423, EvLhighl = 423,
EvLbaselog = 424, // EvLbaselog = 424, -- can be reused --
EvRetinexlhcurve = 425, EvRetinexlhcurve = 425,
EvOIntent = 426, EvOIntent = 426,
EvMonitorTransform = 427, EvMonitorTransform = 427,

View File

@ -173,7 +173,6 @@ void RetinexParams::setDefaults()
gam = 1.30; gam = 1.30;
slope = 3.; slope = 3.;
neigh = 80; neigh = 80;
gain = 50;
offs = 0; offs = 0;
vart = 200; vart = 200;
limd = 8; limd = 8;
@ -184,7 +183,6 @@ void RetinexParams::setDefaults()
stonalwidth = 80; stonalwidth = 80;
radius = 40; radius = 40;
baselog = 2.71828;
skal = 3; skal = 3;
retinexMethod = "high"; retinexMethod = "high";
mapMethod = "none"; mapMethod = "none";
@ -1573,10 +1571,6 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b
keyFile.set_integer ("Retinex", "Neigh", retinex.neigh); keyFile.set_integer ("Retinex", "Neigh", retinex.neigh);
} }
if (!pedited || pedited->retinex.gain) {
keyFile.set_integer ("Retinex", "Gain", retinex.gain);
}
if (!pedited || pedited->retinex.offs) { if (!pedited || pedited->retinex.offs) {
keyFile.set_integer ("Retinex", "Offs", retinex.offs); keyFile.set_integer ("Retinex", "Offs", retinex.offs);
} }
@ -1593,10 +1587,6 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b
keyFile.set_integer ("Retinex", "highl", retinex.highl); keyFile.set_integer ("Retinex", "highl", retinex.highl);
} }
if (!pedited || pedited->retinex.baselog) {
keyFile.set_double ("Retinex", "baselog", retinex.baselog);
}
if (!pedited || pedited->retinex.skal) { if (!pedited || pedited->retinex.skal) {
keyFile.set_integer ("Retinex", "skal", retinex.skal); keyFile.set_integer ("Retinex", "skal", retinex.skal);
} }
@ -4210,14 +4200,6 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited)
} }
} }
if (keyFile.has_key ("Retinex", "Gain")) {
retinex.gain = keyFile.get_integer ("Retinex", "Gain");
if (pedited) {
pedited->retinex.gain = true;
}
}
if (keyFile.has_key ("Retinex", "Offs")) { if (keyFile.has_key ("Retinex", "Offs")) {
retinex.offs = keyFile.get_integer ("Retinex", "Offs"); retinex.offs = keyFile.get_integer ("Retinex", "Offs");
@ -4250,14 +4232,6 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited)
} }
} }
if (keyFile.has_key ("Retinex", "baselog")) {
retinex.baselog = keyFile.get_double ("Retinex", "baselog");
if (pedited) {
pedited->retinex.baselog = true;
}
}
if (keyFile.has_key ("Retinex", "skal")) { if (keyFile.has_key ("Retinex", "skal")) {
retinex.skal = keyFile.get_integer ("Retinex", "skal"); retinex.skal = keyFile.get_integer ("Retinex", "skal");
@ -8043,7 +8017,6 @@ bool ProcParams::operator== (const ProcParams& other)
&& retinex.gam == other.retinex.gam && retinex.gam == other.retinex.gam
&& retinex.slope == other.retinex.slope && retinex.slope == other.retinex.slope
&& retinex.neigh == other.retinex.neigh && retinex.neigh == other.retinex.neigh
&& retinex.gain == other.retinex.gain
&& retinex.limd == other.retinex.limd && retinex.limd == other.retinex.limd
&& retinex.highl == other.retinex.highl && retinex.highl == other.retinex.highl
&& retinex.highlights == other.retinex.highlights && retinex.highlights == other.retinex.highlights
@ -8051,8 +8024,6 @@ bool ProcParams::operator== (const ProcParams& other)
&& retinex.shadows == other.retinex.shadows && retinex.shadows == other.retinex.shadows
&& retinex.stonalwidth == other.retinex.stonalwidth && retinex.stonalwidth == other.retinex.stonalwidth
&& retinex.radius == other.retinex.radius && retinex.radius == other.retinex.radius
&& retinex.baselog == other.retinex.baselog
&& retinex.skal == other.retinex.skal && retinex.skal == other.retinex.skal
&& retinex.offs == other.retinex.offs && retinex.offs == other.retinex.offs
&& retinex.retinexMethod == other.retinex.retinexMethod && retinex.retinexMethod == other.retinex.retinexMethod

View File

@ -312,7 +312,6 @@ public:
double gam; double gam;
double slope; double slope;
int neigh; int neigh;
int gain;
int offs; int offs;
int highlights; int highlights;
int htonalwidth; int htonalwidth;
@ -328,7 +327,6 @@ public:
int vart; int vart;
int limd; int limd;
int highl; int highl;
double baselog;
int skal; int skal;
bool medianmap; bool medianmap;
RetinexParams (); RetinexParams ();

View File

@ -451,7 +451,7 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
DEMOSAIC, // EvLgam DEMOSAIC, // EvLgam
DEMOSAIC, // EvLslope DEMOSAIC, // EvLslope
RETINEX, // EvLhighl RETINEX, // EvLhighl
DEMOSAIC, // EvLbaselog 0, // --unused--
DEMOSAIC, // EvRetinexlhcurve DEMOSAIC, // EvRetinexlhcurve
OUTPUTPROFILE, // EvOIntent OUTPUTPROFILE, // EvOIntent
MONITORTRANSFORM, // EvMonitorTransform: no history message MONITORTRANSFORM, // EvMonitorTransform: no history message

View File

@ -171,7 +171,7 @@ void BatchToolPanelCoordinator::initSession ()
blackwhite->setAdjusterBehavior (false, false); blackwhite->setAdjusterBehavior (false, false);
colortoning->setAdjusterBehavior (false, false, false, false, false); colortoning->setAdjusterBehavior (false, false, false, false, false);
filmSimulation->setAdjusterBehavior(false); filmSimulation->setAdjusterBehavior(false);
retinex->setAdjusterBehavior (false, false, false, false, false, false, false, false); retinex->setAdjusterBehavior (false, false, false, false, false, false, false);
shadowshighlights->setAdjusterBehavior (false, false, false); shadowshighlights->setAdjusterBehavior (false, false, false);
dirpyrequalizer->setAdjusterBehavior (false, false, false); dirpyrequalizer->setAdjusterBehavior (false, false, false);
@ -208,7 +208,7 @@ void BatchToolPanelCoordinator::initSession ()
// colortoning->setAdjusterBehavior (options.baBehav[ADDSET_COLORTONING_SPLIT], options.baBehav[ADDSET_COLORTONING_SATTHRESHOLD], options.baBehav[ADDSET_COLORTONING_SATOPACITY], options.baBehav[ADDSET_COLORTONING_STRPROTECT], options.baBehav[ADDSET_COLORTONING_BALANCE]); // colortoning->setAdjusterBehavior (options.baBehav[ADDSET_COLORTONING_SPLIT], options.baBehav[ADDSET_COLORTONING_SATTHRESHOLD], options.baBehav[ADDSET_COLORTONING_SATOPACITY], options.baBehav[ADDSET_COLORTONING_STRPROTECT], options.baBehav[ADDSET_COLORTONING_BALANCE]);
colortoning->setAdjusterBehavior (options.baBehav[ADDSET_COLORTONING_SPLIT], options.baBehav[ADDSET_COLORTONING_SATTHRESHOLD], options.baBehav[ADDSET_COLORTONING_SATOPACITY], options.baBehav[ADDSET_COLORTONING_STRENGTH], options.baBehav[ADDSET_COLORTONING_BALANCE]); colortoning->setAdjusterBehavior (options.baBehav[ADDSET_COLORTONING_SPLIT], options.baBehav[ADDSET_COLORTONING_SATTHRESHOLD], options.baBehav[ADDSET_COLORTONING_SATOPACITY], options.baBehav[ADDSET_COLORTONING_STRENGTH], options.baBehav[ADDSET_COLORTONING_BALANCE]);
filmSimulation->setAdjusterBehavior(options.baBehav[ADDSET_FILMSIMULATION_STRENGTH]); filmSimulation->setAdjusterBehavior(options.baBehav[ADDSET_FILMSIMULATION_STRENGTH]);
retinex->setAdjusterBehavior (options.baBehav[ADDSET_RETI_STR], options.baBehav[ADDSET_RETI_NEIGH], options.baBehav[ADDSET_RETI_LIMD], options.baBehav[ADDSET_RETI_GAIN], options.baBehav[ADDSET_RETI_OFFS], options.baBehav[ADDSET_RETI_VART], options.baBehav[ADDSET_RETI_GAM], options.baBehav[ADDSET_RETI_SLO]); retinex->setAdjusterBehavior (options.baBehav[ADDSET_RETI_STR], options.baBehav[ADDSET_RETI_NEIGH], options.baBehav[ADDSET_RETI_LIMD], options.baBehav[ADDSET_RETI_OFFS], options.baBehav[ADDSET_RETI_VART], options.baBehav[ADDSET_RETI_GAM], options.baBehav[ADDSET_RETI_SLO]);
chmixer->setAdjusterBehavior (options.baBehav[ADDSET_CHMIXER] ); chmixer->setAdjusterBehavior (options.baBehav[ADDSET_CHMIXER] );
blackwhite->setAdjusterBehavior (options.baBehav[ADDSET_BLACKWHITE_HUES], options.baBehav[ADDSET_BLACKWHITE_GAMMA]); blackwhite->setAdjusterBehavior (options.baBehav[ADDSET_BLACKWHITE_HUES], options.baBehav[ADDSET_BLACKWHITE_GAMMA]);
@ -602,10 +602,6 @@ void BatchToolPanelCoordinator::initSession ()
pparams.retinex.limd = 0; pparams.retinex.limd = 0;
} }
if (options.baBehav[ADDSET_RETI_GAIN]) {
pparams.retinex.gain = 0;
}
if (options.baBehav[ADDSET_RETI_OFFS]) { if (options.baBehav[ADDSET_RETI_OFFS]) {
pparams.retinex.offs = 0; pparams.retinex.offs = 0;
} }

View File

@ -67,12 +67,10 @@ void ParamsEdited::set (bool v)
retinex.gam = v; retinex.gam = v;
retinex.slope = v; retinex.slope = v;
retinex.neigh = v; retinex.neigh = v;
retinex.gain = v;
retinex.offs = v; retinex.offs = v;
retinex.vart = v; retinex.vart = v;
retinex.limd = v; retinex.limd = v;
retinex.highl = v; retinex.highl = v;
retinex.baselog = v;
retinex.skal = v; retinex.skal = v;
retinex.medianmap = v; retinex.medianmap = v;
retinex.transmissionCurve = v; retinex.transmissionCurve = v;
@ -592,12 +590,10 @@ void ParamsEdited::initFrom (const std::vector<rtengine::procparams::ProcParams>
retinex.gam = retinex.gam && p.retinex.gam == other.retinex.gam; retinex.gam = retinex.gam && p.retinex.gam == other.retinex.gam;
retinex.slope = retinex.slope && p.retinex.slope == other.retinex.slope; retinex.slope = retinex.slope && p.retinex.slope == other.retinex.slope;
retinex.neigh = retinex.neigh && p.retinex.neigh == other.retinex.neigh; retinex.neigh = retinex.neigh && p.retinex.neigh == other.retinex.neigh;
retinex.gain = retinex.gain && p.retinex.gain == other.retinex.gain;
retinex.offs = retinex.offs && p.retinex.offs == other.retinex.offs; retinex.offs = retinex.offs && p.retinex.offs == other.retinex.offs;
retinex.vart = retinex.vart && p.retinex.vart == other.retinex.vart; retinex.vart = retinex.vart && p.retinex.vart == other.retinex.vart;
retinex.limd = retinex.limd && p.retinex.limd == other.retinex.limd; retinex.limd = retinex.limd && p.retinex.limd == other.retinex.limd;
retinex.highl = retinex.highl && p.retinex.highl == other.retinex.highl; retinex.highl = retinex.highl && p.retinex.highl == other.retinex.highl;
retinex.baselog = retinex.baselog && p.retinex.baselog == other.retinex.baselog;
retinex.skal = retinex.skal && p.retinex.skal == other.retinex.skal; retinex.skal = retinex.skal && p.retinex.skal == other.retinex.skal;
retinex.medianmap = retinex.medianmap && p.retinex.medianmap == other.retinex.medianmap; retinex.medianmap = retinex.medianmap && p.retinex.medianmap == other.retinex.medianmap;
retinex.highlights = retinex.highlights && p.retinex.highlights == other.retinex.highlights; retinex.highlights = retinex.highlights && p.retinex.highlights == other.retinex.highlights;
@ -1227,18 +1223,10 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
toEdit.retinex.highl = mods.retinex.highl; toEdit.retinex.highl = mods.retinex.highl;
} }
if (retinex.baselog) {
toEdit.retinex.baselog = mods.retinex.baselog;
}
if (retinex.skal) { if (retinex.skal) {
toEdit.retinex.skal = mods.retinex.skal; toEdit.retinex.skal = mods.retinex.skal;
} }
if (retinex.gain) {
toEdit.retinex.gain = dontforceSet && options.baBehav[ADDSET_RETI_GAIN] ? toEdit.retinex.gain + mods.retinex.gain : mods.retinex.gain;
}
if (retinex.offs) { if (retinex.offs) {
toEdit.retinex.offs = dontforceSet && options.baBehav[ADDSET_RETI_OFFS] ? toEdit.retinex.offs + mods.retinex.offs : mods.retinex.offs; toEdit.retinex.offs = dontforceSet && options.baBehav[ADDSET_RETI_OFFS] ? toEdit.retinex.offs + mods.retinex.offs : mods.retinex.offs;
} }

View File

@ -67,7 +67,6 @@ public:
bool gam; bool gam;
bool slope; bool slope;
bool neigh; bool neigh;
bool gain;
bool offs; bool offs;
bool retinexMethod; bool retinexMethod;
bool mapMethod; bool mapMethod;

View File

@ -450,42 +450,20 @@ Retinex::Retinex () : FoldableToolPanel (this, "retinex", M ("TP_RETINEX_LABEL")
gainGrid->attach ( *gaintransmissionCurve, 0, 0, 1, 1); gainGrid->attach ( *gaintransmissionCurve, 0, 0, 1, 1);
gaintransmissionCurve->show(); gaintransmissionCurve->show();
gain = Gtk::manage (new Adjuster (M ("TP_RETINEX_GAIN"), 20, 200, 1, 50)); // Unused !?
setExpandAlignProperties (gain, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
gain->set_tooltip_markup (M ("TP_RETINEX_GAIN_TOOLTIP"));
offs = Gtk::manage (new Adjuster (M ("TP_RETINEX_OFFSET"), -1000, 5000, 1, 0)); offs = Gtk::manage (new Adjuster (M ("TP_RETINEX_OFFSET"), -1000, 5000, 1, 0));
setExpandAlignProperties (offs, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); setExpandAlignProperties (offs, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
gainGrid->attach (*offs, 0, 1, 1, 1); gainGrid->attach (*offs, 0, 1, 1, 1);
offs->show (); offs->show ();
//-------------
gainFrame->add (*gainGrid); gainFrame->add (*gainGrid);
settingsGrid->attach (*gainFrame, 0, 6, 1, 1); settingsGrid->attach (*gainFrame, 0, 6, 1, 1);
baselog = Gtk::manage (new Adjuster (M ("TP_RETINEX_BASELOG"), 1., 10., 1., 3.)); // Unused !?
setExpandAlignProperties (baselog, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
baselog->set_tooltip_markup (M ("TP_RETINEX_BASELOG_TOOLTIP"));
// settingsGrid->attach(*baselog, 0, 7, 1, 1);
// baselog->show ();
//--------------------------
expsettings->add (*settingsGrid, false); expsettings->add (*settingsGrid, false);
expsettings->setLevel (2); expsettings->setLevel (2);
pack_start (*expsettings); pack_start (*expsettings);
// End of SETTINGS Expander ======================================================= // End of SETTINGS Expander =======================================================
// Reset button // Reset button
neutral = Gtk::manage (new Gtk::Button (M ("TP_RETINEX_NEUTRAL"))); neutral = Gtk::manage (new Gtk::Button (M ("TP_RETINEX_NEUTRAL")));
@ -553,12 +531,6 @@ Retinex::Retinex () : FoldableToolPanel (this, "retinex", M ("TP_RETINEX_LABEL")
neigh->delay = 200; neigh->delay = 200;
} }
gain->setAdjusterListener (this);
if (gain->delay < 200) {
gain->delay = 200;
}
offs->setAdjusterListener (this); offs->setAdjusterListener (this);
if (offs->delay < 200) { if (offs->delay < 200) {
@ -583,13 +555,6 @@ Retinex::Retinex () : FoldableToolPanel (this, "retinex", M ("TP_RETINEX_LABEL")
highl->delay = 200; highl->delay = 200;
} }
baselog->setAdjusterListener (this);
if (baselog->delay < 200) {
baselog->delay = 200;
}
radius->setAdjusterListener (this); radius->setAdjusterListener (this);
if (radius->delay < 200) { if (radius->delay < 200) {
@ -649,7 +614,6 @@ Retinex::~Retinex()
void Retinex::neutral_pressed () void Retinex::neutral_pressed ()
{ {
neigh->resetValue (false); neigh->resetValue (false);
gain->resetValue (false);
offs->resetValue (false); offs->resetValue (false);
str->resetValue (false); str->resetValue (false);
scal->resetValue (false); scal->resetValue (false);
@ -659,7 +623,6 @@ void Retinex::neutral_pressed ()
vart->resetValue (false); vart->resetValue (false);
limd->resetValue (false); limd->resetValue (false);
highl->resetValue (false); highl->resetValue (false);
baselog->resetValue (false);
gam->resetValue (false); gam->resetValue (false);
slope->resetValue (false); slope->resetValue (false);
highlights->resetValue (false); highlights->resetValue (false);
@ -795,12 +758,10 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited)
neigh->setEditedState (pedited->retinex.neigh ? Edited : UnEdited); neigh->setEditedState (pedited->retinex.neigh ? Edited : UnEdited);
gam->setEditedState (pedited->retinex.gam ? Edited : UnEdited); gam->setEditedState (pedited->retinex.gam ? Edited : UnEdited);
slope->setEditedState (pedited->retinex.slope ? Edited : UnEdited); slope->setEditedState (pedited->retinex.slope ? Edited : UnEdited);
gain->setEditedState (pedited->retinex.gain ? Edited : UnEdited);
offs->setEditedState (pedited->retinex.offs ? Edited : UnEdited); offs->setEditedState (pedited->retinex.offs ? Edited : UnEdited);
vart->setEditedState (pedited->retinex.vart ? Edited : UnEdited); vart->setEditedState (pedited->retinex.vart ? Edited : UnEdited);
limd->setEditedState (pedited->retinex.limd ? Edited : UnEdited); limd->setEditedState (pedited->retinex.limd ? Edited : UnEdited);
highl->setEditedState (pedited->retinex.highl ? Edited : UnEdited); highl->setEditedState (pedited->retinex.highl ? Edited : UnEdited);
baselog->setEditedState (pedited->retinex.baselog ? Edited : UnEdited);
skal->setEditedState (pedited->retinex.skal ? Edited : UnEdited); skal->setEditedState (pedited->retinex.skal ? Edited : UnEdited);
set_inconsistent (multiImage && !pedited->retinex.enabled); set_inconsistent (multiImage && !pedited->retinex.enabled);
medianmap->set_inconsistent (!pedited->retinex.medianmap); medianmap->set_inconsistent (!pedited->retinex.medianmap);
@ -841,7 +802,6 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited)
} }
neigh->setValue (pp->retinex.neigh); neigh->setValue (pp->retinex.neigh);
gain->setValue (pp->retinex.gain);
offs->setValue (pp->retinex.offs); offs->setValue (pp->retinex.offs);
str->setValue (pp->retinex.str); str->setValue (pp->retinex.str);
scal->setValue (pp->retinex.scal); scal->setValue (pp->retinex.scal);
@ -853,7 +813,6 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited)
gam->setValue (pp->retinex.gam); gam->setValue (pp->retinex.gam);
slope->setValue (pp->retinex.slope); slope->setValue (pp->retinex.slope);
highl->setValue (pp->retinex.highl); highl->setValue (pp->retinex.highl);
baselog->setValue (pp->retinex.baselog);
radius->setValue (pp->retinex.radius); radius->setValue (pp->retinex.radius);
highlights->setValue (pp->retinex.highlights); highlights->setValue (pp->retinex.highlights);
@ -977,12 +936,10 @@ void Retinex::write (ProcParams* pp, ParamsEdited* pedited)
pp->retinex.gam = gam->getValue (); pp->retinex.gam = gam->getValue ();
pp->retinex.slope = slope->getValue (); pp->retinex.slope = slope->getValue ();
pp->retinex.neigh = neigh->getValue (); pp->retinex.neigh = neigh->getValue ();
pp->retinex.gain = (int)gain->getValue ();
pp->retinex.offs = (int)offs->getValue (); pp->retinex.offs = (int)offs->getValue ();
pp->retinex.vart = (int)vart->getValue (); pp->retinex.vart = (int)vart->getValue ();
pp->retinex.limd = (int)limd->getValue (); pp->retinex.limd = (int)limd->getValue ();
pp->retinex.highl = (int)highl->getValue (); pp->retinex.highl = (int)highl->getValue ();
pp->retinex.baselog = baselog->getValue ();
pp->retinex.skal = (int)skal->getValue (); pp->retinex.skal = (int)skal->getValue ();
pp->retinex.cdcurve = cdshape->getCurve (); pp->retinex.cdcurve = cdshape->getCurve ();
pp->retinex.lhcurve = lhshape->getCurve (); pp->retinex.lhcurve = lhshape->getCurve ();
@ -1015,12 +972,10 @@ void Retinex::write (ProcParams* pp, ParamsEdited* pedited)
pedited->retinex.gam = gam->getEditedState (); pedited->retinex.gam = gam->getEditedState ();
pedited->retinex.slope = slope->getEditedState (); pedited->retinex.slope = slope->getEditedState ();
pedited->retinex.neigh = neigh->getEditedState (); pedited->retinex.neigh = neigh->getEditedState ();
pedited->retinex.gain = gain->getEditedState ();
pedited->retinex.offs = offs->getEditedState (); pedited->retinex.offs = offs->getEditedState ();
pedited->retinex.vart = vart->getEditedState (); pedited->retinex.vart = vart->getEditedState ();
pedited->retinex.limd = limd->getEditedState (); pedited->retinex.limd = limd->getEditedState ();
pedited->retinex.highl = highl->getEditedState (); pedited->retinex.highl = highl->getEditedState ();
pedited->retinex.baselog = baselog->getEditedState ();
pedited->retinex.skal = skal->getEditedState (); pedited->retinex.skal = skal->getEditedState ();
pedited->retinex.cdcurve = !cdshape->isUnChanged (); pedited->retinex.cdcurve = !cdshape->isUnChanged ();
pedited->retinex.cdHcurve = !cdshapeH->isUnChanged (); pedited->retinex.cdHcurve = !cdshapeH->isUnChanged ();
@ -1153,7 +1108,6 @@ void Retinex::viewMethodChanged()
if (!batchMode) { if (!batchMode) {
if (viewMethod->get_active_row_number() == 1 || viewMethod->get_active_row_number() == 2) { if (viewMethod->get_active_row_number() == 1 || viewMethod->get_active_row_number() == 2) {
//vart->hide(); //vart->hide();
gain->hide();
offs->hide(); offs->hide();
limd->hide(); limd->hide();
transmissionCurveEditorG->hide(); transmissionCurveEditorG->hide();
@ -1169,7 +1123,6 @@ void Retinex::viewMethodChanged()
curveEditorGH->hide(); curveEditorGH->hide();
} else if (viewMethod->get_active_row_number() == 3 || viewMethod->get_active_row_number() == 4) { } else if (viewMethod->get_active_row_number() == 3 || viewMethod->get_active_row_number() == 4) {
gain->hide();
offs->hide(); offs->hide();
transmissionCurveEditorG->show(); transmissionCurveEditorG->show();
//vart->hide(); //vart->hide();
@ -1177,7 +1130,6 @@ void Retinex::viewMethodChanged()
} else { } else {
vart->show(); vart->show();
neigh->show(); neigh->show();
gain->show();
offs->show(); offs->show();
limd->show(); limd->show();
transmissionCurveEditorG->show(); transmissionCurveEditorG->show();
@ -1210,15 +1162,12 @@ void Retinex::ColorSpaceUpdateUI ()
if (retinexcolorspace->get_active_row_number() == 0) { if (retinexcolorspace->get_active_row_number() == 0) {
curveEditorGD->show(); curveEditorGD->show();
curveEditorGDH->hide(); curveEditorGDH->hide();
baselog->show();
} else if (retinexcolorspace->get_active_row_number() == 1) { } else if (retinexcolorspace->get_active_row_number() == 1) {
curveEditorGD->hide(); curveEditorGD->hide();
curveEditorGDH->show(); curveEditorGDH->show();
baselog->show();
} else if (retinexcolorspace->get_active_row_number() == 2) { } else if (retinexcolorspace->get_active_row_number() == 2) {
curveEditorGD->hide(); curveEditorGD->hide();
curveEditorGDH->show(); curveEditorGDH->show();
baselog->hide();
} }
} }
} }
@ -1286,7 +1235,6 @@ void Retinex::setDefaults (const ProcParams* defParams, const ParamsEdited* pedi
{ {
neigh->setDefault (defParams->retinex.neigh); neigh->setDefault (defParams->retinex.neigh);
gain->setDefault (defParams->retinex.gain);
offs->setDefault (defParams->retinex.offs); offs->setDefault (defParams->retinex.offs);
str->setDefault (defParams->retinex.str); str->setDefault (defParams->retinex.str);
scal->setDefault (defParams->retinex.scal); scal->setDefault (defParams->retinex.scal);
@ -1296,7 +1244,6 @@ void Retinex::setDefaults (const ProcParams* defParams, const ParamsEdited* pedi
vart->setDefault (defParams->retinex.vart); vart->setDefault (defParams->retinex.vart);
limd->setDefault (defParams->retinex.limd); limd->setDefault (defParams->retinex.limd);
highl->setDefault (defParams->retinex.highl); highl->setDefault (defParams->retinex.highl);
baselog->setDefault (defParams->retinex.baselog);
skal->setDefault (defParams->retinex.skal); skal->setDefault (defParams->retinex.skal);
gam->setDefault (defParams->retinex.gam); gam->setDefault (defParams->retinex.gam);
slope->setDefault (defParams->retinex.slope); slope->setDefault (defParams->retinex.slope);
@ -1309,7 +1256,6 @@ void Retinex::setDefaults (const ProcParams* defParams, const ParamsEdited* pedi
if (pedited) { if (pedited) {
neigh->setDefaultEditedState (pedited->retinex.neigh ? Edited : UnEdited); neigh->setDefaultEditedState (pedited->retinex.neigh ? Edited : UnEdited);
gain->setDefaultEditedState (pedited->retinex.gain ? Edited : UnEdited);
offs->setDefaultEditedState (pedited->retinex.offs ? Edited : UnEdited); offs->setDefaultEditedState (pedited->retinex.offs ? Edited : UnEdited);
str->setDefaultEditedState (pedited->retinex.str ? Edited : UnEdited); str->setDefaultEditedState (pedited->retinex.str ? Edited : UnEdited);
scal->setDefaultEditedState (pedited->retinex.scal ? Edited : UnEdited); scal->setDefaultEditedState (pedited->retinex.scal ? Edited : UnEdited);
@ -1319,7 +1265,6 @@ void Retinex::setDefaults (const ProcParams* defParams, const ParamsEdited* pedi
vart->setDefaultEditedState (pedited->retinex.vart ? Edited : UnEdited); vart->setDefaultEditedState (pedited->retinex.vart ? Edited : UnEdited);
limd->setDefaultEditedState (pedited->retinex.limd ? Edited : UnEdited); limd->setDefaultEditedState (pedited->retinex.limd ? Edited : UnEdited);
highl->setDefaultEditedState (pedited->retinex.highl ? Edited : UnEdited); highl->setDefaultEditedState (pedited->retinex.highl ? Edited : UnEdited);
baselog->setDefaultEditedState (pedited->retinex.baselog ? Edited : UnEdited);
skal->setDefaultEditedState (pedited->retinex.skal ? Edited : UnEdited); skal->setDefaultEditedState (pedited->retinex.skal ? Edited : UnEdited);
gam->setDefaultEditedState (pedited->retinex.gam ? Edited : UnEdited); gam->setDefaultEditedState (pedited->retinex.gam ? Edited : UnEdited);
slope->setDefaultEditedState (pedited->retinex.slope ? Edited : UnEdited); slope->setDefaultEditedState (pedited->retinex.slope ? Edited : UnEdited);
@ -1332,12 +1277,10 @@ void Retinex::setDefaults (const ProcParams* defParams, const ParamsEdited* pedi
} else { } else {
neigh->setDefaultEditedState (Irrelevant); neigh->setDefaultEditedState (Irrelevant);
gain->setDefaultEditedState (Irrelevant);
offs->setDefaultEditedState (Irrelevant); offs->setDefaultEditedState (Irrelevant);
vart->setDefaultEditedState (Irrelevant); vart->setDefaultEditedState (Irrelevant);
limd->setDefaultEditedState (Irrelevant); limd->setDefaultEditedState (Irrelevant);
highl->setDefaultEditedState (Irrelevant); highl->setDefaultEditedState (Irrelevant);
baselog->setDefaultEditedState (Irrelevant);
skal->setDefaultEditedState (Irrelevant); skal->setDefaultEditedState (Irrelevant);
str->setDefaultEditedState (Irrelevant); str->setDefaultEditedState (Irrelevant);
scal->setDefaultEditedState (Irrelevant); scal->setDefaultEditedState (Irrelevant);
@ -1356,12 +1299,11 @@ void Retinex::setDefaults (const ProcParams* defParams, const ParamsEdited* pedi
} }
} }
void Retinex::setAdjusterBehavior (bool strAdd, bool neighAdd, bool limdAdd, bool gainAdd, bool offsAdd, bool vartAdd, bool gamAdd, bool slopeAdd) void Retinex::setAdjusterBehavior (bool strAdd, bool neighAdd, bool limdAdd, bool offsAdd, bool vartAdd, bool gamAdd, bool slopeAdd)
{ {
str->setAddMode (strAdd); str->setAddMode (strAdd);
neigh->setAddMode (neighAdd); neigh->setAddMode (neighAdd);
limd->setAddMode (limdAdd); limd->setAddMode (limdAdd);
gain->setAddMode (gainAdd);
offs->setAddMode (offsAdd); offs->setAddMode (offsAdd);
vart->setAddMode (vartAdd); vart->setAddMode (vartAdd);
gam->setAddMode (gamAdd); gam->setAddMode (gamAdd);
@ -1400,8 +1342,6 @@ void Retinex::adjusterChanged (Adjuster* a, double newval)
listener->panelChanged (EvLgrad, grad->getTextValue()); listener->panelChanged (EvLgrad, grad->getTextValue());
} else if (a == grads) { } else if (a == grads) {
listener->panelChanged (EvLgrads, grads->getTextValue()); listener->panelChanged (EvLgrads, grads->getTextValue());
} else if (a == gain) {
listener->panelChanged (EvLgain, gain->getTextValue());
} else if (a == offs) { } else if (a == offs) {
listener->panelChanged (EvLoffs, offs->getTextValue()); listener->panelChanged (EvLoffs, offs->getTextValue());
} else if (a == vart) { } else if (a == vart) {
@ -1410,8 +1350,6 @@ void Retinex::adjusterChanged (Adjuster* a, double newval)
listener->panelChanged (EvLlimd, limd->getTextValue()); listener->panelChanged (EvLlimd, limd->getTextValue());
} else if (a == highl) { } else if (a == highl) {
listener->panelChanged (EvLhighl, highl->getTextValue()); listener->panelChanged (EvLhighl, highl->getTextValue());
} else if (a == baselog) {
listener->panelChanged (EvLbaselog, baselog->getTextValue());
} else if (a == skal) { } else if (a == skal) {
listener->panelChanged (EvLskal, skal->getTextValue()); listener->panelChanged (EvLskal, skal->getTextValue());
} else if (a == gam) { } else if (a == gam) {
@ -1490,12 +1428,10 @@ void Retinex::trimValues (rtengine::procparams::ProcParams* pp)
grad->trimValue (pp->retinex.grad); grad->trimValue (pp->retinex.grad);
grads->trimValue (pp->retinex.grads); grads->trimValue (pp->retinex.grads);
neigh->trimValue (pp->retinex.neigh); neigh->trimValue (pp->retinex.neigh);
gain->trimValue (pp->retinex.gain);
offs->trimValue (pp->retinex.offs); offs->trimValue (pp->retinex.offs);
vart->trimValue (pp->retinex.vart); vart->trimValue (pp->retinex.vart);
limd->trimValue (pp->retinex.limd); limd->trimValue (pp->retinex.limd);
highl->trimValue (pp->retinex.highl); highl->trimValue (pp->retinex.highl);
baselog->trimValue (pp->retinex.baselog);
gam->trimValue (pp->retinex.gam); gam->trimValue (pp->retinex.gam);
slope->trimValue (pp->retinex.slope); slope->trimValue (pp->retinex.slope);
highlights->trimValue (pp->retinex.highlights); highlights->trimValue (pp->retinex.highlights);
@ -1560,7 +1496,6 @@ void Retinex::setBatchMode (bool batchMode)
{ {
ToolPanel::setBatchMode (batchMode); ToolPanel::setBatchMode (batchMode);
neigh->showEditedCB (); neigh->showEditedCB ();
gain->showEditedCB ();
offs->showEditedCB (); offs->showEditedCB ();
str->showEditedCB (); str->showEditedCB ();
scal->showEditedCB (); scal->showEditedCB ();
@ -1572,8 +1507,6 @@ void Retinex::setBatchMode (bool batchMode)
vart->showEditedCB (); vart->showEditedCB ();
limd->showEditedCB (); limd->showEditedCB ();
highl->showEditedCB (); highl->showEditedCB ();
baselog->showEditedCB ();
radius->showEditedCB (); radius->showEditedCB ();
highlights->showEditedCB (); highlights->showEditedCB ();
h_tonalwidth->showEditedCB (); h_tonalwidth->showEditedCB ();

View File

@ -31,12 +31,10 @@ protected:
Adjuster* grads; Adjuster* grads;
Adjuster* iter; Adjuster* iter;
Adjuster* neigh; Adjuster* neigh;
Adjuster* gain;
Adjuster* offs; Adjuster* offs;
Adjuster* vart; Adjuster* vart;
Adjuster* limd; Adjuster* limd;
Adjuster* highl; Adjuster* highl;
Adjuster* baselog;
Adjuster* skal; Adjuster* skal;
Adjuster* gam; Adjuster* gam;
Adjuster* slope; Adjuster* slope;
@ -124,7 +122,7 @@ public:
void ColorSpaceUpdateUI(); void ColorSpaceUpdateUI();
void writeOptions (std::vector<int> &tpOpen); void writeOptions (std::vector<int> &tpOpen);
void updateToolState (std::vector<int> &tpOpen); void updateToolState (std::vector<int> &tpOpen);
void setAdjusterBehavior (bool strAdd, bool neighAdd, bool limdAdd, bool gainAdd, bool offsAdd, bool vartAdd, bool gamAdd, bool slopeAdd); void setAdjusterBehavior (bool strAdd, bool neighAdd, bool limdAdd, bool offsAdd, bool vartAdd, bool gamAdd, bool slopeAdd);
void 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); void 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);
virtual void colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller* caller); virtual void colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller* caller);