Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CalculateMeanExposure.h
Go to the documentation of this file.
1 // -*- c-basic-offset: 4 -*-
26 #ifndef _BASICALGORITHMS_CALCULATEMEANEXPOSURE_H
27 #define _BASICALGORITHMS_CALCULATEMEANEXPOSURE_H
28 
29 #include <hugin_shared.h>
31 
32 
33 
34 namespace HuginBase {
35 
36 
38 {
39 
40  public:
42  explicit CalculateMeanExposure(PanoramaData& panorama)
43  : PanoramaAlgorithm(panorama), o_resultExposure(0.0)
44  {};
45 
47  virtual ~CalculateMeanExposure() {};
48 
49 
50  public:
52  virtual bool modifiesPanoramaData() const
53  { return false; }
54 
56  virtual bool runAlgorithm()
57  {
58  o_resultExposure = calcMeanExposure(o_panorama);
59  return true; // let's hope so.
60  }
61 
62 
63  public:
64 
66  static double calcMeanExposure(const PanoramaData& pano);
67 
69  virtual double getResultExposure() const
70  {
71  // [TODO] if(!hasRunSuccessfully()) DEBUG;
72  return o_resultExposure;
73  }
74 
75 
76  protected:
78 };
79 
80 
81 }
82 #endif // _H
virtual bool modifiesPanoramaData() const
returns true if the algorithm changes the PanoramaData.
virtual bool runAlgorithm()
implementation of the algorithm.
virtual double getResultExposure() const
Model for a panorama.
Definition: PanoramaData.h:81
#define IMPEX
Definition: hugin_shared.h:39
CalculateMeanExposure(PanoramaData &panorama)