256{
258 config->setProperty(
MAPPING_MODEL,
ui->cmbMappingModel->currentData());
259
262
263 config->setProperty(
TONE_MAP_TYPE,
ui->cmbToneCurveType->currentData());
264
270
271
275 QPolygonF poly;
278 for (
int x = 0;
x < 20;
x++) {
279 const float val = (float(x)/19.0)*white;
281 if (x%2 == 0) {
282 xAxisValues << QString::number(val, 'f', 1);
283
284 }
285 poly.append(QPointF(val/white, y));
286 }
287 ui->toneCurvePreview->setGreyscaleCurve(poly);
288 ui->toneCurvePreview->setProfileDataAvailable(
true);
289 ui->toneCurvePreview->setToolTip(i18n(
"Current Maximum White: %1", QString::number(white,
'f', 2)));
290 ui->toneCurvePreview->setXAxisValues(xAxisValues);
291 ui->toneCurvePreview->update();
292 } else {
293 QPolygonF poly;
294 const float white =
ui->spnMaxWhite->value();
296 for (
int x = 0;
x < 20;
x++) {
297 const float val = (float(x)/19.0)*white;
299 if (x%2 == 0) {
300 xAxisValues << QString::number(val, 'f', 1);
301 }
302 poly.append(QPointF(val/white, y));
303 }
304 ui->toneCurvePreview->setGreyscaleCurve(poly);
305 ui->toneCurvePreview->setProfileDataAvailable(
true);
306 ui->toneCurvePreview->setToolTip(i18n(
"Current Maximum White: %1", QString::number(white,
'f', 2)));
307 ui->toneCurvePreview->setXAxisValues(xAxisValues);
308 ui->toneCurvePreview->update();
309 }
310
312 if (
ui->targetGamut->currentColorSpace()) {
314 }
316 return config;
317}
const QString GAMUT_MAP_METHOD
const QString GAMUT_MAP_ENABLED
bool, whether to do gamt mapping.
const QString TONE_PIECE_WISE_SHOULDER_ANGLE
const QString MAPPING_MODEL
Enum, model in which the gamut or tone mapping is done.
const QString TONE_MAP_MAX_WHITE
double, the maximum white that needs to be tonemapped.
const QString TONE_PIECE_WISE_SHOULDER_STRENGTH
const QString GAMUT_MAP_TARGET_PROFILE
QString, name of the color profile that is the target gamut.
const QString TONE_PIECE_WISE_TOE_LENGTH
const QString TONE_MAP_ENABLED
bool, whether to do tone mapping.
const QString TONE_PIECE_WISE_SHOULDER_LENGTH
const QString TONE_MAP_TYPE
String, indicates whether to use the cusp map or the MINDE method.
const QString TONE_PIECE_WISE_TOE_STRENGTH
static KisResourcesInterfaceSP instance()
float KRITAPIGMENT_EXPORT reinhardToneMapping(const float linearY, const float maxY)
reinhardToneMapping Implements 'extended' reinhard tonemapping.
The piecewiseFilmicCurve class Implement's Hable's piecewise filmic curve. https://filmicworlds....
static PiecewiseFilmicCurve fromUserParams(float toeStrength=0.5, float toeLength=0.5, float shoulderStrength=2.0, float shoulderLength=0.5, float shoulderAngle=1.0)
float evalCurve(const float x)