Isis 3 Programmer Reference
CameraPointInfo.cpp
1 
6 /* SPDX-License-Identifier: CC0-1.0 */
7 #include "CameraPointInfo.h"
8 
9 #include <QDebug>
10 
11 #include <iomanip>
12 
13 #include "Brick.h"
14 #include "Camera.h"
15 #include "CameraFocalPlaneMap.h"
16 #include "Cube.h"
17 #include "CubeManager.h"
18 #include "Distance.h"
19 #include "IException.h"
20 #include "iTime.h"
21 #include "Longitude.h"
22 #include "PvlGroup.h"
23 #include "SpecialPixel.h"
24 #include "TProjection.h"
25 
26 using namespace Isis;
27 using namespace std;
28 
29 namespace Isis {
30 
31 
37  m_usedCubes = NULL;
38  m_usedCubes = new CubeManager();
39  m_usedCubes->SetNumOpenCubes(50);
40  m_currentCube = NULL;
41  m_camera = NULL;
42  m_csvOutput = false;
43  }
44 
50  void CameraPointInfo::SetCSVOutput(bool csvOutput) {
51 
52  m_csvOutput = csvOutput;
53 
54  }
55 
61  if (m_usedCubes) {
62  delete m_usedCubes;
63  m_usedCubes = NULL;
64  }
65  }
66 
67 
75  void CameraPointInfo::SetCube(const QString &cubeFileName) {
76  m_currentCube = m_usedCubes->OpenCube(cubeFileName);
77  m_camera = m_currentCube->camera();
78  }
79 
80 
94  PvlGroup *CameraPointInfo::SetImage(const double sample, const double line,
95  const bool allowOutside, const bool allowErrors) {
96  if (CheckCube()) {
97  bool passed = m_camera->SetImage(sample, line);
98  return GetPointInfo(passed, allowOutside, allowErrors);
99  }
100  // Should never get here, error will be thrown in CheckCube()
101  return NULL;
102  }
103 
104 
115  PvlGroup *CameraPointInfo::SetCenter(const bool allowOutside, const bool allowErrors) {
116  if (CheckCube()) {
117  bool passed = m_camera->SetImage(m_currentCube->sampleCount() / 2.0,
118  m_currentCube->lineCount() / 2.0);
119  return GetPointInfo(passed, allowOutside, allowErrors);
120  }
121  // Should never get here, error will be thrown in CheckCube()
122  return NULL;
123  }
124 
125 
138  PvlGroup *CameraPointInfo::SetSample(const double sample,
139  const bool allowOutside,
140  const bool allowErrors) {
141  if (CheckCube()) {
142  bool passed = m_camera->SetImage(sample, m_currentCube->lineCount() / 2.0);
143  return GetPointInfo(passed, allowOutside, allowErrors);
144  }
145  // Should never get here, error will be thrown in CheckCube()
146  return NULL;
147  }
148 
149 
162  PvlGroup *CameraPointInfo::SetLine(const double line,
163  const bool allowOutside,
164  const bool allowErrors) {
165  if (CheckCube()) {
166  bool passed = m_camera->SetImage(m_currentCube->sampleCount() / 2.0, line);
167  return GetPointInfo(passed, allowOutside, allowErrors);
168  }
169  // Should never get here, error will be thrown in CheckCube()
170  return NULL;
171  }
172 
173 
187  PvlGroup *CameraPointInfo::SetGround(const double latitude, const double longitude,
188  const bool allowOutside, const bool allowErrors) {
189  if (CheckCube()) {
190  bool passed = m_camera->SetUniversalGround(latitude, longitude);
191  return GetPointInfo(passed, allowOutside, allowErrors);
192  }
193  // Should never get here, error will be thrown in CheckCube()
194  return NULL;
195  }
196 
197 
205  if (m_currentCube == NULL) {
206  string msg = "Please set a cube before setting parameters";
207  throw IException(IException::Programmer, msg, _FILEINFO_);
208  return false;
209  }
210  return true;
211  }
212 
213 
227  PvlGroup *CameraPointInfo::GetPointInfo(bool passed, bool allowOutside, bool allowErrors) {
228  PvlGroup *gp = new PvlGroup("GroundPoint");
229 
230  //Outputting in PVL format
231  if(!m_csvOutput)
232  {
233  gp->addKeyword(PvlKeyword("Filename"));
234  gp->addKeyword(PvlKeyword("Sample"));
235  gp->addKeyword(PvlKeyword("Line"));
236  gp->addKeyword(PvlKeyword("PixelValue"));
237  gp->addKeyword(PvlKeyword("RightAscension"));
238  gp->addKeyword(PvlKeyword("Declination"));
239  gp->addKeyword(PvlKeyword("PlanetocentricLatitude"));
240  gp->addKeyword(PvlKeyword("PlanetographicLatitude"));
241  gp->addKeyword(PvlKeyword("PositiveEast360Longitude"));
242  gp->addKeyword(PvlKeyword("PositiveEast180Longitude"));
243  gp->addKeyword(PvlKeyword("PositiveWest360Longitude"));
244  gp->addKeyword(PvlKeyword("PositiveWest180Longitude"));
245  gp->addKeyword(PvlKeyword("BodyFixedCoordinate"));
246  gp->addKeyword(PvlKeyword("LocalRadius"));
247  gp->addKeyword(PvlKeyword("SampleResolution"));
248  gp->addKeyword(PvlKeyword("LineResolution"));
249  gp->addKeyword(PvlKeyword("ObliqueDetectorResolution"));
250  gp->addKeyword(PvlKeyword("ObliquePixelResolution"));
251  gp->addKeyword(PvlKeyword("ObliqueLineResolution"));
252  gp->addKeyword(PvlKeyword("ObliqueSampleResolution"));
253  gp->addKeyword(PvlKeyword("SpacecraftPosition"));
254  gp->addKeyword(PvlKeyword("SpacecraftAzimuth"));
255  gp->addKeyword(PvlKeyword("SlantDistance"));
256  gp->addKeyword(PvlKeyword("TargetCenterDistance"));
257  gp->addKeyword(PvlKeyword("SubSpacecraftLatitude"));
258  gp->addKeyword(PvlKeyword("SubSpacecraftLongitude"));
259  gp->addKeyword(PvlKeyword("SpacecraftAltitude"));
260  gp->addKeyword(PvlKeyword("OffNadirAngle"));
261  gp->addKeyword(PvlKeyword("SubSpacecraftGroundAzimuth"));
262  gp->addKeyword(PvlKeyword("SunPosition"));
263  gp->addKeyword(PvlKeyword("SubSolarAzimuth"));
264  gp->addKeyword(PvlKeyword("SolarDistance"));
265  gp->addKeyword(PvlKeyword("SubSolarLatitude"));
266  gp->addKeyword(PvlKeyword("SubSolarLongitude"));
267  gp->addKeyword(PvlKeyword("SubSolarGroundAzimuth"));
268  gp->addKeyword(PvlKeyword("Phase"));
269  gp->addKeyword(PvlKeyword("Incidence"));
270  gp->addKeyword(PvlKeyword("Emission"));
271  gp->addKeyword(PvlKeyword("NorthAzimuth"));
272  gp->addKeyword(PvlKeyword("EphemerisTime"));
273  gp->addKeyword(PvlKeyword("UTC"));
274  gp->addKeyword(PvlKeyword("LocalSolarTime"));
275  gp->addKeyword(PvlKeyword("SolarLongitude"));
276  gp->addKeyword(PvlKeyword("LookDirectionBodyFixed"));
277  gp->addKeyword(PvlKeyword("LookDirectionJ2000"));
278  gp->addKeyword(PvlKeyword("LookDirectionCamera"));
279 
280  if (allowErrors) gp->addKeyword(PvlKeyword("Error"));
281  }
282 
283  else {
284 
285  gp->addKeyword(PvlKeyword("Filename"));
286  gp->addKeyword(PvlKeyword("Sample"));
287  gp->addKeyword(PvlKeyword("Line"));
288  gp->addKeyword(PvlKeyword("PixelValue"));
289  gp->addKeyword(PvlKeyword("RightAscension"));
290  gp->addKeyword(PvlKeyword("Declination"));
291  gp->addKeyword(PvlKeyword("PlanetocentricLatitude"));
292  gp->addKeyword(PvlKeyword("PlanetographicLatitude"));
293  gp->addKeyword(PvlKeyword("PositiveEast360Longitude"));
294  gp->addKeyword(PvlKeyword("PositiveEast180Longitude"));
295  gp->addKeyword(PvlKeyword("PositiveWest360Longitude"));
296  gp->addKeyword(PvlKeyword("PositiveWest180Longitude"));
297  gp->addKeyword(PvlKeyword("BodyFixedCoordinate"));
298  gp->addKeyword(PvlKeyword("LocalRadius"));
299  gp->addKeyword(PvlKeyword("SampleResolution"));
300  gp->addKeyword(PvlKeyword("LineResolution"));
301  gp->addKeyword(PvlKeyword("SpacecraftPosition"));
302  gp->addKeyword(PvlKeyword("SpacecraftAzimuth"));
303  gp->addKeyword(PvlKeyword("SlantDistance"));
304  gp->addKeyword(PvlKeyword("TargetCenterDistance"));
305  gp->addKeyword(PvlKeyword("SubSpacecraftLatitude"));
306  gp->addKeyword(PvlKeyword("SubSpacecraftLongitude"));
307  gp->addKeyword(PvlKeyword("SpacecraftAltitude"));
308  gp->addKeyword(PvlKeyword("OffNadirAngle"));
309  gp->addKeyword(PvlKeyword("SubSpacecraftGroundAzimuth"));
310  gp->addKeyword(PvlKeyword("SunPosition"));
311  gp->addKeyword(PvlKeyword("SubSolarAzimuth"));
312  gp->addKeyword(PvlKeyword("SolarDistance"));
313  gp->addKeyword(PvlKeyword("SubSolarLatitude"));
314  gp->addKeyword(PvlKeyword("SubSolarLongitude"));
315  gp->addKeyword(PvlKeyword("SubSolarGroundAzimuth"));
316  gp->addKeyword(PvlKeyword("Phase"));
317  gp->addKeyword(PvlKeyword("Incidence"));
318  gp->addKeyword(PvlKeyword("Emission"));
319  gp->addKeyword(PvlKeyword("NorthAzimuth"));
320  gp->addKeyword(PvlKeyword("EphemerisTime"));
321  gp->addKeyword(PvlKeyword("UTC"));
322  gp->addKeyword(PvlKeyword("LocalSolarTime"));
323  gp->addKeyword(PvlKeyword("SolarLongitude"));
324  gp->addKeyword(PvlKeyword("LookDirectionBodyFixed"));
325  gp->addKeyword(PvlKeyword("LookDirectionJ2000"));
326  gp->addKeyword(PvlKeyword("LookDirectionCamera"));
327  gp->addKeyword(PvlKeyword("ObliqueDetectorResolution"));
328  gp->addKeyword(PvlKeyword("ObliquePixelResolution"));
329  gp->addKeyword(PvlKeyword("ObliqueLineResolution"));
330  gp->addKeyword(PvlKeyword("ObliqueSampleResolution"));
331  if (allowErrors) gp->addKeyword(PvlKeyword("Error"));
332 
333 
334 
335 
336  }
337 
338  bool noErrors = passed;
339  QString error = "";
340  if (!m_camera->HasSurfaceIntersection()) {
341  error = "Requested position does not project in camera model; no surface intersection";
342  noErrors = false;
343  if (!allowErrors) throw IException(IException::Unknown, error, _FILEINFO_);
344  }
345  if (!m_camera->InCube() && !allowOutside) {
346  error = "Requested position does not project in camera model; not inside cube";
347  noErrors = false;
348  if (!allowErrors) throw IException(IException::Unknown, error, _FILEINFO_);
349  }
350 
351  if (!noErrors) {
352  for (int i = 0; i < gp->keywords(); i++) {
353  QString name = (*gp)[i].name();
354  // These three keywords have 3 values, so they must have 3 NULLs
355  if (name == "BodyFixedCoordinate" || name == "SpacecraftPosition" ||
356  name == "SunPosition") {
357  (*gp)[i].addValue("NULL");
358  (*gp)[i].addValue("NULL");
359  (*gp)[i].addValue("NULL");
360  }
361  else {
362  (*gp)[i].setValue("NULL");
363  }
364  }
365  // Set all keywords that still have valid information
366  gp->findKeyword("Error").setValue(error);
367  gp->findKeyword("FileName").setValue(m_currentCube->fileName());
368  gp->findKeyword("Sample").setValue(toString(m_camera->Sample()));
369  gp->findKeyword("Line").setValue(toString(m_camera->Line()));
370  gp->findKeyword("EphemerisTime").setValue(
371  toString(m_camera->time().Et()), "seconds");
372  gp->findKeyword("EphemerisTime").addComment("Time");
373  QString utc = m_camera->time().UTC();
374  gp->findKeyword("UTC").setValue(utc);
375  gp->findKeyword("SpacecraftPosition").addComment("Spacecraft Information");
376  gp->findKeyword("SunPosition").addComment("Sun Information");
377  gp->findKeyword("Phase").addComment("Illumination and Other");
378  }
379  else {
380 
381  Brick b(3, 3, 1, m_currentCube->pixelType());
382 
383  int intSamp = (int)(m_camera->Sample() + 0.5);
384  int intLine = (int)(m_camera->Line() + 0.5);
385  b.SetBasePosition(intSamp, intLine, 1);
386  m_currentCube->read(b);
387 
388  double pB[3], spB[3], sB[3];
389  QString utc;
390  double ssplat, ssplon, ocentricLat, ographicLat, pe360Lon, pw360Lon;
391 
392  {
393  gp->findKeyword("FileName").setValue(m_currentCube->fileName());
394  gp->findKeyword("Sample").setValue(toString(m_camera->Sample()));
395  gp->findKeyword("Line").setValue(toString(m_camera->Line()));
396  gp->findKeyword("PixelValue").setValue(PixelToString(b[0]));
397  try {
398  gp->findKeyword("RightAscension").setValue(toString(
399  m_camera->RightAscension()), "DEGREE");
400  }
401  catch (IException &e) {
402  gp->findKeyword("RightAscension").setValue("Null");
403  }
404  try {
405  gp->findKeyword("Declination").setValue(toString(
406  m_camera->Declination()), "DEGREE");
407  }
408  catch (IException &e) {
409  gp->findKeyword("Declination").setValue("Null");
410  }
411  ocentricLat = m_camera->UniversalLatitude();
412  gp->findKeyword("PlanetocentricLatitude").setValue(toString(ocentricLat), "DEGREE");
413 
414  // Convert lat to planetographic
415  Distance radii[3];
416  m_camera->radii(radii);
417  ographicLat = TProjection::ToPlanetographic(ocentricLat,
418  radii[0].kilometers(),
419  radii[2].kilometers());
420  gp->findKeyword("PlanetographicLatitude").setValue(toString(ographicLat), "DEGREE");
421 
422  pe360Lon = m_camera->UniversalLongitude();
423  gp->findKeyword("PositiveEast360Longitude").setValue(toString(pe360Lon), "DEGREE");
424 
425  //Convert lon to -180 - 180 range
426  gp->findKeyword("PositiveEast180Longitude").setValue(toString(
427  TProjection::To180Domain(pe360Lon)), "DEGREE");
428 
429  //Convert lon to positive west
430  pw360Lon = TProjection::ToPositiveWest(pe360Lon, 360);
431  gp->findKeyword("PositiveWest360Longitude").setValue(toString(pw360Lon), "DEGREE");
432 
433  //Convert pwlon to -180 - 180 range
434  gp->findKeyword("PositiveWest180Longitude").setValue(
435  toString( TProjection::To180Domain(pw360Lon)), "DEGREE");
436 
437  m_camera->Coordinate(pB);
438  gp->findKeyword("BodyFixedCoordinate").addValue(toString(pB[0]), "km");
439  gp->findKeyword("BodyFixedCoordinate").addValue(toString(pB[1]), "km");
440  gp->findKeyword("BodyFixedCoordinate").addValue(toString(pB[2]), "km");
441 
442  gp->findKeyword("LocalRadius").setValue(toString(
443  m_camera->LocalRadius().meters()), "meters");
444  gp->findKeyword("SampleResolution").setValue(toString(
445  m_camera->SampleResolution()), "meters/pixel");
446  gp->findKeyword("LineResolution").setValue(toString(
447  m_camera->LineResolution()), "meters/pixel");
448 
449  gp->findKeyword("ObliqueDetectorResolution").setValue(
450  toString(m_camera->ObliqueDetectorResolution()),"meters");
451  gp->findKeyword("ObliqueLineResolution").setValue(
452  toString(m_camera->ObliqueLineResolution()),"meters");
453  gp->findKeyword("ObliqueSampleResolution").setValue(
454  toString(m_camera->ObliqueSampleResolution()),"meters");
455  gp->findKeyword("ObliquePixelResolution").setValue(
456  toString(m_camera->ObliquePixelResolution()), "meters/pix");
457 
458 
459  //body fixed
460  m_camera->instrumentPosition(spB);
461  gp->findKeyword("SpacecraftPosition").addValue(toString(spB[0]), "km");
462  gp->findKeyword("SpacecraftPosition").addValue(toString(spB[1]), "km");
463  gp->findKeyword("SpacecraftPosition").addValue(toString(spB[2]), "km");
464  gp->findKeyword("SpacecraftPosition").addComment("Spacecraft Information");
465 
466  double spacecraftAzi = m_camera->SpacecraftAzimuth();
467  if (Isis::IsValidPixel(spacecraftAzi)) {
468  gp->findKeyword("SpacecraftAzimuth").setValue(toString(spacecraftAzi), "DEGREE");
469  }
470  else {
471  gp->findKeyword("SpacecraftAzimuth").setValue("NULL");
472  }
473 
474  gp->findKeyword("SlantDistance").setValue(toString(
475  m_camera->SlantDistance()), "km");
476  gp->findKeyword("TargetCenterDistance").setValue(toString(
477  m_camera->targetCenterDistance()), "km");
478  m_camera->subSpacecraftPoint(ssplat, ssplon);
479  gp->findKeyword("SubSpacecraftLatitude").setValue(toString(ssplat), "DEGREE");
480  gp->findKeyword("SubSpacecraftLongitude").setValue(toString(ssplon), "DEGREE");
481  gp->findKeyword("SpacecraftAltitude").setValue(toString(
482  m_camera->SpacecraftAltitude()), "km");
483  gp->findKeyword("OffNadirAngle").setValue(toString(
484  m_camera->OffNadirAngle()), "DEGREE");
485  double subspcgrdaz = m_camera->GroundAzimuth(m_camera->UniversalLatitude(),
486  m_camera->UniversalLongitude(),
487  ssplat, ssplon);
488  gp->findKeyword("SubSpacecraftGroundAzimuth").setValue(
489  toString(subspcgrdaz), "DEGREE");
490 
491  try {
492  m_camera->sunPosition(sB);
493  gp->findKeyword("SunPosition").addValue(toString(sB[0]), "km");
494  gp->findKeyword("SunPosition").addValue(toString(sB[1]), "km");
495  gp->findKeyword("SunPosition").addValue(toString(sB[2]), "km");
496  gp->findKeyword("SunPosition").addComment("Sun Information");
497  }
498  catch (IException &e) {
499  gp->findKeyword("SunPosition").addValue("Null");
500  gp->findKeyword("SunPosition").addValue("Null");
501  gp->findKeyword("SunPosition").addValue("Null");
502  gp->findKeyword("SunPosition").addComment("Sun Information");
503  }
504 
505  try {
506  double sunAzi = m_camera->SunAzimuth();
507  if (Isis::IsValidPixel(sunAzi)) {
508  gp->findKeyword("SubSolarAzimuth").setValue(toString(sunAzi), "DEGREE");
509  }
510  else {
511  gp->findKeyword("SubSolarAzimuth").setValue("NULL");
512  }
513  }
514  catch(IException &e) {
515  gp->findKeyword("SubSolarAzimuth").setValue("NULL");
516  }
517 
518  try {
519  gp->findKeyword("SolarDistance").setValue(toString(
520  m_camera->SolarDistance()), "AU");
521  }
522  catch(IException &e) {
523  gp->findKeyword("SolarDistance").setValue("NULL");
524  }
525  try {
526  double sslat, sslon;
527  m_camera->subSolarPoint(sslat, sslon);
528  gp->findKeyword("SubSolarLatitude").setValue(toString(sslat), "DEGREE");
529  gp->findKeyword("SubSolarLongitude").setValue(toString(sslon), "DEGREE");
530 
531  try {
532  double subsolgrdaz = m_camera->GroundAzimuth(m_camera->UniversalLatitude(),
533  m_camera->UniversalLongitude(),
534  sslat, sslon);
535  gp->findKeyword("SubSolarGroundAzimuth").setValue(toString(subsolgrdaz), "DEGREE");
536  }
537  catch(IException &e) {
538  gp->findKeyword("SubSolarGroundAzimuth").setValue("NULL");
539  }
540  }
541  catch(IException &e) {
542  gp->findKeyword("SubSolarLatitude").setValue("NULL");
543  gp->findKeyword("SubSolarLongitude").setValue("NULL");
544  gp->findKeyword("SubSolarGroundAzimuth").setValue("NULL");
545  }
546 
547  gp->findKeyword("Phase").setValue(toString(m_camera->PhaseAngle()), "DEGREE");
548  gp->findKeyword("Phase").addComment("Illumination and Other");
549  gp->findKeyword("Incidence").setValue(toString(
550  m_camera->IncidenceAngle()), "DEGREE");
551  gp->findKeyword("Emission").setValue(toString(
552  m_camera->EmissionAngle()), "DEGREE");
553 
554  double northAzi = m_camera->NorthAzimuth();
555  if (Isis::IsValidPixel(northAzi)) {
556  gp->findKeyword("NorthAzimuth").setValue(toString(northAzi), "DEGREE");
557  }
558  else {
559  gp->findKeyword("NorthAzimuth").setValue("NULL");
560  }
561 
562  gp->findKeyword("EphemerisTime").setValue(toString(
563  m_camera->time().Et()), "seconds");
564  gp->findKeyword("EphemerisTime").addComment("Time");
565  utc = m_camera->time().UTC();
566  gp->findKeyword("UTC").setValue(utc);
567  try {
568  gp->findKeyword("LocalSolarTime").setValue(toString(
569  m_camera->LocalSolarTime()), "hour");
570  }
571  catch (IException &e) {
572  gp->findKeyword("LocalSolarTime").setValue("Null");
573  }
574  try {
575  gp->findKeyword("SolarLongitude").setValue(toString(
576  m_camera->solarLongitude().degrees()), "DEGREE");
577  }
578  catch (IException &e) {
579  gp->findKeyword("SolarLongitude").setValue("Null");
580  }
581 
582  std::vector<double>lookB = m_camera->lookDirectionBodyFixed();
583  gp->findKeyword("LookDirectionBodyFixed").addValue(toString(lookB[0]), "DEGREE");
584  gp->findKeyword("LookDirectionBodyFixed").addValue(toString(lookB[1]), "DEGREE");
585  gp->findKeyword("LookDirectionBodyFixed").addValue(toString(lookB[2]), "DEGREE");
586  gp->findKeyword("LookDirectionBodyFixed").addComment("Look Direction Unit Vectors in Body Fixed, J2000, and Camera Coordinate Systems.");
587 
588  try {
589  std::vector<double>lookJ = m_camera->lookDirectionJ2000();
590  gp->findKeyword("LookDirectionJ2000").addValue(toString(lookJ[0]), "DEGREE");
591  gp->findKeyword("LookDirectionJ2000").addValue(toString(lookJ[1]), "DEGREE");
592  gp->findKeyword("LookDirectionJ2000").addValue(toString(lookJ[2]), "DEGREE");
593  }
594  catch (IException &e) {
595  gp->findKeyword("LookDirectionJ2000").addValue("Null");
596  gp->findKeyword("LookDirectionJ2000").addValue("Null");
597  gp->findKeyword("LookDirectionJ2000").addValue("Null");
598  }
599 
600  try {
601  double lookC[3];
602  m_camera->LookDirection(lookC);
603  gp->findKeyword("LookDirectionCamera").addValue(toString(lookC[0]), "DEGREE");
604  gp->findKeyword("LookDirectionCamera").addValue(toString(lookC[1]), "DEGREE");
605  gp->findKeyword("LookDirectionCamera").addValue(toString(lookC[2]), "DEGREE");
606  }
607  catch (IException &e) {
608  gp->findKeyword("LookDirectionCamera").addValue("Null");
609  gp->findKeyword("LookDirectionCamera").addValue("Null");
610  gp->findKeyword("LookDirectionCamera").addValue("Null");
611  }
612 
613 
614  if (allowErrors) gp->findKeyword("Error").setValue("NULL");
615  }
616  }
617  return gp;
618  }
619 
620 
627  return m_camera;
628  }
629 
630 
637  return m_currentCube;
638  }
639 }
640 
Isis::PixelToString
QString PixelToString(double d)
Takes a double pixel value and returns the name of the pixel type as a string.
Definition: SpecialPixel.h:371
Isis::Brick::SetBasePosition
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.
Definition: Brick.h:120
Isis::CameraPointInfo::SetImage
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.
Definition: CameraPointInfo.cpp:94
Isis::TProjection::ToPositiveWest
static double ToPositiveWest(const double lon, const int domain)
This method converts a longitude into the positive west direction.
Definition: TProjection.cpp:587
Isis::PvlKeyword
A single keyword-value pair.
Definition: PvlKeyword.h:82
Isis::CameraPointInfo::SetCenter
PvlGroup * SetCenter(const bool outside=false, const bool error=false)
SetCenter sets the image coordinates to the center of the image.
Definition: CameraPointInfo.cpp:115
Isis::CameraPointInfo::GetPointInfo
virtual PvlGroup * GetPointInfo(bool passed, bool outside, bool errors)
GetPointInfo builds the PvlGroup containing all the important information derived from the Camera.
Definition: CameraPointInfo.cpp:227
Isis::PvlContainer::addKeyword
void addKeyword(const PvlKeyword &keyword, const InsertMode mode=Append)
Add a keyword to the container.
Definition: PvlContainer.cpp:202
Isis::CameraPointInfo::SetCSVOutput
void SetCSVOutput(bool csvOutput)
Set the output format (true is CSV, false is PVL)
Definition: CameraPointInfo.cpp:50
Isis::IException::Unknown
@ Unknown
A type of error that cannot be classified as any of the other error types.
Definition: IException.h:118
Isis::PvlKeyword::addValue
void addValue(QString value, QString unit="")
Adds a value with units.
Definition: PvlKeyword.cpp:252
Isis::CameraPointInfo::SetGround
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.
Definition: CameraPointInfo.cpp:187
Isis::CameraPointInfo::cube
Cube * cube()
Retrieves a pointer to the current cube.
Definition: CameraPointInfo.cpp:636
Isis::Camera
Definition: Camera.h:236
Isis::Brick
Buffer for containing a three dimensional section of an image.
Definition: Brick.h:45
Isis::toString
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
Isis::Distance
Distance measurement, usually in meters.
Definition: Distance.h:34
Isis::CubeManager
Class for quick re-accessing of cubes based on file name.
Definition: CubeManager.h:70
Isis::CameraPointInfo::SetLine
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.
Definition: CameraPointInfo.cpp:162
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
Isis::CameraPointInfo::camera
Camera * camera()
Retrieves a pointer to the camera.
Definition: CameraPointInfo.cpp:626
Isis::PvlKeyword::addComment
void addComment(QString comment)
Add a comment to the PvlKeyword.
Definition: PvlKeyword.cpp:376
Isis::CameraPointInfo::SetSample
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.
Definition: CameraPointInfo.cpp:138
Isis::Cube
IO Handler for Isis Cubes.
Definition: Cube.h:167
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::TProjection::To180Domain
static double To180Domain(const double lon)
This method converts a longitude into the -180 to 180 domain.
Definition: TProjection.cpp:657
Isis::PvlKeyword::setValue
void setValue(QString value, QString unit="")
Sets new values.
Definition: PvlKeyword.cpp:155
Isis::CameraPointInfo::SetCube
void SetCube(const QString &cubeFileName)
SetCube opens the given cube in a CubeManager.
Definition: CameraPointInfo.cpp:75
Isis::CameraPointInfo::CheckCube
bool CheckCube()
CheckCube checks that a cube has been set before the data for a point is accessed.
Definition: CameraPointInfo.cpp:204
Isis::IException::Programmer
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:146
std
Namespace for the standard library.
Isis::IsValidPixel
bool IsValidPixel(const double d)
Returns if the input pixel is valid.
Definition: SpecialPixel.h:223
Isis::TProjection::ToPlanetographic
double ToPlanetographic(const double lat) const
This method converts a planetocentric latitude to a planetographic latitude.
Definition: TProjection.cpp:463
Isis::PvlContainer::keywords
int keywords() const
Returns the number of keywords contained in the PvlContainer.
Definition: PvlContainer.h:86
Isis::PvlContainer::findKeyword
PvlKeyword & findKeyword(const QString &name)
Find a keyword with a specified name.
Definition: PvlContainer.cpp:62
Isis::CameraPointInfo::CameraPointInfo
CameraPointInfo()
Constructor, initializes CubeManager and other variables for use.
Definition: CameraPointInfo.cpp:36
Isis::CameraPointInfo::~CameraPointInfo
virtual ~CameraPointInfo()
Destructor, deletes CubeManager object used.
Definition: CameraPointInfo.cpp:60
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16