Simplify interface Process and Mask

This commit is contained in:
Desmis
2016-01-17 18:46:48 +01:00
parent 2d77d783e0
commit c50a4bb7a9
3 changed files with 19 additions and 19 deletions

View File

@@ -1690,7 +1690,7 @@ TP_RETINEX_LABEL_MASK;Mask
TP_RETINEX_LABSPACE;L*a*b* TP_RETINEX_LABSPACE;L*a*b*
TP_RETINEX_LOW;Low TP_RETINEX_LOW;Low
TP_RETINEX_MAP;Mask method 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_NONE;None
TP_RETINEX_MAP_CURV;Curve only TP_RETINEX_MAP_CURV;Curve only
TP_RETINEX_MAP_GAUS;Gaussian mask TP_RETINEX_MAP_GAUS;Gaussian mask

View File

@@ -409,7 +409,7 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e
int mapmet=0; int mapmet=0;
if(deh.mapMethod=="map") mapmet=2; if(deh.mapMethod=="map") mapmet=2;
if(deh.mapMethod=="mapT") mapmet=3; if(deh.mapMethod=="mapT") mapmet=3;
if(deh.mapMethod=="curv") mapmet=1; // if(deh.mapMethod=="curv") mapmet=1;
if(deh.mapMethod=="gaus") mapmet=4; if(deh.mapMethod=="gaus") mapmet=4;
double shradius = (double) deh.radius; double shradius = (double) deh.radius;
// printf("shrad=%f\n",shradius); // printf("shrad=%f\n",shradius);

View File

@@ -191,7 +191,7 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"),
mapMethod = Gtk::manage (new MyComboBoxText ()); mapMethod = Gtk::manage (new MyComboBoxText ());
mapMethod->append_text (M("TP_RETINEX_MAP_NONE")); 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_GAUS"));
mapMethod->append_text (M("TP_RETINEX_MAP_MAPP")); mapMethod->append_text (M("TP_RETINEX_MAP_MAPP"));
mapMethod->append_text (M("TP_RETINEX_MAP_MAPT")); 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 = Gtk::manage (new MyComboBoxText ());
viewMethod->append_text (M("TP_RETINEX_VIEW_NONE")); 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_UNSHARP"));
viewMethod->append_text (M("TP_RETINEX_VIEW_MASK"));
viewMethod->append_text (M("TP_RETINEX_VIEW_TRAN")); viewMethod->append_text (M("TP_RETINEX_VIEW_TRAN"));
viewMethod->append_text (M("TP_RETINEX_VIEW_TRAN2")); viewMethod->append_text (M("TP_RETINEX_VIEW_TRAN2"));
viewMethod->set_active(0); viewMethod->set_active(0);
@@ -743,21 +743,21 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited)
if (pp->retinex.mapMethod == "none") { if (pp->retinex.mapMethod == "none") {
mapMethod->set_active (0); mapMethod->set_active (0);
} else if (pp->retinex.mapMethod == "curv") { // } else if (pp->retinex.mapMethod == "curv") {
mapMethod->set_active (1); // mapMethod->set_active (1);
} else if (pp->retinex.mapMethod == "gaus") { } else if (pp->retinex.mapMethod == "gaus") {
mapMethod->set_active (2); mapMethod->set_active (1);
} else if (pp->retinex.mapMethod == "map") { } else if (pp->retinex.mapMethod == "map") {
mapMethod->set_active (3); mapMethod->set_active (2);
} else if (pp->retinex.mapMethod == "mapT") { } else if (pp->retinex.mapMethod == "mapT") {
mapMethod->set_active (4); mapMethod->set_active (3);
} }
if (pp->retinex.viewMethod == "none") { if (pp->retinex.viewMethod == "none") {
viewMethod->set_active (0); viewMethod->set_active (0);
} else if (pp->retinex.viewMethod == "mask") {
viewMethod->set_active (1);
} else if (pp->retinex.viewMethod == "unsharp") { } else if (pp->retinex.viewMethod == "unsharp") {
viewMethod->set_active (1);
} else if (pp->retinex.viewMethod == "mask") {
viewMethod->set_active (2); viewMethod->set_active (2);
} else if (pp->retinex.viewMethod == "tran") { } else if (pp->retinex.viewMethod == "tran") {
viewMethod->set_active (3); viewMethod->set_active (3);
@@ -898,22 +898,22 @@ void Retinex::write (ProcParams* pp, ParamsEdited* pedited)
if (mapMethod->get_active_row_number() == 0) { if (mapMethod->get_active_row_number() == 0) {
pp->retinex.mapMethod = "none"; pp->retinex.mapMethod = "none";
// } else if (mapMethod->get_active_row_number() == 1) {
// pp->retinex.mapMethod = "curv";
} else if (mapMethod->get_active_row_number() == 1) { } else if (mapMethod->get_active_row_number() == 1) {
pp->retinex.mapMethod = "curv";
} else if (mapMethod->get_active_row_number() == 2) {
pp->retinex.mapMethod = "gaus"; pp->retinex.mapMethod = "gaus";
} else if (mapMethod->get_active_row_number() == 3) { } else if (mapMethod->get_active_row_number() == 2) {
pp->retinex.mapMethod = "map"; pp->retinex.mapMethod = "map";
} else if (mapMethod->get_active_row_number() == 4) { } else if (mapMethod->get_active_row_number() == 3) {
pp->retinex.mapMethod = "mapT"; pp->retinex.mapMethod = "mapT";
} }
if (viewMethod->get_active_row_number() == 0) { if (viewMethod->get_active_row_number() == 0) {
pp->retinex.viewMethod = "none"; pp->retinex.viewMethod = "none";
} else if (viewMethod->get_active_row_number() == 1) { } else if (viewMethod->get_active_row_number() == 1) {
pp->retinex.viewMethod = "mask";
} else if (viewMethod->get_active_row_number() == 2) {
pp->retinex.viewMethod = "unsharp"; pp->retinex.viewMethod = "unsharp";
} else if (viewMethod->get_active_row_number() == 2) {
pp->retinex.viewMethod = "mask";
} else if (viewMethod->get_active_row_number() == 3) { } else if (viewMethod->get_active_row_number() == 3) {
pp->retinex.viewMethod = "tran"; pp->retinex.viewMethod = "tran";
} else if (viewMethod->get_active_row_number() == 4) { } else if (viewMethod->get_active_row_number() == 4) {
@@ -961,14 +961,14 @@ void Retinex::retinexMethodChanged()
void Retinex::mapMethodChanged() 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(); curveEditormap->show();
highlights->show(); highlights->show();
h_tonalwidth->show(); h_tonalwidth->show();
shadows->show(); shadows->show();
s_tonalwidth->show(); s_tonalwidth->show();
radius->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(); curveEditormap->show();
highlights->show(); highlights->show();
h_tonalwidth->show(); h_tonalwidth->show();