digiKam
Loading...
Searching...
No Matches
normalizefilter.h
Go to the documentation of this file.
1/* ============================================================
2 *
3 * This file is a part of digiKam project
4 * https://www.digikam.org
5 *
6 * Date : 2005-24-01
7 * Description : normalize image filter.
8 *
9 * SPDX-FileCopyrightText: 2005-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 *
13 * ============================================================ */
14
15#pragma once
16
17// Local includes
18
19#include "digikam_export.h"
20#include "dimgthreadedfilter.h"
21#include "digikam_globals.h"
22
23namespace Digikam
24{
25
26class DImg;
27
28class DIGIKAM_EXPORT NormalizeFilter : public DImgThreadedFilter
29{
30 Q_OBJECT
31
32public:
33
34 explicit NormalizeFilter(QObject* const parent = nullptr);
35 NormalizeFilter(DImg* const orgImage, const DImg* const refImage, QObject* const parent = nullptr);
36 ~NormalizeFilter() override;
37
38 static QString FilterIdentifier()
39 {
40 return QLatin1String("digikam:NormalizeFilter");
41 }
42
43 static QList<int> SupportedVersions()
44 {
45 return QList<int>() << 1;
46 }
47
48 static int CurrentVersion()
49 {
50 return 1;
51 }
52
53 static QString DisplayableName();
54
55 QString filterIdentifier() const override
56 {
57 return FilterIdentifier();
58 }
59
60 FilterAction filterAction() override;
61
62 void readParameters(const FilterAction& action) override;
63
64private:
65
66 void filterImage() override;
67 void normalizeImage();
68
69private:
70
71 struct Q_DECL_HIDDEN NormalizeParam
72 {
73 unsigned short* lut = nullptr;
74 double min = 0.0;
75 double max = 0.0;
76 };
77
78 DImg m_refImage;
79};
80
81} // namespace Digikam
Definition dimgthreadedfilter.h:31
Definition dimg.h:52
Definition filteraction.h:33
Definition normalizefilter.h:29
static int CurrentVersion()
Definition normalizefilter.h:48
QString filterIdentifier() const override
Definition normalizefilter.h:55
static QList< int > SupportedVersions()
Definition normalizefilter.h:43
static QString FilterIdentifier()
Definition normalizefilter.h:38
Definition datefolderview.cpp:34