Isis 3 Programmer Reference
LroWideAngleCameraFocalPlaneMap.cpp
Go to the documentation of this file.
1 
23 #include <cmath>
24 #include <sstream>
25 #include <iomanip>
26 #include <algorithm>
27 
28 #include "Camera.h"
29 #include "IString.h"
31 
32 using namespace std;
33 
34 namespace Isis {
47  LroWideAngleCameraFocalPlaneMap::LroWideAngleCameraFocalPlaneMap(Camera *parent,
48  int naifIkCode) :
49  CameraFocalPlaneMap(parent,
50  naifIkCode) {
51  }
52 
53 
70 
71  QString xkey = "INS" + toString(naifIkCode) + "_TRANSX";
72  QString ykey = "INS" + toString(naifIkCode) + "_TRANSY";
73  QString ixkey = "INS" + toString(naifIkCode) + "_ITRANSS";
74  QString iykey = "INS" + toString(naifIkCode) + "_ITRANSL";
75  TranslationParameters trans_p;
76  for (int i = 0; i < 3; ++i) {
77  trans_p.m_transx[i] = p_camera->getDouble(xkey, i);
78  trans_p.m_transy[i] = p_camera->getDouble(ykey, i);
79  trans_p.m_itranss[i] = p_camera->getDouble(ixkey, i);
80  trans_p.m_itransl[i] = p_camera->getDouble(iykey, i);
81  }
82 
83  m_transparms.push_back(trans_p);
84  return;
85  }
86 
87 
101  if ( (vband <= 0) || (vband > m_transparms.size()) ) {
102  QString mess = "Invalid band (" + QString::number(vband) + " requested " +
103  " Must be <= " + QString::number(m_transparms.size());
105  }
106 
107  // Install new parameters
108  int iband = vband - 1;
109  for ( int i = 0 ; i < 3 ; i++) {
110  p_transx[i] = m_transparms[iband].m_transx[i];
111  p_transy[i] = m_transparms[iband].m_transy[i];
112  p_itranss[i] = m_transparms[iband].m_itranss[i];
113  p_itransl[i] = m_transparms[iband].m_itransl[i];
114  }
115 
116  return;
117  }
118 } // namespace Isis
Namespace for the standard library.
double p_itranss[3]
The x transition from distorted to detector.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:226
double p_transx[3]
The x transition from detector to distorted.
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:162
Convert between distorted focal plane and detector coordinates.
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:40
void setBand(int vband)
Implements band-dependant focal plane parameters.
void addFilter(int naifIkCode)
Add an additional set of parameters for a given LROC/WAC filter.
Isis exception class.
Definition: IException.h:107
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
Camera * p_camera
Camera of the image.
double p_itransl[3]
The y transition from distorted to detector.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
double p_transy[3]
The y transition from detector to distorted.
SpiceDouble getDouble(const QString &key, int index=0)
This returns a value from the NAIF text pool.
Definition: Spice.cpp:963