rawTherapee/rtengine/dynamicprofile.h
Hombre57 f23be9345c Add multi-frame handling.
- Exif of all frames are displayed in the Editor's Exif tab (without
separator)
- isHDR and isPixelShift is added to the data files stored in cache
- In the Editor panel, the QuickInfo frame display the HDR and
PixelShift information, as well as the number of frame and bit-depth for
HDR image
- the number of frame is provided by dcraw. If not set, it is provided
by the Exif's main IFD count
- the PixelShift information (for Pentax as of now) is provided by
looking at the Exif informations
- the HDR information is provided by the Exif information of the first
frame for Pentax raw files, or by the bitspersample, sampleformat and
compression tags for other files

TODO: add icons to the thumbnails to tag HDR and PixelShift files.
2017-08-08 23:42:05 +02:00

80 lines
2.1 KiB
C++

/* -*- C++ -*-
* This file is part of RawTherapee.
*
* Copyright (c) 2017 Alberto Griggio
*
* RawTherapee is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* RawTherapee is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _DYNAMICPROFILE_H_
#define _DYNAMICPROFILE_H_
#include <glibmm.h>
#include <vector>
#include "../rtgui/options.h"
class DynamicProfileRule
{
public:
template <class T>
struct Range {
T min;
T max;
explicit Range (T l = T(), T u = T()): min (l), max (u) {}
bool operator() (T val) const
{
return val >= min && val <= max;
}
};
struct Optional {
Glib::ustring value;
bool enabled;
explicit Optional (const Glib::ustring v = "", bool e = false):
value (v), enabled (e) {}
bool operator() (const Glib::ustring &val) const;
};
DynamicProfileRule();
bool matches (const rtengine::FramesMetaData *im) const;
bool operator< (const DynamicProfileRule &other) const;
int serial_number;
Range<int> iso;
Range<double> fnumber;
Range<double> focallen;
Range<double> shutterspeed;
Range<double> expcomp;
Optional camera;
Optional lens;
Glib::ustring profilepath;
};
class DynamicProfileRules
{
protected:
/** cache for dynamic profile rules */
std::vector<DynamicProfileRule> dynamicRules;
bool rulesLoaded;
public:
bool loadRules();
bool storeRules();
const std::vector<DynamicProfileRule> &getRules();
void setRules (const std::vector<DynamicProfileRule> &r);
};
#endif // _DYNAMICPROFILE_H_