Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Lens.h
Go to the documentation of this file.
1 // -*- c-basic-offset: 4 -*-
28 #ifndef _PANODATA_LENS_H
29 #define _PANODATA_LENS_H
30 
31 
32 #include <string>
33 #include <vector>
34 #include <map>
35 #include <hugin_shared.h>
36 
37 #include <hugin_math/hugin_math.h>
39 #include <panodata/SrcPanoImage.h>
40 
41 namespace HuginBase {
42 
43 
44 class IMPEX Lens {
45 
46  public:
48 
52  Lens();
53 
54  public:
57  { return m_projectionFormat; }
58 
61  { m_projectionFormat = l; }
62 
64  double getHFOV() const;
65 
67  void setHFOV(double d);
68 
70  double getFocalLength() const;
71 
73  double getCropFactor() const
74  { return m_cropFactor; };
75 
77  void setCropFactor(double newCropFactor)
78  { m_cropFactor=newCropFactor; };
79 
82  double getAspectRatio() const;
83 
86  bool isLandscape() const;
87 
89  vigra::Size2D getImageSize() const
90  { return m_imageSize; }
91 
93  void setImageSize(const vigra::Size2D & sz)
94  { m_imageSize = sz; }
95 
96  // updates everything, including the lens variables.
97  void update(const Lens & l);
98 
99 
100  public: //?
101 
102  // bool isLandscape;
103 
104  // these are the lens specific settings.
105  // lens correction parameters
107 
108 #ifndef SWIG
109  // dimensionless array not supported by SWIG
110  static const char *variableNames[];
111 #endif
112 
113  bool m_hasExif;
114 
115 
116  private:
118  vigra::Size2D m_imageSize;
119  double m_cropFactor;
120 
121 };
122 
123 
125 typedef std::vector<Lens> LensVector;
126 
127 
128 } // namespace
129 #endif // _H
LensVarMap variables
Definition: Lens.h:106
vigra::Size2D getImageSize() const
get the image size, in pixels
Definition: Lens.h:89
void setImageSize(const vigra::Size2D &sz)
set image size in pixels
Definition: Lens.h:93
misc math function &amp; classes used by other parts of the program
void setProjection(LensProjectionFormat l)
set projection type
Definition: Lens.h:60
std::map< std::string, LensVariable > LensVarMap
vigra::Size2D m_imageSize
Definition: Lens.h:118
LensProjectionFormat getProjection() const
get projection type
Definition: Lens.h:56
bool m_hasExif
Definition: Lens.h:113
std::vector< Lens > LensVector
Definition: Lens.h:125
#define IMPEX
Definition: hugin_shared.h:39
void setCropFactor(double newCropFactor)
sets the crop factor
Definition: Lens.h:77
double m_cropFactor
Definition: Lens.h:119
double getCropFactor() const
get crop factor, d35mm/dreal
Definition: Lens.h:73
LensProjectionFormat m_projectionFormat
Definition: Lens.h:117
BaseSrcPanoImage::Projection LensProjectionFormat
Definition: Lens.h:47