90 if (filter.toUpper().compare(
"UNKNOWN") == 0) {
91 odkkey =
"INS" +
toString(naifIkCode) +
"_OD_K";
94 odkkey =
"INS" +
toString(naifIkCode) +
"_OD_K_" + filter.trimmed().toUpper();
98 for (
int i = 0; i < 5; ++i) {
112 if (filter.toUpper().compare(
"UNKNOWN") == 0) {
113 odcenterkey =
"INS" +
toString(naifIkCode) +
"_OD_CENTER";
116 odcenterkey =
"INS" +
toString(naifIkCode) +
"_OD_CENTER_" + filter.trimmed().toUpper();
140 if (
p_odk.size() < 2) {
152 double xx, yy, r, rr, rrr, rrrr;
153 double xdistortion, ydistortion;
154 double xdistorted, ydistorted;
155 double xprevious, yprevious;
158 xprevious = 1000000.0;
159 yprevious = 1000000.0;
161 double tolerance = 0.000001;
163 bool bConverged =
false;
168 for(
int i = 0; i < 50; i++) {
169 xx = (xt-x0) * (xt-x0);
170 yy = (yt-y0) * (yt-y0);
179 xdistortion = drOverR * (xt-x0);
180 ydistortion = drOverR * (yt-y0);
183 xt = dx - xdistortion;
184 yt = dy - ydistortion;
190 if((fabs(xt - xprevious) <= tolerance) && (fabs(yt - yprevious) <= tolerance)) {
227 if (
p_odk.size() < 2) {
239 double r = qSqrt(((x-x0) * (x-x0)) + ((y - y0) * (y-y0)));
double p_focalPlaneX
Distorted focal plane x.
virtual bool SetFocalPlane(double dx, double dy)
Compute undistorted focal plane x/y.
virtual void SetDistortion(int naifIkCode, QString filterName)
Load distortion coefficients and center-of-distortion for OCAMS.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
double m_detectorOriginSample
The origin of the detector's sample coordinate.
double p_undistortedFocalPlaneX
Undistorted focal plane x.
Camera * p_camera
The camera to distort/undistort.
double m_distortionOriginSample
The distortion's origin sample coordinate.
double m_detectorOriginLine
The origin of the detector's line coordinate.
Distort/undistort focal plane coordinates.
double PixelPitch() const
Returns the pixel pitch.
virtual ~OsirisRexDistortionMap()
Default Destructor.
const double E
Sets some basic constants for use in ISIS programming.
CameraFocalPlaneMap * FocalPlaneMap()
Returns a pointer to the CameraFocalPlaneMap object.
double DetectorSampleOrigin() const
double p_focalPlaneY
Distorted focal plane y.
double p_undistortedFocalPlaneY
Undistorted focal plane y.
OsirisRexDistortionMap(Camera *parent, double zDirection=1.0)
OSIRIS REx Camera distortion map constructor.
Namespace for ISIS/Bullet specific routines.
std::vector< double > p_odk
Vector of distortion coefficients.
virtual bool SetUndistortedFocalPlane(double ux, double uy)
Compute distorted focal plane x/y.
double m_pixelPitch
The pixel pitch for OCAMS.
double m_distortionOriginLine
The distortion's origin line coordinate.
double DetectorLineOrigin() const