[an error occurred while processing this directive]
Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

hugin_base/panodata/DestPanoImage.h

Go to the documentation of this file.
00001 // -*- c-basic-offset: 4 -*-
00002 
00029 #ifndef _PANODATA_DESTPANOIMAGE_H
00030 #define _PANODATA_DESTPANOIMAGE_H
00031 
00032 #include <hugin_shared.h>
00033 #include <vigra/diff2d.hxx>
00034 
00035 
00036 namespace HuginBase {
00037 
00038     
00041 class IMPEX DestPanoImage
00042 {
00043         
00044     public:
00046         enum Projection {
00047             RECTILINEAR = 0,
00048             CYLINDRICAL = 1,
00049             EQUIRECTANGULAR = 2,
00050             FULL_FRAME_FISHEYE = 3
00051         };
00052      
00053         
00054     public:
00056         DestPanoImage()
00057           : m_proj(EQUIRECTANGULAR),
00058             m_hfov(360),
00059             m_size(vigra::Size2D(360,180)),
00060             m_roi(vigra::Size2D(360,180))
00061         {}
00062         
00064         DestPanoImage(Projection proj, double hfov, vigra::Size2D sz)
00065           : m_proj(proj),
00066             m_hfov(hfov),
00067             m_size(sz),
00068             m_roi(sz)
00069         {}
00070         
00071         
00072     public:
00074         bool horizontalWarpNeeded() const
00075         {
00076             if (m_proj == CYLINDRICAL || m_proj == EQUIRECTANGULAR)
00077             {
00078                 if (m_hfov == 360)
00079                     return true;
00080             }
00081             
00082             return false;
00083         }
00084         
00085         
00086         // data accessors
00087 
00088     public:
00090         const Projection & getProjection() const
00091             { return m_proj; }
00092         
00094         void setProjection(const Projection & val)
00095             { m_proj = val; }
00096 
00098         const double & getHFOV() const
00099             { return m_hfov; }
00100         
00102         void setHFOV(const double & val)
00103             { m_hfov = val; }
00104 
00106         const vigra::Size2D & getSize() const
00107             { return m_size; }
00108         
00110         void setSize(const vigra::Size2D & val)
00111             { m_size = val; }
00112 
00114         const vigra::Rect2D & getROI() const
00115             { return m_roi; }
00116         
00118         void setROI(const vigra::Rect2D & val)
00119             { m_roi = val; }
00120 
00121         
00122     private:
00123         Projection m_proj;
00124         double m_hfov;
00125         vigra::Size2D m_size;
00126         vigra::Rect2D m_roi;
00127     
00128 };
00129 
00130 
00131 } // namespace
00132 
00133 #endif // _H

Generated on Mon Sep 20 01:01:27 2010 for Hugintrunk by doxygen 1.3.9.1