1
/* ============================================================
3
* This file is a part of digiKam project
4
* http://www.digikam.org
7
* Description : black frames parser
9
* Copyright (C) 2005-2006 by Unai Garro <ugarro at users dot sourceforge dot net>
10
* Copyright (C) 2005-2008 by Gilles Caulier <caulier dot gilles at gmail dot com>
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
* and is Copyright (C) 2003, 2004 Martin Dickopp
16
* This program is free software; you can redistribute it
17
* and/or modify it under the terms of the GNU General
18
* Public License as published by the Free Software Foundation;
19
* either version 2, or (at your option)
22
* This program is distributed in the hope that it will be useful,
23
* but WITHOUT ANY WARRANTY; without even the implied warranty of
24
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25
* GNU General Public License for more details.
27
* ============================================================ */
29
#ifndef BLACKFRAMEPARSER_H
30
#define BLACKFRAMEPARSER_H
32
#define MIN(a,b) ((a) < (b) ? (a) : (b))
33
#define MAX(a,b) ((a) > (b) ? (a) : (b))
39
#include <qvaluelist.h>
50
#include "loadsavethread.h"
53
using namespace Digikam;
55
namespace DigikamHotPixelsImagesPlugin
58
class BlackFrameParser: public QObject
64
BlackFrameParser(QObject *parent);
67
void parseHotPixels(const QString &file);
68
void parseBlackFrame(const KURL &url);
69
void parseBlackFrame(QImage& img);
70
QImage image(){return m_Image;}
74
void parsed(QValueList<HotPixel>);
75
void signalLoadingProgress(float);
76
void signalLoadingComplete();
80
void slotLoadingProgress(const LoadingDescription&, float);
81
void slotLoadImageFromUrlComplete(const LoadingDescription&, const DImg&);
85
void blackFrameParsing();
86
void consolidatePixels(QValueList<HotPixel>& list);
87
void validateAndConsolidate(HotPixel *a, HotPixel *b);
91
QString m_OutputString;
96
LoadSaveThread *m_imageLoaderThread;
99
} // NameSpace DigikamHotPixelsImagesPlugin
101
#endif // BLACKFRAMEPARSER_H