~ubuntu-branches/ubuntu/trusty/digikam/trusty

1.7.1 by Mark Purcell
Import upstream version 2.2.0
1
/* ============================================================
2
 *
3
 * This file is a part of digiKam project
4
 * http://www.digikam.org
5
 *
6
 * Date        : 2005-24-01
7
 * Description : auto levels image filter.
8
 *
1.2.39 by Rohan Garg
Import upstream version 2.6.0
9
 * Copyright (C) 2005-2012 by Gilles Caulier <caulier dot gilles at gmail dot com>
1.7.1 by Mark Purcell
Import upstream version 2.2.0
10
 *
11
 * This program is free software; you can redistribute it
12
 * and/or modify it under the terms of the GNU General
13
 * Public License as published by the Free Software Foundation;
14
 * either version 2, or (at your option)
15
 * any later version.
16
 *
17
 * This program is distributed in the hope that it will be useful,
18
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
 * GNU General Public License for more details.
21
 *
22
 * ============================================================ */
23
24
#ifndef AUTOLEVELSFILTER_H
25
#define AUTOLEVELSFILTER_H
26
27
// Local includes
28
29
#include "digikam_export.h"
30
#include "dimgthreadedfilter.h"
31
#include "globals.h"
32
33
using namespace Digikam;
34
35
namespace Digikam
36
{
37
38
class DImg;
39
40
class DIGIKAM_EXPORT AutoLevelsFilter : public DImgThreadedFilter
41
{
42
43
public:
1.9.1 by Rohan Garg
Import upstream version 3.0.0~beta3
44
    explicit AutoLevelsFilter(QObject* const parent = 0);
1.2.39 by Rohan Garg
Import upstream version 2.6.0
45
    AutoLevelsFilter(DImg* const orgImage, const DImg* const refImage, QObject* const parent=0);
1.7.1 by Mark Purcell
Import upstream version 2.2.0
46
    virtual ~AutoLevelsFilter();
47
48
    static QString          FilterIdentifier()
49
    {
50
        return "digikam:AutoLevelsFilter";
51
    }
1.2.39 by Rohan Garg
Import upstream version 2.6.0
52
1.7.1 by Mark Purcell
Import upstream version 2.2.0
53
    static QList<int>       SupportedVersions()
54
    {
55
        return QList<int>() << 1;
56
    }
1.2.39 by Rohan Garg
Import upstream version 2.6.0
57
1.7.1 by Mark Purcell
Import upstream version 2.2.0
58
    static int              CurrentVersion()
59
    {
60
        return 1;
61
    }
1.2.39 by Rohan Garg
Import upstream version 2.6.0
62
1.7.1 by Mark Purcell
Import upstream version 2.2.0
63
    static QString          DisplayableName()
64
    {
65
        return I18N_NOOP("Auto Levels");
66
    }
1.2.39 by Rohan Garg
Import upstream version 2.6.0
67
1.7.1 by Mark Purcell
Import upstream version 2.2.0
68
    virtual QString         filterIdentifier() const
69
    {
70
        return FilterIdentifier();
71
    }
1.2.39 by Rohan Garg
Import upstream version 2.6.0
72
1.7.1 by Mark Purcell
Import upstream version 2.2.0
73
    virtual FilterAction    filterAction();
1.2.39 by Rohan Garg
Import upstream version 2.6.0
74
1.7.1 by Mark Purcell
Import upstream version 2.2.0
75
    void                    readParameters(const FilterAction& action);
76
77
private:
78
79
    void filterImage();
80
    void autoLevelsCorrectionImage();
81
82
private:
83
84
    DImg m_refImage;
85
};
86
87
}  // namespace Digikam
88
89
#endif /* AUTOLEVELSFILTER_H */