Isis 3.0 Object Programmers' Reference |
Home |
CameraPointInfo provides quick access to the majority of information avaliable from a camera on a point. More...
#include <CameraPointInfo.h>
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. | |
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. | |
PvlGroup * | SetCenter (const bool outside=false, const bool error=false) |
SetCenter sets the image coordinates to the center of the image. | |
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 * | 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. | |
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. | |
Protected Member Functions | |
Camera * | camera () |
Cube * | cube () |
Private Member Functions | |
bool | CheckCube () |
CheckCube checks that a cube has been set before the data for a point is accessed. | |
virtual PvlGroup * | GetPointInfo (bool passed, bool outside, bool errors) |
GetPointInfo builds the PvlGroup containing all the important information derived from the Camera. | |
Private Attributes | |
CubeManager * | m_usedCubes |
Cube * | m_currentCube |
Camera * | m_camera |
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.
2009-09-13 Mackenzie Boyd - Added methods SetCenter, SetSample and SetLine to support campt functionality. Added CheckCube private method to check m_currentCube isn't NULL.
2010-03-25 MNB - Modified longitude output to have Positive East and West, 360 and 180 longitudes.
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.
2010-06-07 MNB - Changed Error keyword so that it is always present when allowErrors is true.
2010-09-13 Steven Lambright - Corrected units for SampleResolution and LineResolution
2012-07-06 Debbie A. Cook - Updated Spice members to be more compliant with Isis coding standards. References #972.
2013-03-27 Jeannie Backer - Added comment in code. References #1248.
2012-12-20 Debbie A. Cook - Changed to use TProjection. References #775.
2013-03-16 Jeannie Backer - Added accessor methods camera() and cube(). Added m_ prefix to member variables. Made GetPointInfo() virtual so it can be redefined in child classes. References #775.
2014-04-17 Jeannie Backer - Added check for valid azimuth values. If not, print "NULL" to be consistent with caminfo's CamTools.cpp. Replaced local variable names with more descriptive names. References #1659.
Definition at line 90 of file CameraPointInfo.h.
Isis::CameraPointInfo::CameraPointInfo | ( | ) |
Constructor, initializes CubeManager and other variables for use.
Definition at line 52 of file CameraPointInfo.cpp.
|
virtual |
Destructor, deletes CubeManager object used.
Definition at line 64 of file CameraPointInfo.cpp.
|
private |
CheckCube checks that a cube has been set before the data for a point is accessed.
Definition at line 187 of file CameraPointInfo.cpp.
References _FILEINFO_, and Isis::IException::Programmer.
|
privatevirtual |
GetPointInfo builds the PvlGroup containing all the important information derived from the Camera.
Definition at line 203 of file CameraPointInfo.cpp.
References _FILEINFO_, Isis::PvlKeyword::addComment(), Isis::PvlContainer::addKeyword(), Isis::PvlKeyword::addValue(), Isis::PvlContainer::findKeyword(), Isis::IsValidPixel(), Isis::PvlContainer::keywords(), Isis::PixelToString(), Isis::Brick::SetBasePosition(), Isis::PvlKeyword::setValue(), Isis::TProjection::To180Domain(), Isis::TProjection::ToPlanetographic(), Isis::TProjection::ToPositiveWest(), Isis::toString(), and Isis::IException::Unknown.
PvlGroup * Isis::CameraPointInfo::SetCenter | ( | const bool | outside = false , |
const bool | errors = false |
||
) |
SetCenter sets the image coordinates to the center of the image.
Definition at line 111 of file CameraPointInfo.cpp.
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.
cubeFileName | A cube filename |
Definition at line 79 of file CameraPointInfo.cpp.
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.
latitude | A latitude coordinate in or almost in the cube |
longitude | A longitude coordinate in or almost in the cube |
Definition at line 170 of file CameraPointInfo.cpp.
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.
sample | A sample coordinate in or almost in the cube |
line | A line coordinate in or almost in the cubei |
Definition at line 95 of file CameraPointInfo.cpp.
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.
Definition at line 147 of file CameraPointInfo.cpp.
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.
Definition at line 129 of file CameraPointInfo.cpp.