From c50a4bb7a933f4ea2075c9af5da2caef885fe2c2 Mon Sep 17 00:00:00 2001 From: Desmis Date: Sun, 17 Jan 2016 18:46:48 +0100 Subject: [PATCH] Simplify interface Process and Mask --- rtdata/languages/default | 2 +- rtengine/ipretinex.cc | 2 +- rtgui/retinex.cc | 34 +++++++++++++++++----------------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index 3a64f25fe..67eeaf8df 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1690,7 +1690,7 @@ TP_RETINEX_LABEL_MASK;Mask TP_RETINEX_LABSPACE;L*a*b* TP_RETINEX_LOW;Low TP_RETINEX_MAP;Mask method -TP_RETINEX_MAP_METHOD_TOOLTIP;Use the mask generated by the Gaussian function (Radius, Method) to reduce halos and artifacts.\n\nCurve only: apply a diagonal contrast curve on the mask.\nBeware of artifacts!\n\nGaussian mask: generate and use a Gaussian blur of the original mask.\nQuick.\n\nSharp mask: generate and use a wavelet on the original mask.\nSlow. +TP_RETINEX_MAP_METHOD_TOOLTIP;Use the mask generated by the Gaussian function (Radius, Method) to reduce halos and artifacts.\n\nCurve apply a diagonal contrast curve on the mask.\nBeware of artifacts!\n\nGaussian mask: generate and use a Gaussian blur of the original mask.\nQuick.\n\nSharp mask: generate and use a wavelet on the original mask.\nSlow. TP_RETINEX_MAP_NONE;None TP_RETINEX_MAP_CURV;Curve only TP_RETINEX_MAP_GAUS;Gaussian mask diff --git a/rtengine/ipretinex.cc b/rtengine/ipretinex.cc index 5995c3e83..0704fc40d 100644 --- a/rtengine/ipretinex.cc +++ b/rtengine/ipretinex.cc @@ -409,7 +409,7 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e int mapmet=0; if(deh.mapMethod=="map") mapmet=2; if(deh.mapMethod=="mapT") mapmet=3; - if(deh.mapMethod=="curv") mapmet=1; + // if(deh.mapMethod=="curv") mapmet=1; if(deh.mapMethod=="gaus") mapmet=4; double shradius = (double) deh.radius; // printf("shrad=%f\n",shradius); diff --git a/rtgui/retinex.cc b/rtgui/retinex.cc index 0a2da4af3..277533ad0 100644 --- a/rtgui/retinex.cc +++ b/rtgui/retinex.cc @@ -191,7 +191,7 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), 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_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")); @@ -211,8 +211,8 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), viewMethod = Gtk::manage (new MyComboBoxText ()); viewMethod->append_text (M("TP_RETINEX_VIEW_NONE")); - viewMethod->append_text (M("TP_RETINEX_VIEW_MASK")); viewMethod->append_text (M("TP_RETINEX_VIEW_UNSHARP")); + viewMethod->append_text (M("TP_RETINEX_VIEW_MASK")); viewMethod->append_text (M("TP_RETINEX_VIEW_TRAN")); viewMethod->append_text (M("TP_RETINEX_VIEW_TRAN2")); viewMethod->set_active(0); @@ -743,21 +743,21 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited) if (pp->retinex.mapMethod == "none") { mapMethod->set_active (0); - } else if (pp->retinex.mapMethod == "curv") { - mapMethod->set_active (1); +// } else if (pp->retinex.mapMethod == "curv") { +// mapMethod->set_active (1); } else if (pp->retinex.mapMethod == "gaus") { - mapMethod->set_active (2); + mapMethod->set_active (1); } else if (pp->retinex.mapMethod == "map") { - mapMethod->set_active (3); + mapMethod->set_active (2); } else if (pp->retinex.mapMethod == "mapT") { - mapMethod->set_active (4); + mapMethod->set_active (3); } if (pp->retinex.viewMethod == "none") { viewMethod->set_active (0); - } else if (pp->retinex.viewMethod == "mask") { - viewMethod->set_active (1); } else if (pp->retinex.viewMethod == "unsharp") { + viewMethod->set_active (1); + } else if (pp->retinex.viewMethod == "mask") { viewMethod->set_active (2); } else if (pp->retinex.viewMethod == "tran") { viewMethod->set_active (3); @@ -898,22 +898,22 @@ void Retinex::write (ProcParams* pp, ParamsEdited* pedited) 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() == 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) { + } else if (mapMethod->get_active_row_number() == 2) { pp->retinex.mapMethod = "map"; - } else if (mapMethod->get_active_row_number() == 4) { + } else if (mapMethod->get_active_row_number() == 3) { pp->retinex.mapMethod = "mapT"; } if (viewMethod->get_active_row_number() == 0) { pp->retinex.viewMethod = "none"; } else if (viewMethod->get_active_row_number() == 1) { - pp->retinex.viewMethod = "mask"; - } else if (viewMethod->get_active_row_number() == 2) { pp->retinex.viewMethod = "unsharp"; + } else if (viewMethod->get_active_row_number() == 2) { + pp->retinex.viewMethod = "mask"; } else if (viewMethod->get_active_row_number() == 3) { pp->retinex.viewMethod = "tran"; } else if (viewMethod->get_active_row_number() == 4) { @@ -961,14 +961,14 @@ void Retinex::retinexMethodChanged() void Retinex::mapMethodChanged() { - if(mapMethod->get_active_row_number() == 1 || mapMethod->get_active_row_number() == 2) { + if(mapMethod->get_active_row_number() == 1 /*|| mapMethod->get_active_row_number() == 2*/) { curveEditormap->show(); highlights->show(); h_tonalwidth->show(); shadows->show(); s_tonalwidth->show(); radius->show(); - } else if(mapMethod->get_active_row_number() == 3 || mapMethod->get_active_row_number() == 4) { + } else if(mapMethod->get_active_row_number() == 2 || mapMethod->get_active_row_number() == 3) { curveEditormap->show(); highlights->show(); h_tonalwidth->show();