digiKam
Loading...
Searching...
No Matches
blackframeparser.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-03-27
7 * Description : black frames parser
8 *
9 * SPDX-FileCopyrightText: 2005-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 * SPDX-FileCopyrightText: 2005-2006 by Unai Garro <ugarro at users dot sourceforge dot net>
11 *
12 * Part of the algorithm for finding the hot pixels was based on
13 * the code of jpegpixi, which was released under the GPL license,
14 * written by Martin Dickopp
15 *
16 * SPDX-License-Identifier: GPL-2.0-or-later
17 *
18 * ============================================================ */
19
20#pragma once
21
22// Qt includes
23
24#include <QList>
25#include <QObject>
26#include <QString>
27#include <QRect>
28#include <QUrl>
29
30// Local includes
31
32#include "digikam_export.h"
33#include "hotpixelprops.h"
34#include "loadingdescription.h"
35
36using namespace Digikam;
37
38namespace Digikam
39{
40
41class DIGIKAM_EXPORT BlackFrameParser: public QObject
42{
43 Q_OBJECT
44
45public:
46
47 explicit BlackFrameParser(QObject* const parent);
48 ~BlackFrameParser() override;
49
50 void parseHotPixels(const QString& file);
51 void parseBlackFrame(const QUrl& url);
52 void parseBlackFrame(const DImg& img);
53
54 DImg image() const;
55
56Q_SIGNALS:
57
58 void signalHotPixelsParsed(const QList<HotPixelProps>&);
61
62private Q_SLOTS:
63
64 void slotLoadingProgress(const LoadingDescription&, float v);
65 void slotLoadImageFromUrlComplete(const LoadingDescription&, const DImg& img);
66
67private:
68
69 void blackFrameParsing();
70 void consolidatePixels(QList<HotPixelProps>& list);
71 void validateAndConsolidate(HotPixelProps* const a, HotPixelProps* const b);
72
73private:
74
75 class Private;
76 Private* const d = nullptr;
77};
78
79} // namespace Digikam
Definition blackframeparser.h:42
void signalHotPixelsParsed(const QList< HotPixelProps > &)
void signalLoadingProgress(float)
Definition dimg.h:52
Definition hotpixelprops.h:31
Definition loadingdescription.h:35
Definition datefolderview.cpp:34