Flat field: Show auto calculated clip control value in ui
This commit is contained in:
@@ -2872,8 +2872,6 @@ void RawImageSource::processFlatField(const RAWParams &raw, RawImage *riFlatFile
|
||||
float limitFactor = 1.f;
|
||||
|
||||
if(raw.ff_AutoClipControl) {
|
||||
// int clipControlGui = 0;
|
||||
|
||||
for (int m = 0; m < 2; m++)
|
||||
for (int n = 0; n < 2; n++) {
|
||||
float maxval = 0.f;
|
||||
@@ -2917,7 +2915,7 @@ void RawImageSource::processFlatField(const RAWParams &raw, RawImage *riFlatFile
|
||||
}
|
||||
}
|
||||
|
||||
// clipControlGui = (1.f - limitFactor) * 100.f; // this value can be used to set the clip control slider in gui
|
||||
flatFieldAutoClipValue = (1.f - limitFactor) * 100.f; // this value can be used to set the clip control slider in gui
|
||||
} else {
|
||||
limitFactor = max((float)(100 - raw.ff_clipControl) / 100.f, 0.01f);
|
||||
}
|
||||
@@ -3003,7 +3001,6 @@ void RawImageSource::processFlatField(const RAWParams &raw, RawImage *riFlatFile
|
||||
|
||||
if(raw.ff_AutoClipControl) {
|
||||
// determine maximum calculated value to avoid clipping
|
||||
// int clipControlGui = 0;
|
||||
float maxval = 0.f;
|
||||
// xtrans files have only one black level actually, so we can simplify the code a bit
|
||||
#ifdef _OPENMP
|
||||
@@ -3038,7 +3035,7 @@ void RawImageSource::processFlatField(const RAWParams &raw, RawImage *riFlatFile
|
||||
// there's only one white level for xtrans
|
||||
if(maxval + black[0] > ri->get_white(0)) {
|
||||
limitFactor = ri->get_white(0) / (maxval + black[0]);
|
||||
// clipControlGui = (1.f - limitFactor) * 100.f; // this value can be used to set the clip control slider in gui
|
||||
flatFieldAutoClipValue = (1.f - limitFactor) * 100.f; // this value can be used to set the clip control slider in gui
|
||||
}
|
||||
} else {
|
||||
limitFactor = max((float)(100 - raw.ff_clipControl) / 100.f, 0.01f);
|
||||
|
||||
Reference in New Issue
Block a user