Isis 3 Programmer Reference
SmtkPoint.h
1 #ifndef SmtkPoint_h
2 #define SmtkPoint_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 
10 #include "Camera.h"
11 #include "GruenTypes.h"
12 #include "ControlPoint.h"
13 #include "SpecialPixel.h"
14 
15 namespace Isis {
16 
24  class PointGeometry {
25  public:
26  PointGeometry() : m_point(), m_geom() { }
27  PointGeometry(const Coordinate &pnt,
28  const Coordinate &geom = Coordinate()) :
29  m_point(pnt), m_geom(geom) { }
30  ~PointGeometry() { }
31 
32  inline bool isValid() const {
33  return ( m_point.isValid() && m_geom.isValid() );
34  }
35 
36  inline const Coordinate &getPoint() const { return (m_point); }
37  inline const Coordinate &getGeometry() const { return (m_geom); }
38 
39  Coordinate m_point;
40  Coordinate m_geom;
41  };
42 
54  class SmtkPoint {
55  public:
56  SmtkPoint() : m_matchpt(), m_regpnt(), m_geom(), m_registered(false),
57  m_isValid(false) { }
58  SmtkPoint(const PointPair &point, const PointPair &geom = PointPair()) :
59  m_matchpt(point),
60  m_regpnt(PointGeometry(point.getRight(), geom.getRight())),
61  m_geom(geom), m_registered(false), m_isValid(false) { }
62  SmtkPoint(const MatchPoint &mpt, const PointGeometry &regpnt,
63  const PointPair &geom) : m_matchpt(mpt), m_regpnt(regpnt),
64  m_geom(geom),
65  m_registered(mpt.isValid()),
66  m_isValid(false) { }
67  ~SmtkPoint() { }
68 
70  inline bool isValid() const { return (m_isValid); }
71 
73  inline double GoodnessOfFit() const { return (m_matchpt.getEigen()); }
74 
88  inline const PointPair &getPoints() const {
89  return (m_matchpt.m_point);
90  }
91 
93  inline const PointPair &getGeometry() const {
94  return (m_geom);
95  }
96 
98  inline const Coordinate &getLeft() const {
99  return (getPoints().getLeft());
100  }
101 
112  inline const Coordinate &getRight() const {
113  return (m_regpnt.getPoint());
114  }
115 
117  inline const AffineRadio &getAffine() const {
118  return (m_matchpt.m_affine);
119  }
120 
133  inline bool isRegistered() const { return (m_registered); }
134 
135  MatchPoint m_matchpt;
136  PointGeometry m_regpnt;
137  PointPair m_geom;
138  bool m_registered;
139  bool m_isValid;
140  };
141 };
142 
143 #endif
Isis::SmtkPoint::isRegistered
bool isRegistered() const
Returns registration status.
Definition: SmtkPoint.h:133
Isis::SmtkPoint
Container for SMTK match points.
Definition: SmtkPoint.h:54
Isis::SmtkPoint::getGeometry
const PointPair & getGeometry() const
Return left and right point geometry.
Definition: SmtkPoint.h:93
Isis::AffineRadio
Container for affine and radiometric parameters.
Definition: GruenTypes.h:242
Isis::SmtkPoint::getPoints
const PointPair & getPoints() const
Get initial left and right point pair.
Definition: SmtkPoint.h:88
Isis::Coordinate
Define a generic Y/X container.
Definition: GruenTypes.h:53
Isis::SmtkPoint::getRight
const Coordinate & getRight() const
Returns the registered right coordinate.
Definition: SmtkPoint.h:112
Isis::SmtkPoint::getAffine
const AffineRadio & getAffine() const
Returns the affine transform and radiometic results.
Definition: SmtkPoint.h:117
Isis::SmtkPoint::GoodnessOfFit
double GoodnessOfFit() const
Returns goodness of the fit registration.
Definition: SmtkPoint.h:73
Isis::PointPair
Define a point set of left, right and geometry at that location.
Definition: GruenTypes.h:171
Isis::Coordinate::isValid
bool isValid() const
Check for goodness.
Definition: GruenTypes.h:107
Isis::MatchPoint
Structure containing comprehensive registration info/results.
Definition: GruenTypes.h:433
Isis::PointGeometry
Container for a point and its geometry.
Definition: SmtkPoint.h:24
Isis::SmtkPoint::getLeft
const Coordinate & getLeft() const
Returns the left point.
Definition: SmtkPoint.h:98
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::SmtkPoint::isValid
bool isValid() const
Indicates the smtk portion of the point is valid.
Definition: SmtkPoint.h:70