[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/ControlPoint.h

Go to the documentation of this file.
00001 // -*- c-basic-offset: 4 -*-
00024 #ifndef _PANORAMAMEMENTO_H
00025 #define _PANORAMAMEMENTO_H
00026 
00027 #include <hugin_shared.h>
00028 
00029 #include <string>
00030 #include <vector>
00031 
00032 #include <vigra_ext/Interpolators.h>
00033 
00034 
00035 namespace HuginBase {
00036 
00038 class IMPEX ControlPoint
00039 {
00040     
00041 public:
00045     enum OptimizeMode {
00046         X_Y = 0,  
00047         X,        
00048         Y         
00049     };
00050     
00051     
00052 public:
00054     ControlPoint()
00055         : image1Nr(0), image2Nr(0),
00056           x1(0),y1(0),
00057           x2(0),y2(0),
00058           error(0), mode(X_Y)
00059         { };
00060 
00062 //  ControlPoint(Panorama & pano, const QDomNode & node);
00063     
00065     ControlPoint(unsigned int img1, double sX, double sY,
00066                  unsigned int img2, double dX, double dY,
00067                  int mode = X_Y)
00068         : image1Nr(img1), image2Nr(img2),
00069           x1(sX),y1(sY),
00070           x2(dX),y2(dY),
00071           error(0), mode(mode)
00072         { };
00073 
00075     bool operator==(const ControlPoint & o) const;
00076    
00077     
00078 public:
00080     const std::string & getModeName(OptimizeMode mode) const;
00081 
00087     const std::string getCPString() const;
00088 
00090     void mirror();
00091 
00092     
00093 public:
00095 //  QDomNode toXML(QDomDocument & doc) const;
00096 
00098 //  void setFromXML(const QDomNode & elem, Panorama & pano);
00099     
00100     
00101 public:    
00102     // TODO: accessors
00103     
00104     unsigned int image1Nr;
00105     unsigned int image2Nr;
00106     double x1,y1;
00107     double x2,y2;
00108     double error;
00109     int mode;
00110 
00111     static std::string modeNames[];
00112 };
00113 
00114 
00116 typedef std::vector<ControlPoint> CPVector;
00117 
00118 
00119 
00120 } // namespace
00121 #endif // _PANORAMAMEMENTO_H

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