raw ca correction: first try to avoid colour shift, #4777
This commit is contained in:
@@ -28,6 +28,7 @@ RAWCACorr::RAWCACorr () : FoldableToolPanel(this, "rawcacorrection", M("TP_CHROM
|
||||
{
|
||||
auto m = ProcEventMapper::getInstance();
|
||||
EvPreProcessCAAutoiterations = m->newEvent(DARKFRAME, "HISTORY_MSG_RAWCACORR_AUTOIT");
|
||||
EvPreProcessCAColourshift = m->newEvent(DARKFRAME, "HISTORY_MSG_RAWCACORR_COLOURSHIFT");
|
||||
|
||||
Gtk::Image* icaredL = Gtk::manage (new RTImage ("circle-red-cyan-small.png"));
|
||||
Gtk::Image* icaredR = Gtk::manage (new RTImage ("circle-cyan-red-small.png"));
|
||||
@@ -66,6 +67,11 @@ RAWCACorr::RAWCACorr () : FoldableToolPanel(this, "rawcacorrection", M("TP_CHROM
|
||||
pack_start( *caRed, Gtk::PACK_SHRINK, 4);
|
||||
pack_start( *caBlue, Gtk::PACK_SHRINK, 4);
|
||||
|
||||
caAvoidcolourshift = Gtk::manage (new CheckBox(M("TP_RAWCACORR_AVOIDCOLORSHIFT"), multiImage));
|
||||
caAvoidcolourshift->setCheckBoxListener (this);
|
||||
pack_start( *caAvoidcolourshift, Gtk::PACK_SHRINK, 4);
|
||||
|
||||
|
||||
}
|
||||
|
||||
void RAWCACorr::read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited)
|
||||
@@ -74,7 +80,8 @@ void RAWCACorr::read(const rtengine::procparams::ProcParams* pp, const ParamsEdi
|
||||
|
||||
if(pedited ) {
|
||||
caAutocorrect->setEdited(pedited->raw.ca_autocorrect);
|
||||
caAutoiterations->setEditedState( pedited->raw.cared ? Edited : UnEdited );
|
||||
caAvoidcolourshift->setEdited(pedited->raw.ca_avoidcolourshift);
|
||||
caAutoiterations->setEditedState( pedited->raw.caautoiterations ? Edited : UnEdited );
|
||||
caRed->setEditedState( pedited->raw.cared ? Edited : UnEdited );
|
||||
caBlue->setEditedState( pedited->raw.cablue ? Edited : UnEdited );
|
||||
}
|
||||
@@ -85,6 +92,7 @@ void RAWCACorr::read(const rtengine::procparams::ProcParams* pp, const ParamsEdi
|
||||
caBlue->set_sensitive(!pp->raw.ca_autocorrect);
|
||||
|
||||
caAutocorrect->setValue(pp->raw.ca_autocorrect);
|
||||
caAvoidcolourshift->setValue(pp->raw.ca_avoidcolourshift);
|
||||
caAutoiterations->setValue (pp->raw.caautoiterations);
|
||||
caRed->setValue (pp->raw.cared);
|
||||
caBlue->setValue (pp->raw.cablue);
|
||||
@@ -95,12 +103,14 @@ void RAWCACorr::read(const rtengine::procparams::ProcParams* pp, const ParamsEdi
|
||||
void RAWCACorr::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedited)
|
||||
{
|
||||
pp->raw.ca_autocorrect = caAutocorrect->getLastActive();
|
||||
pp->raw.ca_avoidcolourshift = caAvoidcolourshift->getLastActive();
|
||||
pp->raw.caautoiterations = caAutoiterations->getValue();
|
||||
pp->raw.cared = caRed->getValue();
|
||||
pp->raw.cablue = caBlue->getValue();
|
||||
|
||||
if (pedited) {
|
||||
pedited->raw.ca_autocorrect = !caAutocorrect->get_inconsistent();
|
||||
pedited->raw.ca_avoidcolourshift = !caAvoidcolourshift->get_inconsistent();
|
||||
pedited->raw.caautoiterations = caAutoiterations->getEditedState ();
|
||||
pedited->raw.cared = caRed->getEditedState ();
|
||||
pedited->raw.cablue = caBlue->getEditedState ();
|
||||
@@ -136,6 +146,10 @@ void RAWCACorr::checkBoxToggled (CheckBox* c, CheckValue newval)
|
||||
if (listener) {
|
||||
listener->panelChanged (EvPreProcessAutoCA, caAutocorrect->getLastActive() ? M("GENERAL_ENABLED") : M("GENERAL_DISABLED"));
|
||||
}
|
||||
} else if (c == caAvoidcolourshift) {
|
||||
if (listener) {
|
||||
listener->panelChanged (EvPreProcessCAColourshift, caAvoidcolourshift->getLastActive() ? M("GENERAL_ENABLED") : M("GENERAL_DISABLED"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user