USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::CameraPointInfo Class Reference

CameraPointInfo provides quick access to the majority of information avaliable from a camera on a point. More...

#include <CameraPointInfo.h>

Collaboration diagram for Isis::CameraPointInfo:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CameraPointInfo ()
 Constructor, initializes CubeManager and other variables for use.
virtual ~CameraPointInfo ()
 Destructor, deletes CubeManager object used.
void SetCube (const QString &cubeFileName)
 SetCube opens the given cube in a CubeManager.
PvlGroupSetImage (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.
PvlGroupSetCenter (const bool outside=false, const bool error=false)
 SetCenter sets the image coordinates to the center of the image.
PvlGroupSetSample (const double sample, const bool outside=false, const bool error=false)
 SetSample sets the image coordinates to the center line and the given sample.
PvlGroupSetLine (const double line, const bool outside=false, const bool error=false)
 SetLine sets the image coordinates to the center sample and the given line.
PvlGroupSetGround (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.

Private Member Functions

bool CheckCube ()
 CheckCube checks that a cube has been set before the data for a point is accessed.
PvlGroupGetPointInfo (bool passed, bool outside, bool errors)
 GetPointInfo builds the PvlGroup containing all the important information derived from the Camera.

Private Attributes

CubeManagerusedCubes
CubecurrentCube
Cameracamera

Detailed Description

CameraPointInfo provides quick access to the majority of information avaliable from a camera on a point.

CameraPointInfo provides the functionality which was a part of campt in class form. This functionality is access to the majoirty of information avaliable on any given point on an image. The main difference is the use of a CubeManager within CameraPointInfo for effeciency when working with control nets and the opening of cubes several times.

Author:
2009-08-25 Mackenzie Boyd

For internal use only.

History:
2009-09-13 Mackenzie Boyd - Added methods SetCenter, SetSample and SetLine to support campt functionality. Added CheckCube private method to check currentCube isn't NULL.
History:
2010-03-25 MNB - Modified longitude output to have Positive East and West, 360 and 180 longitudes.
History:
2010-05-25 MNB - Many changes, primary changes had to do with how errors are handled. Depending on the options sent in, errors can be handled by putting an Error keyword into the PvlGroup instead of throwing an exception. Other changes, addition of two booleans, both defaulting to false, to the Set methods (excluding SetCube) so that allowoutside option and allowerrors option could be taken in instead of using setters. CheckConditions method was removed and placed within GetPointInfo, GetPointInfo had 3 boolean parameters added, passed
  • whether or not the SetImage or SetGround done above was successful, allowoutside - if locations outside the cube are acceptable, and allowerrors - what to do with errors.
History:
2010-06-07 MNB - Changed Error keyword so that it is always present when allowErrors is true.
History:
2010-09-13 Steven Lambright - Corrected units for SampleResolution and LineResolution
History:
2012-07-06 Debbie A. Cook, Updated Spice members to be more compliant with Isis coding standards. References #972.

Definition at line 88 of file CameraPointInfo.h.


Constructor & Destructor Documentation

Isis::CameraPointInfo::CameraPointInfo (  ) 

Constructor, initializes CubeManager and other variables for use.

Definition at line 45 of file CameraPointInfo.cpp.

References Isis::CubeManager::SetNumOpenCubes().

Isis::CameraPointInfo::~CameraPointInfo (  )  [virtual]

Destructor, deletes CubeManager object used.

Definition at line 57 of file CameraPointInfo.cpp.


Member Function Documentation

bool Isis::CameraPointInfo::CheckCube (  )  [private]

CheckCube checks that a cube has been set before the data for a point is accessed.

Returns:
bool Whether or not a cube has been set, true if it has been.

Definition at line 179 of file CameraPointInfo.cpp.

References _FILEINFO_, and Isis::IException::Programmer.

Referenced by SetCenter(), SetGround(), SetImage(), SetLine(), and SetSample().

PvlGroup * Isis::CameraPointInfo::GetPointInfo ( bool  passed,
bool  allowOutside,
bool  allowErrors 
) [private]

GetPointInfo builds the PvlGroup containing all the important information derived from the Camera.

Returns:
PvlGroup* Data taken directly from the Camera and drived from Camera information. Ownership passed.

Definition at line 195 of file CameraPointInfo.cpp.

References _FILEINFO_, Isis::PvlKeyword::AddComment(), Isis::PvlContainer::AddKeyword(), Isis::PvlKeyword::AddValue(), Isis::Sensor::Coordinate(), Isis::Sensor::Declination(), Isis::Angle::degrees(), Isis::Sensor::EmissionAngle(), Isis::iTime::Et(), Isis::Cube::fileName(), Isis::PvlContainer::FindKeyword(), Isis::Camera::GroundAzimuth(), Isis::Sensor::HasSurfaceIntersection(), Isis::Sensor::IncidenceAngle(), Isis::Camera::InCube(), Isis::Spice::instrumentPosition(), Isis::PvlContainer::Keywords(), Isis::Distance::kilometers(), Isis::Camera::Line(), Isis::Camera::LineResolution(), Isis::Sensor::LocalRadius(), Isis::Sensor::LocalSolarTime(), Isis::Distance::meters(), Isis::Camera::NorthAzimuth(), Isis::Camera::OffNadirAngle(), Isis::Sensor::PhaseAngle(), Isis::PixelToString(), Isis::Cube::pixelType(), Isis::Spice::radii(), Isis::Cube::read(), Isis::Sensor::RightAscension(), Isis::Camera::Sample(), Isis::Camera::SampleResolution(), Isis::PvlKeyword::SetValue(), Isis::Sensor::SlantDistance(), Isis::Sensor::SolarDistance(), Isis::Spice::solarLongitude(), Isis::Sensor::SpacecraftAltitude(), Isis::Camera::SpacecraftAzimuth(), Isis::Spice::subSolarPoint(), Isis::Spice::subSpacecraftPoint(), Isis::Camera::SunAzimuth(), Isis::Spice::sunPosition(), Isis::Spice::targetCenterDistance(), Isis::Spice::time(), Isis::Projection::To180Domain(), Isis::Projection::ToPlanetographic(), Isis::Projection::ToPositiveWest(), Isis::toString(), Isis::Sensor::UniversalLatitude(), Isis::Sensor::UniversalLongitude(), Isis::IException::Unknown, and Isis::iTime::UTC().

Referenced by SetCenter(), SetGround(), SetImage(), SetLine(), and SetSample().

PvlGroup * Isis::CameraPointInfo::SetCenter ( const bool  outside = false,
const bool  errors = false 
)

SetCenter sets the image coordinates to the center of the image.

Returns:
PvlGroup* The pertinent data from the Camera class on the point. Ownership is passed to caller.

Definition at line 104 of file CameraPointInfo.cpp.

References CheckCube(), GetPointInfo(), Isis::Cube::lineCount(), Isis::Cube::sampleCount(), and Isis::Camera::SetImage().

void Isis::CameraPointInfo::SetCube ( const QString &  cubeFileName  ) 

SetCube opens the given cube in a CubeManager.

The CubeManager is for effeciency when working with control nets where cubes are accesed multiple times.

Parameters:
cubeFileName A cube filename

Definition at line 72 of file CameraPointInfo.cpp.

References Isis::Cube::camera(), and Isis::CubeManager::OpenCube().

PvlGroup * Isis::CameraPointInfo::SetGround ( const double  latitude,
const double  longitude,
const bool  outside = false,
const bool  errors = false 
)

SetGround sets a latitude, longitude grrund coordinate in the camera so data can be accessed.

Parameters:
latitude A latitude coordinate in or almost in the cube
longitude A longitude coordinate in or almost in the cube
Returns:
PvlGroup* The pertinent data from the Camera class on the point. Ownership is passed to caller.

Definition at line 162 of file CameraPointInfo.cpp.

References CheckCube(), GetPointInfo(), and Isis::Camera::SetUniversalGround().

PvlGroup * Isis::CameraPointInfo::SetImage ( const double  sample,
const double  line,
const bool  outside = false,
const bool  errors = false 
)

SetImage sets a sample, line image coordinate in the camera so data can be accessed.

Parameters:
sample A sample coordinate in or almost in the cube
line A line coordinate in or almost in the cubei
Returns:
PvlGroup* The pertinent data from the Camera class on the point. Ownership is passed to caller.

Definition at line 88 of file CameraPointInfo.cpp.

References CheckCube(), GetPointInfo(), and Isis::Camera::SetImage().

PvlGroup * Isis::CameraPointInfo::SetLine ( const double  line,
const bool  outside = false,
const bool  errors = false 
)

SetLine sets the image coordinates to the center sample and the given line.

Returns:
PvlGroup* The pertinent data from the Camera class on the point. Ownership is passed to caller.

Definition at line 139 of file CameraPointInfo.cpp.

References CheckCube(), GetPointInfo(), Isis::Cube::sampleCount(), and Isis::Camera::SetImage().

PvlGroup * Isis::CameraPointInfo::SetSample ( const double  sample,
const bool  outside = false,
const bool  errors = false 
)

SetSample sets the image coordinates to the center line and the given sample.

Returns:
PvlGroup* The pertinent data from the Camera class on the point. Ownership is passed to caller.

Definition at line 121 of file CameraPointInfo.cpp.

References CheckCube(), GetPointInfo(), Isis::Cube::lineCount(), and Isis::Camera::SetImage().


The documentation for this class was generated from the following files: