USGS

Isis 3.0 Developer's Reference (API)

Home

SmtkPoint.h

Go to the documentation of this file.
00001 #ifndef SmtkPoint_h
00002 #define SmtkPoint_h
00003 
00027 #include "Camera.h"
00028 #include "GruenTypes.h"
00029 #include "ControlPoint.h"
00030 #include "SpecialPixel.h"
00031 
00032 namespace Isis {
00033 
00041   class PointGeometry {
00042     public:
00043       PointGeometry() : m_point(), m_geom() {  }
00044       PointGeometry(const Coordinate &pnt, 
00045                     const Coordinate &geom = Coordinate()) : 
00046                     m_point(pnt), m_geom(geom) {    }
00047       ~PointGeometry() {  }
00048 
00049       inline bool isValid() const {
00050         return ( m_point.isValid() && m_geom.isValid() );
00051       }
00052 
00053       inline const Coordinate &getPoint() const { return (m_point);   }
00054       inline const Coordinate &getGeometry() const { return (m_geom); }
00055 
00056       Coordinate m_point;
00057       Coordinate m_geom;
00058   };
00059 
00071   class SmtkPoint {
00072     public:
00073       SmtkPoint() : m_matchpt(), m_regpnt(), m_geom(), m_registered(false),
00074                     m_isValid(false) { }
00075       SmtkPoint(const PointPair &point, const PointPair &geom = PointPair()) :
00076                 m_matchpt(point), 
00077                 m_regpnt(PointGeometry(point.getRight(), geom.getRight())), 
00078                 m_geom(geom), m_registered(false), m_isValid(false)  { } 
00079       SmtkPoint(const MatchPoint &mpt, const PointGeometry &regpnt,
00080                 const PointPair &geom) : m_matchpt(mpt), m_regpnt(regpnt),
00081                                          m_geom(geom), 
00082                                          m_registered(mpt.isValid()), 
00083                                          m_isValid(false) { } 
00084       ~SmtkPoint() { }
00085   
00087       inline bool isValid() const { return (m_isValid); }
00088   
00090       inline double GoodnessOfFit() const { return (m_matchpt.getEigen()); }
00091   
00105       inline const PointPair &getPoints() const {
00106         return (m_matchpt.m_point);
00107       }
00108   
00110       inline const PointPair &getGeometry() const {
00111         return (m_geom);
00112       }
00113 
00115       inline const Coordinate &getLeft() const {
00116         return (getPoints().getLeft());
00117       }
00118 
00129       inline const Coordinate &getRight() const {
00130         return (m_regpnt.getPoint());
00131       }
00132   
00134       inline const AffineRadio &getAffine() const {
00135         return (m_matchpt.m_affine);
00136       }
00137 
00150       inline bool isRegistered() const { return (m_registered);  }
00151   
00152       MatchPoint    m_matchpt;
00153       PointGeometry m_regpnt;
00154       PointPair     m_geom;
00155       bool          m_registered;
00156       bool          m_isValid;
00157     };
00158 };
00159 
00160 #endif