Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FitPanorama.h
Go to the documentation of this file.
1 // -*- c-basic-offset: 4 -*-
26 #ifndef _FITPANORAMA_H
27 #define _FITPANORAMA_H
28 
29 #include <hugin_shared.h>
31 
32 
33 
34 namespace HuginBase {
35 
36 
38 {
39 
40  public:
42  explicit CalculateFitPanorama(PanoramaData& panorama)
43  : PanoramaAlgorithm(panorama), o_resultHFOV(0), o_resultHeight(0)
44  {};
45 
47  virtual ~CalculateFitPanorama() {};
48 
49 
50  public:
52  virtual bool modifiesPanoramaData() const
53  { return false; }
54 
56  virtual bool runAlgorithm()
57  {
58  fitPano(o_panorama, o_resultHFOV, o_resultHeight);
59  return true; // let's hope so.
60  }
61 
62 
63  public:
65  static void fitPano(PanoramaData& panorama, double& HFOV, double& height);
66 
68  virtual double getResultHorizontalFOV()
69  {
70  // [TODO] if(!hasRunSuccessfully()) DEBUG;
71  return o_resultHFOV;
72  }
73 
75  virtual double getResultHeight()
76  {
77  // [TODO] if(!hasRunSuccessfully()) DEBUG;
78  return o_resultHeight;
79  }
80 
81  protected:
82  double o_resultHFOV;
84 };
85 
86 
87 
90 {
91 
92  public:
94  explicit FitPanorama(PanoramaData& panorama)
95  : CalculateFitPanorama(panorama)
96  {};
97 
99  virtual ~FitPanorama() {};
100 
101 
102  public:
104  virtual bool modifiesPanoramaData() const
105  { return true; }
106 
108  virtual bool runAlgorithm();
109 };
110 
111 
112 } // namespace
113 #endif // _H
virtual bool runAlgorithm()
implementation of the algorithm.
Definition: FitPanorama.h:56
virtual bool modifiesPanoramaData() const
returns true if the algorithm changes the PanoramaData.
Definition: FitPanorama.h:52
double HFOV
FitPanorama(PanoramaData &panorama)
Definition: FitPanorama.h:94
virtual double getResultHeight()
Definition: FitPanorama.h:75
virtual bool modifiesPanoramaData() const
returns true if the algorithm changes the PanoramaData.
Definition: FitPanorama.h:104
Model for a panorama.
Definition: PanoramaData.h:81
#define IMPEX
Definition: hugin_shared.h:39
CalculateFitPanorama(PanoramaData &panorama)
Definition: FitPanorama.h:42
virtual double getResultHorizontalFOV()
Definition: FitPanorama.h:68