33 #include "CubeManager.h"    55     m_usedCubes->SetNumOpenCubes(50);
    68      m_csvOutput = csvOutput;
    92     m_currentCube = m_usedCubes->OpenCube(cubeFileName);
    93     m_camera = m_currentCube->camera();
   111                                       const bool allowOutside, 
const bool allowErrors) {
   113       bool passed = m_camera->SetImage(sample, line);
   114       return GetPointInfo(passed, allowOutside, allowErrors);
   133       bool passed = m_camera->SetImage(m_currentCube->sampleCount() / 2.0,
   134                                        m_currentCube->lineCount() / 2.0);
   135       return GetPointInfo(passed, allowOutside, allowErrors);
   155                                        const bool allowOutside,
   156                                        const bool allowErrors) {
   158       bool passed = m_camera->SetImage(sample, m_currentCube->lineCount() / 2.0);
   159       return GetPointInfo(passed, allowOutside, allowErrors);
   179                                      const bool allowOutside,
   180                                      const bool allowErrors) {
   182       bool passed = m_camera->SetImage(m_currentCube->sampleCount() / 2.0, line);
   183       return GetPointInfo(passed, allowOutside, allowErrors);
   204                                        const bool allowOutside, 
const bool allowErrors) {
   206       bool passed = m_camera->SetUniversalGround(latitude, longitude);
   207       return GetPointInfo(passed, allowOutside, allowErrors);
   221     if (m_currentCube == NULL) {
   222       string msg = 
"Please set a cube before setting parameters";
   356     bool noErrors = passed;
   358     if (!m_camera->HasSurfaceIntersection()) {
   359       error = 
"Requested position does not project in camera model; no surface intersection";
   363     if (!m_camera->InCube() && !allowOutside) {
   364       error = 
"Requested position does not project in camera model; not inside cube";
   370       for (
int i = 0; i < gp->
keywords(); i++) {
   371         QString name = (*gp)[i].name();
   373         if (name == 
"BodyFixedCoordinate" || name == 
"SpacecraftPosition" ||
   374             name == 
"SunPosition") {
   375           (*gp)[i].addValue(
"NULL");
   376           (*gp)[i].addValue(
"NULL");
   377           (*gp)[i].addValue(
"NULL");
   380           (*gp)[i].setValue(
"NULL");
   389                       toString(m_camera->time().Et()), 
"seconds");
   391       QString utc = m_camera->time().UTC();
   399       Brick b(3, 3, 1, m_currentCube->pixelType());
   401       int intSamp = (int)(m_camera->Sample() + 0.5);
   402       int intLine = (int)(m_camera->Line() + 0.5);
   404       m_currentCube->read(b);
   406       double pB[3], spB[3], sB[3];
   408       double ssplat, ssplon, sslat, sslon, ocentricLat, ographicLat, pe360Lon, pw360Lon;
   416                         m_camera->RightAscension()), 
"DEGREE");
   418                         m_camera->Declination()), 
"DEGREE");
   419         ocentricLat = m_camera->UniversalLatitude();
   424         m_camera->radii(radii);
   426                                               radii[0].kilometers(),
   427                                               radii[2].kilometers());
   430         pe360Lon = m_camera->UniversalLongitude();
   445         m_camera->Coordinate(pB);
   451                         m_camera->LocalRadius().meters()), 
"meters");
   453                         m_camera->SampleResolution()), 
"meters/pixel");
   455                         m_camera->LineResolution()), 
"meters/pixel");
   458                     toString(m_camera->ObliqueDetectorResolution()),
"meters");
   460                     toString(m_camera->ObliqueLineResolution()),
"meters");
   462                     toString(m_camera->ObliqueSampleResolution()),
"meters");
   464                     toString(m_camera->ObliquePixelResolution()), 
"meters/pix");
   468         m_camera->instrumentPosition(spB);
   474         double spacecraftAzi = m_camera->SpacecraftAzimuth();
   483                         m_camera->SlantDistance()), 
"km");
   485                         m_camera->targetCenterDistance()), 
"km");
   486         m_camera->subSpacecraftPoint(ssplat, ssplon);
   490                         m_camera->SpacecraftAltitude()), 
"km");
   492                         m_camera->OffNadirAngle()), 
"DEGREE");
   493         double subspcgrdaz = m_camera->GroundAzimuth(m_camera->UniversalLatitude(),
   494                                               m_camera->UniversalLongitude(),
   499         m_camera->sunPosition(sB);
   505         double sunAzi = m_camera->SunAzimuth();
   514                         m_camera->SolarDistance()), 
"AU");
   515         m_camera->subSolarPoint(sslat, sslon);
   518         double subsolgrdaz = m_camera->GroundAzimuth(m_camera->UniversalLatitude(),
   519                                               m_camera->UniversalLongitude(),
   527                         m_camera->IncidenceAngle()), 
"DEGREE");
   529                         m_camera->EmissionAngle()), 
"DEGREE");
   531         double northAzi = m_camera->NorthAzimuth();
   540                         m_camera->time().Et()), 
"seconds");
   542         utc = m_camera->time().UTC();
   545                         m_camera->LocalSolarTime()), 
"hour");
   547                         m_camera->solarLongitude().degrees()), 
"DEGREE");
   549         std::vector<double>lookB = m_camera->lookDirectionBodyFixed();
   553         gp->
findKeyword(
"LookDirectionBodyFixed").
addComment(
"Look Direction Unit Vectors in Body Fixed, J2000, and Camera Coordinate Systems.");
   555         std::vector<double>lookJ = m_camera->lookDirectionJ2000();
   561         m_camera->LookDirection(lookC);
   591     return m_currentCube;
 int keywords() const
Returns the number of keywords contained in the PvlContainer. 
 
Cube * cube()
Retrieves a pointer to the current cube. 
 
CameraPointInfo()
Constructor, initializes CubeManager and other variables for use. 
 
Camera * camera()
Retrieves a pointer to the camera. 
 
Buffer for containing a three dimensional section of an image. 
 
Namespace for the standard library. 
 
void SetBasePosition(const int start_sample, const int start_line, const int start_band)
This method is used to set the base position of the shape buffer. 
 
QString toString(bool boolToConvert)
Global function to convert a boolean to a string. 
 
virtual ~CameraPointInfo()
Destructor, deletes CubeManager object used. 
 
void addKeyword(const PvlKeyword &keyword, const InsertMode mode=Append)
Add a keyword to the container. 
 
bool IsValidPixel(const double d)
Returns if the input pixel is valid. 
 
Unless noted otherwise, the portions of Isis written by the USGS are public domain. 
 
This error is for when a programmer made an API call that was illegal. 
 
Distance measurement, usually in meters. 
 
void addComment(QString comment)
Add a comment to the PvlKeyword. 
 
static double ToPositiveWest(const double lon, const int domain)
This method converts a longitude into the positive west direction. 
 
static double To180Domain(const double lon)
This method converts a longitude into the -180 to 180 domain. 
 
void SetCube(const QString &cubeFileName)
SetCube opens the given cube in a CubeManager. 
 
PvlGroup * SetImage(const double sample, const double line, const bool outside=false, const bool error=false)
SetImage sets a sample, line image coordinate in the camera so data can be accessed. 
 
bool CheckCube()
CheckCube checks that a cube has been set before the data for a point is accessed. 
 
Contains multiple PvlContainers. 
 
#define _FILEINFO_
Macro for the filename and line number. 
 
A single keyword-value pair. 
 
A type of error that cannot be classified as any of the other error types. 
 
void SetCSVOutput(bool csvOutput)
Set the output format (true is CSV, false is PVL) 
 
PvlGroup * SetLine(const double line, const bool outside=false, const bool error=false)
SetLine sets the image coordinates to the center sample and the given line. 
 
double ToPlanetographic(const double lat) const
This method converts a planetocentric latitude to a planetographic latitude. 
 
Class for quick re-accessing of cubes based on file name. 
 
PvlKeyword & findKeyword(const QString &name)
Find a keyword with a specified name. 
 
Unless noted otherwise, the portions of Isis written by the USGS are public domain. 
 
QString PixelToString(double d)
Takes a double pixel value and returns the name of the pixel type as a string. 
 
Namespace for ISIS/Bullet specific routines. 
 
virtual PvlGroup * GetPointInfo(bool passed, bool outside, bool errors)
GetPointInfo builds the PvlGroup containing all the important information derived from the Camera...
 
void setValue(QString value, QString unit="")
Sets new values. 
 
PvlGroup * SetSample(const double sample, const bool outside=false, const bool error=false)
SetSample sets the image coordinates to the center line and the given sample. 
 
PvlGroup * SetGround(const double latitude, const double longitude, const bool outside=false, const bool error=false)
SetGround sets a latitude, longitude grrund coordinate in the camera so data can be accessed...
 
PvlGroup * SetCenter(const bool outside=false, const bool error=false)
SetCenter sets the image coordinates to the center of the image. 
 
void addValue(QString value, QString unit="")
Adds a value with units. 
 
IO Handler for Isis Cubes.