Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages
hugin_base/panodata/Lens.h
Go to the documentation of this file.00001 // -*- c-basic-offset: 4 -*- 00028 #ifndef _PANODATA_LENS_H 00029 #define _PANODATA_LENS_H 00030 00031 00032 #include <string> 00033 #include <vector> 00034 #include <map> 00035 #include <hugin_shared.h> 00036 00037 #include <hugin_math/hugin_math.h> 00038 #include <panodata/PanoramaVariable.h> 00039 #include <panodata/SrcPanoImage.h> 00040 00041 namespace HuginBase { 00042 00043 00044 class IMPEX Lens { 00045 00046 public: 00047 typedef BaseSrcPanoImage::Projection LensProjectionFormat; 00048 00052 Lens(); 00053 00054 00055 public: 00057 // QDomElement toXML(QDomDocument & doc); 00058 00060 // void setFromXML(const QDomNode & node); 00061 00067 // bool readEXIF(const std::string & filename); 00068 00069 00070 public: 00072 LensProjectionFormat getProjection() const 00073 { return m_projectionFormat; } 00074 00076 void setProjection(LensProjectionFormat l) 00077 { m_projectionFormat = l; } 00078 00080 double getHFOV() const; 00081 00083 void setHFOV(double d); 00084 00086 double getFocalLength() const; 00087 00089 double getCropFactor() const 00090 { return m_cropFactor; }; 00091 00093 void setCropFactor(double newCropFactor) 00094 { m_cropFactor=newCropFactor; }; 00095 00098 double getAspectRatio() const; 00099 00102 bool isLandscape() const; 00103 00105 void setEV(double ev); 00106 00108 vigra::Size2D getImageSize() const 00109 { return m_imageSize; } 00110 00112 void setImageSize(const vigra::Size2D & sz) 00113 { m_imageSize = sz; } 00114 00115 // updates everything, including the lens variables. 00116 void update(const Lens & l); 00117 00118 00119 public: //? 00120 00121 // bool isLandscape; 00122 00123 // these are the lens specific settings. 00124 // lens correction parameters 00125 LensVarMap variables; 00126 static const char *variableNames[]; 00127 00128 bool m_hasExif; 00129 00130 00131 private: 00132 LensProjectionFormat m_projectionFormat; 00133 vigra::Size2D m_imageSize; 00134 double m_cropFactor; 00135 00136 }; 00137 00138 00140 typedef std::vector<Lens> LensVector; 00141 00142 00143 } // namespace 00144 #endif // _H
1.3.9.1