TonicTones
Src/Operators/ReinhardGlobalOperator/ReinhardGlobalOperator.h
00001 //      ReinhardGlobalOperator.h
00002 //      
00003 //      Copyright 2010 Jérémy Laumon <jeremy.laumon@gmail.com>
00004 //      
00005 //      This program is free software; you can redistribute it and/or modify
00006 //      it under the terms of the GNU General Public License as published by
00007 //      the Free Software Foundation; either version 2 of the License, or
00008 //      (at your option) any later version.
00009 //      
00010 //      This program is distributed in the hope that it will be useful,
00011 //      but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 //      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 //      GNU General Public License for more details.
00014 //      
00015 //      You should have received a copy of the GNU General Public License
00016 //      along with this program; if not, write to the Free Software
00017 //      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
00018 //      MA 02110-1301, USA.
00019 
00020 #ifndef REINHARDGLOBALOPERATOR_H
00021 #define REINHARDGLOBALOPERATOR_H
00022 
00023 #include <QtGui>
00024 #include <ToneMappingOperator.h>
00025 #include <ui_ReinhardGlobalOperator.h>
00026 
00027 class ReinhardGlobalOperator : public ToneMappingOperator
00028 {
00029     Q_OBJECT
00030 public:
00031     ReinhardGlobalOperator();
00032 
00033     virtual void setupUi(QWidget* widget);
00034     virtual const HdrImage* getToneMappedImage() const;
00035     virtual void setImage(const HdrImage *image);
00036     virtual QString name() const;
00037     
00038 public slots:
00039     void updateKeyValue(int value);
00040     void updateBurnOut(bool enabled);
00041     void updateLumWhite();
00042     void toneMap();
00043 
00044 private:
00045 
00046     Ui::ReinhardGlobalOperator ui;
00047     const HdrImage* inputImage;
00048     HdrImage* outputImage;
00049     double avLum;
00050     float keyValue;
00051     bool burnOut;
00052     float lumWhite2;
00053     QString msg;
00054     
00055 };
00056 
00057 class ReinhardGlobalOperatorFactory : public QObject, public ToneMappingOperatorFactory
00058 {
00059     Q_OBJECT
00060     Q_INTERFACES(ToneMappingOperatorFactory)
00061     
00062 public:
00063     virtual ToneMappingOperatorPtr createOperator() const;
00064     virtual QString operatorName() const;
00065 };
00066 
00067 #endif
 All Classes Functions Variables