ControlPoint.h

Go to the documentation of this file.
00001 // -*- c-basic-offset: 4 -*-
00024 #ifndef _CONTROLPOINT_H
00025 #define _CONTROLPOINT_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(unsigned int img1, double sX, double sY,
00063                  unsigned int img2, double dX, double dY,
00064                  int mode = X_Y)
00065         : image1Nr(img1), image2Nr(img2),
00066           x1(sX),y1(sY),
00067           x2(dX),y2(dY),
00068           error(0), mode(mode)
00069         { };
00070 
00072     bool operator==(const ControlPoint & o) const;
00073    
00074     
00075 public:
00076 
00082     const std::string getCPString() const;
00083 
00085     void mirror();
00086 
00087 public:    
00088     // TODO: accessors
00089     
00090     unsigned int image1Nr;
00091     unsigned int image2Nr;
00092     double x1,y1;
00093     double x2,y2;
00094     double error;
00095     int mode;
00096 };
00097 
00099 typedef std::vector<ControlPoint> CPVector;
00100 // pair of global control point number and corrosponding control point
00101 typedef std::pair<typename CPVector::size_type, ControlPoint> CPoint;
00102 typedef std::vector<CPoint> CPointVector;
00103 
00104 } // namespace
00105 #endif // _CONTROLPOINT_H

Generated on 4 May 2016 for Hugintrunk by  doxygen 1.4.7