00001 // -*- c-basic-offset: 4 -*- 00026 #ifndef _BASICALGORITHMS_CALCULATECFOV_H 00027 #define _BASICALGORITHMS_CALCULATECFOV_H 00028 00029 #include <hugin_shared.h> 00030 #include <algorithms/PanoramaAlgorithm.h> 00031 00032 #include <panodata/PanoramaData.h> 00033 00034 00035 namespace HuginBase { 00036 00037 00038 class IMPEX CalculateFOV : public PanoramaAlgorithm 00039 { 00040 00041 public: 00043 CalculateFOV(PanoramaData& panorama) 00044 : PanoramaAlgorithm(panorama) 00045 {}; 00046 00048 virtual ~CalculateFOV() {}; 00049 00050 00051 public: 00053 bool modifiesPanoramaData() const 00054 { return false; } 00055 00057 bool runAlgorithm() 00058 { 00059 o_resultFOV = calcFOV(o_panorama); 00060 return true; // let's hope so. 00061 } 00062 00063 00064 public: 00065 00067 static hugin_utils::FDiff2D calcFOV(const PanoramaData& panorama); 00068 00070 double getResultHorizontalFOV() 00071 { 00072 // [TODO] if(!hasRunSuccessfully()) DEBUG; 00073 return o_resultFOV.x; 00074 } 00075 00077 double getResultVerticalFOV() 00078 { 00079 // [TODO] if(!hasRunSuccessfully()) DEBUG; 00080 return o_resultFOV.y; 00081 } 00082 00084 hugin_utils::FDiff2D getResultFOV() 00085 { 00086 // [TODO] if(!hasRunSuccessfully()) DEBUG; 00087 return o_resultFOV; 00088 } 00089 00090 00091 protected: 00092 hugin_utils::FDiff2D o_resultFOV; 00093 }; 00094 00095 00096 } 00097 #endif // _H
1.3.9.1