Merge branch 'amaze_vng4' of https://github.com/Beep6581/RawTherapee into amaze_vng4

This commit is contained in:
heckflosse
2018-06-02 17:22:32 +02:00
6 changed files with 71 additions and 90 deletions

View File

@@ -736,6 +736,7 @@ HISTORY_MSG_LOCALCONTRAST_LIGHTNESS;Local Contrast - Lightness
HISTORY_MSG_LOCALCONTRAST_RADIUS;Local Contrast - Radius
HISTORY_MSG_METADATA_MODE;Metadata copy mode
HISTORY_MSG_MICROCONTRAST_CONTRAST;Microcontrast - Contrast threshold
HISTORY_MSG_PIXELSHIFT_DEMOSAIC;PS - Demosaic method for motion
HISTORY_MSG_PREPROCESS_LINEDENOISE_DIRECTION;Line noise filter direction
HISTORY_MSG_PREPROCESS_PDAFLINESFILTER;PDAF lines filter
HISTORY_MSG_PRSHARPEN_CONTRAST;PRS - Contrast threshold

View File

@@ -113,18 +113,24 @@ BayerProcess::BayerProcess () : FoldableToolPanel(this, "bayerprocess", M("TP_RA
dualDemosaicOptions->pack_start(*dualDemosaicContrast);
pack_start( *dualDemosaicOptions, Gtk::PACK_SHRINK, 4);
pixelShiftFrame = Gtk::manage (new Gtk::VBox ());
pixelShiftFrame->set_border_width(0);
// -------------------- PixelShift ----------------------
pixelShiftFrame = Gtk::manage(new Gtk::Frame(M("TP_RAW_PIXELSHIFT")));
Gtk::VBox *pixelShiftMainVBox = Gtk::manage (new Gtk::VBox ());
pixelShiftMainVBox->set_border_width(0);
pixelShiftEqualBright = Gtk::manage (new CheckBox(M("TP_RAW_PIXELSHIFTEQUALBRIGHT"), multiImage));
pixelShiftEqualBright->setCheckBoxListener (this);
pixelShiftEqualBright->set_tooltip_text (M("TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP"));
pixelShiftFrame->pack_start(*pixelShiftEqualBright);
pixelShiftMainVBox->pack_start(*pixelShiftEqualBright);
pixelShiftEqualBrightChannel = Gtk::manage (new CheckBox(M("TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL"), multiImage));
pixelShiftEqualBrightChannel->setCheckBoxListener (this);
pixelShiftEqualBrightChannel->set_tooltip_text (M("TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP"));
pixelShiftFrame->pack_start(*pixelShiftEqualBrightChannel);
pixelShiftMainVBox->pack_start(*pixelShiftEqualBrightChannel);
Gtk::HBox* hb3 = Gtk::manage (new Gtk::HBox ());
hb3->pack_start (*Gtk::manage (new Gtk::Label ( M("TP_RAW_PIXELSHIFTMOTIONMETHOD") + ": ")), Gtk::PACK_SHRINK, 4);
@@ -135,7 +141,7 @@ BayerProcess::BayerProcess () : FoldableToolPanel(this, "bayerprocess", M("TP_RA
pixelShiftMotionMethod->set_active(toUnderlying(RAWParams::BayerSensor::PSMotionCorrectionMethod::AUTO));
pixelShiftMotionMethod->show();
hb3->pack_start(*pixelShiftMotionMethod);
pixelShiftFrame->pack_start(*hb3);
pixelShiftMainVBox->pack_start(*hb3);
pixelShiftOptions = Gtk::manage (new Gtk::VBox ());
pixelShiftOptions->set_border_width(0);
@@ -143,12 +149,12 @@ BayerProcess::BayerProcess () : FoldableToolPanel(this, "bayerprocess", M("TP_RA
pixelShiftShowMotion = Gtk::manage (new CheckBox(M("TP_RAW_PIXELSHIFTSHOWMOTION"), multiImage));
pixelShiftShowMotion->setCheckBoxListener (this);
pixelShiftShowMotion->set_tooltip_text (M("TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP"));
pixelShiftFrame->pack_start(*pixelShiftShowMotion);
pixelShiftMainVBox->pack_start(*pixelShiftShowMotion);
pixelShiftShowMotionMaskOnly = Gtk::manage (new CheckBox(M("TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY"), multiImage));
pixelShiftShowMotionMaskOnly->setCheckBoxListener (this);
pixelShiftShowMotionMaskOnly->set_tooltip_text (M("TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP"));
pixelShiftFrame->pack_start(*pixelShiftShowMotionMaskOnly);
pixelShiftMainVBox->pack_start(*pixelShiftShowMotionMaskOnly);
Gtk::HBox* hb4 = Gtk::manage (new Gtk::HBox ());
@@ -219,7 +225,8 @@ BayerProcess::BayerProcess () : FoldableToolPanel(this, "bayerprocess", M("TP_RA
pixelShiftMedian->set_tooltip_text (M("TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP"));
pixelShiftOptions->pack_start(*pixelShiftMedian);
pixelShiftFrame->pack_start(*pixelShiftOptions);
pixelShiftMainVBox->pack_start(*pixelShiftOptions);
pixelShiftFrame->add(*pixelShiftMainVBox);
pixelShiftOptions->hide();
pack_start( *pixelShiftFrame, Gtk::PACK_SHRINK, 4);
@@ -239,7 +246,6 @@ void BayerProcess::read(const rtengine::procparams::ProcParams* pp, const Params
pixelShiftDemosaicMethod->block(true);
//allEnhconn.block (true);
method->set_active(std::numeric_limits<int>::max());
imageNumber->set_active(pp->raw.bayersensor.imageNum);
for (size_t i = 0; i < procparams::RAWParams::BayerSensor::getMethodStrings().size(); ++i) {
@@ -249,7 +255,6 @@ void BayerProcess::read(const rtengine::procparams::ProcParams* pp, const Params
break;
}
}
pixelShiftDemosaicMethod->set_active(std::numeric_limits<int>::max());
for (size_t i = 0; i < procparams::RAWParams::BayerSensor::getPSDemosaicMethodStrings().size(); ++i) {
if (pp->raw.bayersensor.pixelShiftDemosaicMethod == procparams::RAWParams::BayerSensor::getPSDemosaicMethodStrings()[i]) {
pixelShiftDemosaicMethod->set_active(i);
@@ -261,21 +266,23 @@ void BayerProcess::read(const rtengine::procparams::ProcParams* pp, const Params
dcbIterations->setValue (pp->raw.bayersensor.dcb_iterations);
dcbEnhance->setValue (pp->raw.bayersensor.dcb_enhance);
pixelShiftShowMotion->setValue (pp->raw.bayersensor.pixelShiftShowMotion);
pixelShiftShowMotionMaskOnly->setValue (pp->raw.bayersensor.pixelShiftShowMotionMaskOnly);
if (!batchMode) {
pixelShiftShowMotionMaskOnly->set_sensitive (pp->raw.bayersensor.pixelShiftShowMotion);
}
pixelShiftShowMotionMaskOnly->setValue (pp->raw.bayersensor.pixelShiftShowMotionMaskOnly);
pixelShiftHoleFill->setValue (pp->raw.bayersensor.pixelShiftHoleFill);
pixelShiftMedian->setValue (pp->raw.bayersensor.pixelShiftMedian);
pixelShiftGreen->setValue (pp->raw.bayersensor.pixelShiftGreen);
pixelShiftBlur->setValue (pp->raw.bayersensor.pixelShiftBlur);
pixelShiftSmooth->setValue (pp->raw.bayersensor.pixelShiftSmoothFactor);
if (!batchMode) {
pixelShiftSmooth->set_sensitive (pp->raw.bayersensor.pixelShiftBlur);
}
pixelShiftSmooth->setValue (pp->raw.bayersensor.pixelShiftSmoothFactor);
pixelShiftEqualBright->setValue (pp->raw.bayersensor.pixelShiftEqualBright);
pixelShiftEqualBrightChannel->set_sensitive (pp->raw.bayersensor.pixelShiftEqualBright);
pixelShiftEqualBrightChannel->setValue (pp->raw.bayersensor.pixelShiftEqualBrightChannel);
if (!batchMode) {
pixelShiftEqualBrightChannel->set_sensitive (pp->raw.bayersensor.pixelShiftEqualBright);
}
pixelShiftNonGreenCross->setValue (pp->raw.bayersensor.pixelShiftNonGreenCross);
ccSteps->setValue (pp->raw.bayersensor.ccSteps);
lmmseIterations->setValue (pp->raw.bayersensor.lmmse_iterations);
@@ -307,7 +314,7 @@ void BayerProcess::read(const rtengine::procparams::ProcParams* pp, const Params
pixelShiftSigma->setEditedState ( pedited->raw.bayersensor.pixelShiftSigma ? Edited : UnEdited);
if(!pedited->raw.bayersensor.method) {
method->set_active(std::numeric_limits<int>::max()); // No name
method->set_active_text(M("GENERAL_UNCHANGED"));
}
if(!pedited->raw.bayersensor.imageNum) {
@@ -319,7 +326,7 @@ void BayerProcess::read(const rtengine::procparams::ProcParams* pp, const Params
}
if(!pedited->raw.bayersensor.pixelShiftDemosaicMethod) {
pixelShiftDemosaicMethod->set_active(std::numeric_limits<int>::max()); // No name
pixelShiftDemosaicMethod->set_active_text(M("GENERAL_UNCHANGED"));
}
}
@@ -335,7 +342,7 @@ void BayerProcess::read(const rtengine::procparams::ProcParams* pp, const Params
pixelShiftFrame->hide();
}
// Flase color suppression is applied to all demozaicing method, so don't hide anything
// False color suppression is applied to all demozaicing method, so don't hide anything
/*if (pp->raw.bayersensor.method == procparams::RAWParams::BayerSensor::getMethodString(procparams::RAWParams::BayerSensor::Method::EAHD) ||
pp->raw.bayersensor.method == procparams::RAWParams::BayerSensor::getMethodString(procparams::RAWParams::BayerSensor::Method::HPHD) ||
pp->raw.bayersensor.method == procparams::RAWParams::BayerSensor::getMethodString(procparams::RAWParams::BayerSensor::Method::VNG4))
@@ -377,24 +384,24 @@ void BayerProcess::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pe
pp->raw.bayersensor.pixelShiftNonGreenCross = pixelShiftNonGreenCross->getLastActive ();
int currentRow = method->get_active_row_number();
if( currentRow >= 0 && currentRow < std::numeric_limits<int>::max()) {
if( currentRow >= 0 && method->get_active_text() != M("GENERAL_UNCHANGED")) {
pp->raw.bayersensor.method = procparams::RAWParams::BayerSensor::getMethodString(RAWParams::BayerSensor::Method(currentRow));
}
currentRow = imageNumber->get_active_row_number();
if (currentRow < 4) {
if (currentRow >= 0 && imageNumber->get_active_text() != M("GENERAL_UNCHANGED")) {
pp->raw.bayersensor.imageNum = currentRow;
}
currentRow = pixelShiftDemosaicMethod->get_active_row_number();
if( currentRow >= 0 && currentRow < std::numeric_limits<int>::max()) {
if( currentRow >= 0 && pixelShiftDemosaicMethod->get_active_text() != M("GENERAL_UNCHANGED")) {
pp->raw.bayersensor.pixelShiftDemosaicMethod = procparams::RAWParams::BayerSensor::getPSDemosaicMethodString(RAWParams::BayerSensor::PSDemosaicMethod(currentRow));
}
if (pedited) {
pedited->raw.bayersensor.ccSteps = ccSteps->getEditedState ();
pedited->raw.bayersensor.method = method->get_active_row_number() != std::numeric_limits<int>::max();
pedited->raw.bayersensor.method = method->get_active_text() != M("GENERAL_UNCHANGED");
pedited->raw.bayersensor.imageNum = imageNumber->get_active_text() != M("GENERAL_UNCHANGED");
pedited->raw.bayersensor.dcbIterations = dcbIterations->getEditedState ();
pedited->raw.bayersensor.dcbEnhance = !dcbEnhance->get_inconsistent();
@@ -402,7 +409,7 @@ void BayerProcess::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pe
pedited->raw.bayersensor.lmmseIterations = lmmseIterations->getEditedState ();
pedited->raw.bayersensor.dualDemosaicContrast = dualDemosaicContrast->getEditedState ();
pedited->raw.bayersensor.pixelShiftMotionCorrectionMethod = pixelShiftMotionMethod->get_active_text() != M("GENERAL_UNCHANGED");
pedited->raw.bayersensor.pixelShiftDemosaicMethod = pixelShiftDemosaicMethod->get_active_row_number() != std::numeric_limits<int>::max();
pedited->raw.bayersensor.pixelShiftDemosaicMethod = pixelShiftDemosaicMethod->get_active_text() != M("GENERAL_UNCHANGED");
pedited->raw.bayersensor.pixelShiftEperIso = pixelShiftEperIso->getEditedState ();
pedited->raw.bayersensor.pixelShiftSigma = pixelShiftSigma->getEditedState ();
pedited->raw.bayersensor.pixelShiftShowMotion = !pixelShiftShowMotion->get_inconsistent();
@@ -443,11 +450,11 @@ void BayerProcess::trimValues (rtengine::procparams::ProcParams* pp)
void BayerProcess::setBatchMode(bool batchMode)
{
method->append (M("GENERAL_UNCHANGED"));
method->set_active(std::numeric_limits<int>::max()); // No name
method->set_active_text(M("GENERAL_UNCHANGED")); // No name
pixelShiftMotionMethod->append (M("GENERAL_UNCHANGED"));
pixelShiftMotionMethod->set_active_text (M("GENERAL_UNCHANGED"));
pixelShiftDemosaicMethod->append (M("GENERAL_UNCHANGED"));
pixelShiftDemosaicMethod->set_active(std::numeric_limits<int>::max()); // No name
pixelShiftDemosaicMethod->set_active_text(M("GENERAL_UNCHANGED")); // No name
imageNumber->append (M("GENERAL_UNCHANGED"));
imageNumber->set_active_text (M("GENERAL_UNCHANGED"));
ToolPanel::setBatchMode (batchMode);
@@ -508,29 +515,29 @@ void BayerProcess::adjusterChanged (Adjuster* a, double newval)
void BayerProcess::methodChanged ()
{
const int curSelection = method->get_active_row_number();
const RAWParams::BayerSensor::Method method = RAWParams::BayerSensor::Method(curSelection);
const int currentSelection = method->get_active_row_number();
const RAWParams::BayerSensor::Method currentMethod = RAWParams::BayerSensor::Method(currentSelection);
if (!batchMode) {
if (method == procparams::RAWParams::BayerSensor::Method::DCB) {
if (currentMethod == procparams::RAWParams::BayerSensor::Method::DCB) {
dcbOptions->show();
} else {
dcbOptions->hide();
}
if (method == procparams::RAWParams::BayerSensor::Method::LMMSE) {
if (currentMethod == procparams::RAWParams::BayerSensor::Method::LMMSE) {
lmmseOptions->show();
} else {
lmmseOptions->hide();
}
if (method == procparams::RAWParams::BayerSensor::Method::AMAZEVNG4) {
if (currentMethod == procparams::RAWParams::BayerSensor::Method::AMAZEVNG4) {
dualDemosaicOptions->show();
} else {
dualDemosaicOptions->hide();
}
if (method == procparams::RAWParams::BayerSensor::Method::PIXELSHIFT) {
if (currentMethod == procparams::RAWParams::BayerSensor::Method::PIXELSHIFT) {
if(pixelShiftMotionMethod->get_active_row_number() == 2) {
pixelShiftOptions->show();
} else {
@@ -542,34 +549,21 @@ void BayerProcess::methodChanged ()
}
}
Glib::ustring methodName = "";
bool ppreq = false;
oldMethod = currentSelection;
if (curSelection >= 0 && curSelection < std::numeric_limits<int>::max()) {
methodName = procparams::RAWParams::BayerSensor::getMethodString(method);
if (method == procparams::RAWParams::BayerSensor::Method::MONO || RAWParams::BayerSensor::Method(oldMethod) == procparams::RAWParams::BayerSensor::Method::MONO) {
ppreq = true;
}
}
oldMethod = curSelection;
if (listener) {
listener->panelChanged (ppreq ? EvDemosaicMethodPreProc : EvDemosaicMethod, methodName);
if (listener && method->get_active_row_number() >= 0) {
listener->panelChanged (
currentMethod == procparams::RAWParams::BayerSensor::Method::MONO || RAWParams::BayerSensor::Method(oldMethod) == procparams::RAWParams::BayerSensor::Method::MONO
? EvDemosaicMethodPreProc
: EvDemosaicMethod, method->get_active_text());
}
}
void BayerProcess::pixelShiftDemosaicMethodChanged ()
{
if (listener) {
const int curSelection = pixelShiftDemosaicMethod->get_active_row_number();
if (curSelection >= 0 && curSelection < std::numeric_limits<int>::max()) {
const RAWParams::BayerSensor::PSDemosaicMethod method = RAWParams::BayerSensor::PSDemosaicMethod(curSelection);
Glib::ustring methodName = procparams::RAWParams::BayerSensor::getPSDemosaicMethodString(method);;
listener->panelChanged (EvDemosaicPixelshiftDemosaicMethod, methodName);
}
if (listener && pixelShiftDemosaicMethod->get_active_row_number() >= 0) {
listener->panelChanged (EvDemosaicPixelshiftDemosaicMethod, pixelShiftDemosaicMethod->get_active_text());
}
}
@@ -646,13 +640,13 @@ void BayerProcess::pixelShiftMotionMethodChanged ()
pixelShiftOptions->show();
pixelShiftShowMotion->show();
pixelShiftShowMotionMaskOnly->show();
} else {
} else if(pixelShiftMotionMethod->get_active_row_number() > 0) {
pixelShiftOptions->hide();
pixelShiftShowMotion->show();
pixelShiftShowMotionMaskOnly->show();
}
}
if (listener) {
if (listener && pixelShiftMotionMethod->get_active_row_number() >= 0) {
listener->panelChanged (EvPixelShiftMotionMethod, pixelShiftMotionMethod->get_active_text());
}
}

View File

@@ -39,7 +39,7 @@ protected:
CheckBox* dcbEnhance;
Gtk::VBox *lmmseOptions;
Adjuster* lmmseIterations;
Gtk::VBox *pixelShiftFrame;
Gtk::Frame *pixelShiftFrame;
Gtk::VBox *pixelShiftOptions;
MyComboBoxText* pixelShiftMotionMethod;
MyComboBoxText* pixelShiftDemosaicMethod;

View File

@@ -60,7 +60,7 @@ ExportPanel::ExportPanel () : listener (nullptr)
// ---------------------- Bayer sensor frame -----------------------
Gtk::Frame *bayerFrame = Gtk::manage ( new Gtk::Frame (M ("TP_RAW_SENSOR_BAYER")));
Gtk::Frame *bayerFrame = Gtk::manage ( new Gtk::Frame (M ("TP_RAW_SENSOR_BAYER_LABEL")));
Gtk::VBox* bayerFrameVBox = Gtk::manage (new Gtk::VBox ());
Gtk::HBox* hb_raw_bayer_method = Gtk::manage (new Gtk::HBox ());
@@ -83,7 +83,7 @@ ExportPanel::ExportPanel () : listener (nullptr)
// ---------------------- Bayer sensor frame -----------------------
Gtk::Frame *xtransFrame = Gtk::manage ( new Gtk::Frame (M ("TP_RAW_SENSOR_XTRANS")));
Gtk::Frame *xtransFrame = Gtk::manage ( new Gtk::Frame (M ("TP_RAW_SENSOR_XTRANS_LABEL")));
Gtk::VBox* xtransFrameVBox = Gtk::manage (new Gtk::VBox ());
Gtk::HBox* hb_raw_xtrans_method = Gtk::manage (new Gtk::HBox ());
@@ -130,9 +130,11 @@ ExportPanel::ExportPanel () : listener (nullptr)
bayerFrameVBox->pack_start (*bypass_raw_bayer_linenoise, Gtk::PACK_SHRINK, 4);
bayerFrameVBox->pack_start (*bypass_raw_bayer_greenthresh, Gtk::PACK_SHRINK, 4);
bayerFrame->add (*bayerFrameVBox);
bypass_box->pack_start(*bayerFrame, Gtk::PACK_SHRINK, 4);
xtransFrameVBox->pack_start (*hb_raw_xtrans_method, Gtk::PACK_SHRINK, 4);
xtransFrame->add (*xtransFrameVBox);
bypass_box->pack_start(*xtransFrame, Gtk::PACK_SHRINK, 4);
bypass_box->pack_start (*bypass_raw_ccSteps, Gtk::PACK_SHRINK, 4);
bypass_box->pack_start (*bypass_raw_ca, Gtk::PACK_SHRINK, 4);
@@ -271,14 +273,14 @@ void ExportPanel::SaveSettingsAsDefault()
//saving Bayer demosaic_method
int currentRow = raw_bayer_method->get_active_row_number();
if (currentRow >= 0 && currentRow < std::numeric_limits<int>::max()) {
if (currentRow >= 0) {
FE_OPT_STORE_ (options.fastexport_raw_bayer_method, procparams::RAWParams::BayerSensor::getMethodStrings()[currentRow]);
}
//saving X-Trans demosaic_method
currentRow = raw_xtrans_method->get_active_row_number();
if (currentRow >= 0 && currentRow < std::numeric_limits<int>::max()) {
if (currentRow >= 0) {
FE_OPT_STORE_ (options.fastexport_raw_xtrans_method, procparams::RAWParams::XTransSensor::getMethodStrings()[currentRow]);
}
@@ -332,7 +334,7 @@ void ExportPanel::LoadDefaultSettings()
bypass_raw_ff->set_active (options.fastexport_bypass_raw_ff );
// Bayer demosaic method
raw_bayer_method->set_active(std::numeric_limits<int>::max());
raw_bayer_method->set_active(0);
for (size_t i = 0; i < RAWParams::BayerSensor::getMethodStrings().size(); ++i)
if (options.fastexport_raw_bayer_method == procparams::RAWParams::BayerSensor::getMethodStrings()[i]) {
@@ -341,7 +343,7 @@ void ExportPanel::LoadDefaultSettings()
}
// X-Trans demosaic method
raw_xtrans_method->set_active(std::numeric_limits<int>::max());
raw_xtrans_method->set_active(0);
for (size_t i = 0; i < procparams::RAWParams::XTransSensor::getMethodStrings().size(); ++i)
if (options.fastexport_raw_xtrans_method == procparams::RAWParams::XTransSensor::getMethodStrings()[i]) {

View File

@@ -136,7 +136,7 @@ void FlatField::read(const rtengine::procparams::ProcParams* pp, const ParamsEdi
flatFieldClipControl->setAutoInconsistent(multiImage && !pedited->raw.ff_AutoClipControl);
if( !pedited->raw.ff_BlurType ) {
flatFieldBlurType->set_active(std::numeric_limits<int>::max()); // No name
flatFieldBlurType->set_active_text(M("GENERAL_UNCHANGED"));
}
}
@@ -217,7 +217,7 @@ void FlatField::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedit
int currentRow = flatFieldBlurType->get_active_row_number();
if( currentRow >= 0 && currentRow < std::numeric_limits<int>::max()) {
if( currentRow >= 0 && flatFieldBlurType->get_active_text() != M("GENERAL_UNCHANGED")) {
pp->raw.ff_BlurType = procparams::RAWParams::getFlatFieldBlurTypeStrings()[currentRow];
}
@@ -227,7 +227,7 @@ void FlatField::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedit
pedited->raw.ff_BlurRadius = flatFieldBlurRadius->getEditedState ();
pedited->raw.ff_clipControl = flatFieldClipControl->getEditedState ();
pedited->raw.ff_AutoClipControl = !flatFieldClipControl->getAutoInconsistent();
pedited->raw.ff_BlurType = flatFieldBlurType->get_active_row_number() != std::numeric_limits<int>::max();
pedited->raw.ff_BlurType = flatFieldBlurType->get_active_text() != M("GENERAL_UNCHANGED");
}
}
@@ -340,20 +340,14 @@ void FlatField::flatFieldBlurTypeChanged ()
const int curSelection = flatFieldBlurType->get_active_row_number();
const RAWParams::FlatFieldBlurType blur_type = RAWParams::FlatFieldBlurType(curSelection);
Glib::ustring s;
if (curSelection >= 0 && curSelection < std::numeric_limits<int>::max()) {
s = flatFieldBlurType->get_active_text();
}
if (multiImage || blur_type == procparams::RAWParams::FlatFieldBlurType::AREA) {
flatFieldClipControl->show();
} else {
flatFieldClipControl->hide();
}
if (listener) {
listener->panelChanged (EvFlatFieldBlurType, s);
if (listener && curSelection >= 0) {
listener->panelChanged (EvFlatFieldBlurType, flatFieldBlurType->get_active_text());
}
}

View File

@@ -83,8 +83,6 @@ void XTransProcess::read(const rtengine::procparams::ProcParams* pp, const Param
disableListener ();
methodconn.block (true);
method->set_active(std::numeric_limits<int>::max());
for (size_t i = 0; i < RAWParams::XTransSensor::getMethodStrings().size(); ++i)
if( pp->raw.xtranssensor.method == RAWParams::XTransSensor::getMethodStrings()[i]) {
method->set_active(i);
@@ -96,7 +94,7 @@ void XTransProcess::read(const rtengine::procparams::ProcParams* pp, const Param
ccSteps->setEditedState (pedited->raw.xtranssensor.ccSteps ? Edited : UnEdited);
if( !pedited->raw.xtranssensor.method ) {
method->set_active(std::numeric_limits<int>::max()); // No name
method->set_active_text(M("GENERAL_UNCHANGED"));
}
}
@@ -113,12 +111,12 @@ void XTransProcess::write( rtengine::procparams::ProcParams* pp, ParamsEdited* p
int currentRow = method->get_active_row_number();
if (currentRow >= 0 && currentRow < std::numeric_limits<int>::max()) {
if (currentRow >= 0 && method->get_active_text() != M("GENERAL_UNCHANGED")) {
pp->raw.xtranssensor.method = procparams::RAWParams::XTransSensor::getMethodStrings()[currentRow];
}
if (pedited) {
pedited->raw.xtranssensor.method = method->get_active_row_number() != std::numeric_limits<int>::max();
pedited->raw.xtranssensor.method = method->get_active_text() != M("GENERAL_UNCHANGED");
pedited->raw.xtranssensor.ccSteps = ccSteps->getEditedState ();
}
}
@@ -131,7 +129,7 @@ void XTransProcess::setAdjusterBehavior (bool falsecoloradd)
void XTransProcess::setBatchMode(bool batchMode)
{
method->append (M("GENERAL_UNCHANGED"));
method->set_active(std::numeric_limits<int>::max()); // No name
method->set_active_text(M("GENERAL_UNCHANGED"));
ToolPanel::setBatchMode (batchMode);
ccSteps->showEditedCB ();
}
@@ -159,22 +157,14 @@ void XTransProcess::adjusterChanged (Adjuster* a, double newval)
void XTransProcess::methodChanged ()
{
const int curSelection = method->get_active_row_number();
const RAWParams::XTransSensor::Method method = RAWParams::XTransSensor::Method(curSelection);
Glib::ustring methodName;
bool ppreq = false;
if (curSelection >= 0 && curSelection < std::numeric_limits<int>::max()) {
methodName = RAWParams::XTransSensor::getMethodStrings()[curSelection];
if (method == RAWParams::XTransSensor::Method::MONO || RAWParams::XTransSensor::Method(oldSelection) == RAWParams::XTransSensor::Method::MONO) {
ppreq = true;
}
}
const RAWParams::XTransSensor::Method currentMethod = RAWParams::XTransSensor::Method(curSelection);
oldSelection = curSelection;
if (listener) {
listener->panelChanged (ppreq ? EvDemosaicMethodPreProc : EvDemosaicMethod, methodName);
if (listener && method->get_active_row_number() >= 0) {
listener->panelChanged (
currentMethod == RAWParams::XTransSensor::Method::MONO || RAWParams::XTransSensor::Method(oldSelection) == RAWParams::XTransSensor::Method::MONO
? EvDemosaicMethodPreProc
: EvDemosaicMethod, method->get_active_text());
}
}