Loading [MathJax]/jax/output/NativeMML/config.js
 |
Isis 3 Programmer Reference
|
13 #include <boost/foreach.hpp>
16 #include "LroWideAngleCameraDistortionMap.h"
33 LroWideAngleCameraDistortionMap::LroWideAngleCameraDistortionMap(
Camera *parent,
56 QString odkkey =
"INS" + QString::number(naifIkCode) +
"_OD_K";
58 std::vector<double> v_odk;
59 for(
int i = 0; i < 3; i++) {
63 m_odkFilters.push_back(v_odk);
80 if ( (vband <= 0) || (vband > m_odkFilters.size()) ) {
81 QString mess =
"Invalid band (" + QString::number(vband) +
" requested " +
82 " Must be <= " + QString::number(m_odkFilters.size());
87 p_odk = m_odkFilters[vband-1];
109 double dk1 =
p_odk[0];
110 double dk2 =
p_odk[1];
111 double dk3 =
p_odk[2];
113 double rr = dx * dx + dy * dy;
115 double dr = 1.0 + dk1 * rr + dk2 * rr * rr + dk3 * rr * rr * rr;
119 if ( dr == 0.0 )
return false;
150 double xdistorted, ydistorted;
151 double xprevious, yprevious;
153 xprevious = 1000000.0;
154 yprevious = 1000000.0;
157 double tolerance = 1.0e-6;
159 bool bConverged =
false;
161 double dk1 =
p_odk[0];
162 double dk2 =
p_odk[1];
163 double dk3 =
p_odk[2];
168 for(
int i = 0; i < 50; i++) {
169 rr = xt * xt + yt * yt;
171 dr = 1.0 + dk1 * rr + dk2 * rr * rr + dk3 * rr * rr * rr;
182 if((fabs(xt - xprevious) <= tolerance) && (fabs(yt - yprevious) <= tolerance)) {
virtual void SetDistortion(int naifIkCode)
Load distortion coefficients.
double p_focalPlaneX
Distorted focal plane x.
double p_undistortedFocalPlaneY
Undistorted focal plane y.
double p_undistortedFocalPlaneX
Undistorted focal plane x.
virtual bool SetUndistortedFocalPlane(const double ux, const double uy)
Compute distorted focal plane x/y.
void addFilter(int naifIkCode)
Add an additional set of parameters for a given LROC/WAC filter.
void setBand(int vband)
Implements band-dependant distortion parameters.
Camera * p_camera
The camera to distort/undistort.
virtual bool SetFocalPlane(const double dx, const double dy)
Compute undistorted focal plane x/y.
Distort/undistort focal plane coordinates.
@ Programmer
This error is for when a programmer made an API call that was illegal.
Namespace for the standard library.
SpiceDouble getDouble(const QString &key, int index=0)
This returns a value from the NAIF text pool.
std::vector< double > p_odk
Vector of distortion coefficients.
double p_focalPlaneY
Distorted focal plane y.
This is free and unencumbered software released into the public domain.