FitPanorama.h

Go to the documentation of this file.
00001 // -*- c-basic-offset: 4 -*-
00026 #ifndef _FITPANORAMA_H
00027 #define _FITPANORAMA_H
00028 
00029 #include <hugin_shared.h>
00030 #include <algorithms/PanoramaAlgorithm.h>
00031 
00032 
00033 
00034 namespace HuginBase {
00035 
00036 
00037 class IMPEX CalculateFitPanorama : public PanoramaAlgorithm
00038 {
00039 
00040     public:
00042         CalculateFitPanorama(PanoramaData& panorama)
00043          : PanoramaAlgorithm(panorama)
00044         {};
00045         
00047         virtual ~CalculateFitPanorama() {};
00048         
00049         
00050     public:
00052         virtual bool modifiesPanoramaData() const
00053             { return false; }
00054             
00056         virtual bool runAlgorithm()
00057         {
00058             fitPano(o_panorama, o_resultHFOV, o_resultHeight);
00059             return true; // let's hope so.
00060         }
00061           
00062         
00063     public:
00065         static void fitPano(PanoramaData& panorama, double& HFOV, double& height);
00066             
00068         virtual double getResultHorizontalFOV()
00069         {
00070             // [TODO] if(!hasRunSuccessfully()) DEBUG;
00071             return o_resultHFOV;
00072         }
00073             
00075         virtual double getResultHeight()
00076         {
00077             // [TODO] if(!hasRunSuccessfully()) DEBUG;
00078             return o_resultHeight;
00079         }
00080         
00081     protected:
00082         double o_resultHFOV;
00083         double o_resultHeight;
00084 };
00085 
00086 
00087 
00089 class IMPEX FitPanorama : public CalculateFitPanorama
00090 {
00091 
00092     public:
00094         FitPanorama(PanoramaData& panorama)
00095          : CalculateFitPanorama(panorama)
00096         {};
00097         
00099         virtual ~FitPanorama() {};
00100         
00101         
00102     public:
00104         virtual bool modifiesPanoramaData() const
00105             { return true; }
00106             
00108         virtual bool runAlgorithm();
00109 };
00110 
00111 
00112 } // namespace
00113 #endif // _H

Generated on Fri Aug 29 01:25:41 2014 for Hugintrunk by  doxygen 1.3.9.1