![]() |
Isis 3 Programmer Reference
|
This class is used to create and store valid Isis3 targets. More...
#include <Target.h>
Public Member Functions | |
Target (Spice *spice, Pvl &label) | |
Constructs a Target object and loads target information. More... | |
Target () | |
Constructs an empty Target object. More... | |
~Target () | |
Destroys the Target. More... | |
void | init () |
Initialize member variables. More... | |
bool | isSky () const |
Return if our target is the sky. More... | |
SpiceInt | naifBodyCode () const |
This returns the NAIF body code of the target. More... | |
SpiceInt | naifPlanetSystemCode () const |
This returns the NAIF planet system body code of the target. More... | |
QString | name () const |
Return target name. More... | |
QString | systemName () const |
Return planet system name. More... | |
std::vector< Distance > | radii () const |
Returns the radii of the body in km. More... | |
void | restoreShape () |
Restores the shape to the original after setShapeEllipsoid has overridden it. More... | |
void | setShapeEllipsoid () |
Set the shape to the ellipsoid and save the original shape. More... | |
void | setRadii (std::vector< Distance > radii) |
Sets the radii of the body. More... | |
ShapeModel * | shape () const |
Return the shape. More... | |
Spice * | spice () const |
Return the spice object More... | |
int | frameType () |
std::vector< Angle > | poleRaCoefs () |
std::vector< Angle > | poleDecCoefs () |
std::vector< Angle > | pmCoefs () |
std::vector< double > | poleRaNutPrecCoefs () |
std::vector< double > | poleDecNutPrecCoefs () |
std::vector< double > | pmNutPrecCoefs () |
std::vector< Angle > | sysNutPrecConstants () |
std::vector< Angle > | sysNutPrecCoefs () |
Static Public Member Functions | |
static SpiceInt | lookupNaifBodyCode (QString name) |
This returns the NAIF body code of the target indicated in the labels. More... | |
static PvlGroup | radiiGroup (QString target) |
Creates a Pvl Group with keywords TargetName, EquitorialRadius, and PolarRadius. More... | |
static PvlGroup | radiiGroup (Pvl &cubeLab, const PvlGroup &mapGroup) |
This method returns a Mapping group containing TargetName, EquatorialRadius, and PolarRadius in addition to all of the keywords that are in the given mapGroup. More... | |
Private Member Functions | |
SpiceInt | lookupNaifBodyCode (Pvl &lab) const |
This returns the NAIF body code of the target indicated in the labels. More... | |
Static Private Member Functions | |
static PvlGroup | radiiGroup (int bodyFrameCode) |
Convenience method called by the public radii() methods to compute the target radii using a body code recognized by NAIF. More... | |
Private Attributes | |
SpiceInt * | m_bodyCode |
The NaifBodyCode value, if it exists in the labels. More... | |
SpiceInt * | m_systemCode |
The NaifBodyCode of the targets planetary system If the target is sky, then what should this be??? More... | |
QString * | m_name |
target name More... | |
QString * | m_systemName |
name of the planetary system of the target More... | |
std::vector< Distance > | m_radii |
target radii More... | |
ShapeModel * | m_originalShape |
target original shape model More... | |
ShapeModel * | m_shape |
target shape model More... | |
bool | m_sky |
flag indicating target is the sky More... | |
Spice * | m_spice |
parent Spice object, needed to get pixel resolution in ShapeModels More... | |
This class is used to create and store valid Isis3 targets.
2015-07-31 Kristin Berry - Added additional NaifStatus::CheckErrors() to see if any NAIF errors were signaled. References #2248.
2016-05-18 Jeannie Backer - Moved TProjection::TargetRadii() methods to Target::radiiGroup() methods. Added overloaded lookupNaifBodyCode(QString) to have a generic static method that takes the TargetName as an input parameter. Added overloaded lookupNaifBodyCode(Pvl) to use the label passed into Target's constructor to find the code if not found using the name or spice pointer provided. References #3934.
2016-05-18 Jeannie Backer - Removed unused lookupNaifBodyCode() method that takes no input parameters (since it was replaced with lookupNaifBodyCode(Pvl)). References #3934.
2017-08-14 Stuart Sides - Added the ability to use a target code and the NaifKeywords to find the radii. Added so osirisrex and spicelib v66. References #4947.
2018-10-02 Debbie A. Cook - Fixed method lookupNaifBodyCode to look up the Naif body code instead of the Naif body frame code. We may need to add a method to look up the Naif body frame code as well. Also moved the try loop attempting to find the radii tagged with the Naif body code ahead of the try loop that attempts to find the radii tagged with the body frame code in the method radiiGroup. Fixed any mention of Naif body frame code that should be Naif body code. These are not the same. Naif tags the body radii keyword with the Naif body code. The Naif body frame code refers to the orientation (SpiceRotation) of the body. References #4649 and #501.
Constructs a Target object and loads target information.
lab | Label containing Instrument and Kernels groups. |
Definition at line 53 of file Target.cpp.
References Isis::PvlObject::findGroup(), Isis::PvlContainer::hasKeyword(), and Isis::toInt().
Isis::Target::Target | ( | ) |
Constructs an empty Target object.
Definition at line 124 of file Target.cpp.
Isis::Target::~Target | ( | ) |
void Isis::Target::init | ( | ) |
Initialize member variables.
Definition at line 142 of file Target.cpp.
bool Isis::Target::isSky | ( | ) | const |
Return if our target is the sky.
Definition at line 180 of file Target.cpp.
Referenced by Isis::ShapeModelFactory::create().
|
static |
This returns the NAIF body code of the target indicated in the labels.
Definition at line 234 of file Target.cpp.
References _FILEINFO_.
|
private |
This returns the NAIF body code of the target indicated in the labels.
Definition at line 191 of file Target.cpp.
References _FILEINFO_, Isis::IException::append(), Isis::PvlObject::findObject(), and Isis::PvlObject::hasObject().
SpiceInt Isis::Target::naifBodyCode | ( | ) | const |
This returns the NAIF body code of the target.
Definition at line 487 of file Target.cpp.
Referenced by Isis::TargetBody::TargetBody().
SpiceInt Isis::Target::naifPlanetSystemCode | ( | ) | const |
This returns the NAIF planet system body code of the target.
e.g. Enceladus is in the Saturn system
Definition at line 500 of file Target.cpp.
Referenced by Isis::TargetBody::TargetBody().
QString Isis::Target::name | ( | ) | const |
Return target name.
Definition at line 506 of file Target.cpp.
Referenced by Isis::FeatureNomenclatureTool::findMissingNomenclature(), Isis::TargetBody::TargetBody(), and Isis::Spice::targetName().
std::vector< Distance > Isis::Target::radii | ( | ) | const |
Returns the radii of the body in km.
The radii are obtained from the appropriate SPICE kernel for the body specified by TargetName in the Instrument group of the labels.
Definition at line 522 of file Target.cpp.
Referenced by Isis::Camera::BasicMapping(), Isis::BundleTargetBody::BundleTargetBody(), and Isis::TargetBody::TargetBody().
|
static |
Creates a Pvl Group with keywords TargetName, EquitorialRadius, and PolarRadius.
The values for the radii will be retrieved from the most recent Target Attitude and Shape Naif kernel available in the Isis data area.
target | The name of the body for which the radii will be retrieved. |
IException::Io | - "Could not convert target name to NAIF code." |
Definition at line 393 of file Target.cpp.
References _FILEINFO_, and Isis::PvlContainer::findKeyword().
Referenced by Isis::Latitude::add(), Isis::Latitude::Latitude(), Isis::StereoTool::setFiles(), and Isis::TProjection::TProjection().
This method returns a Mapping group containing TargetName, EquatorialRadius, and PolarRadius in addition to all of the keywords that are in the given mapGroup.
cubeLab | Pvl labels for the image. |
mapGroup | A const reference to a PvlGroup that contains mapping parameters for the projection. |
Definition at line 265 of file Target.cpp.
References _FILEINFO_, Isis::PvlContainer::addKeyword(), Isis::PvlObject::findGroup(), Isis::PvlContainer::findKeyword(), Isis::PvlObject::findKeyword(), Isis::PvlObject::findObject(), Isis::PvlContainer::hasKeyword(), Isis::PvlObject::hasKeyword(), Isis::PvlObject::hasObject(), Isis::toDouble(), Isis::toString(), and Isis::IException::what().
|
staticprivate |
Convenience method called by the public radii() methods to compute the target radii using a body code recognized by NAIF.
The PVL group contains only the EquatorialRadius and PolarRadius keywords. This group does not contain the Target keyword.
bodyFrameCode | A recognized NAIF code that represents the target body. |
Definition at line 441 of file Target.cpp.
References _FILEINFO_, Isis::FileName::expanded(), Isis::FileName::highestVersion(), and Isis::toString().
void Isis::Target::restoreShape | ( | ) |
Restores the shape to the original after setShapeEllipsoid has overridden it.
Definition at line 575 of file Target.cpp.
Referenced by Isis::Sensor::IgnoreElevationModel().
void Isis::Target::setRadii | ( | std::vector< Distance > | radii | ) |
Sets the radii of the body.
r[] | Radii of the target in kilometers |
Definition at line 605 of file Target.cpp.
void Isis::Target::setShapeEllipsoid | ( | ) |
Set the shape to the ellipsoid and save the original shape.
Definition at line 593 of file Target.cpp.
Referenced by Isis::Sensor::IgnoreElevationModel().
ShapeModel * Isis::Target::shape | ( | ) | const |
Return the shape.
Definition at line 615 of file Target.cpp.
Referenced by Isis::Sensor::Coordinate(), Isis::Sensor::EmissionAngle(), Isis::Sensor::GetLatitude(), Isis::Camera::GetLocalNormal(), Isis::Sensor::GetLongitude(), Isis::Sensor::GetSurfacePoint(), Isis::UniversalGroundMap::GroundRange(), Isis::Sensor::HasSurfaceIntersection(), Isis::Sensor::IncidenceAngle(), Isis::Sensor::LocalRadius(), Isis::Sensor::PhaseAngle(), Isis::Camera::RawFocalPlanetoImage(), Isis::VimsGroundMap::SetGround(), Isis::Sensor::SetGround(), Isis::Camera::SetGround(), Isis::Sensor::SetGroundLocal(), Isis::Camera::SetImage(), Isis::Sensor::SetLookDirection(), Isis::Sensor::setTime(), Isis::Sensor::SetUniversalGround(), Isis::Camera::SetUniversalGround(), Isis::Sensor::SlantDistance(), Isis::Sensor::SolarDistance(), Isis::TrackTool::updateLabels(), and Isis::AdvancedTrackTool::updateRow().
Spice * Isis::Target::spice | ( | ) | const |
Return the spice object
Definition at line 623 of file Target.cpp.
QString Isis::Target::systemName | ( | ) | const |
Return planet system name.
Definition at line 512 of file Target.cpp.
Referenced by Isis::TargetBody::TargetBody().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
U.S. Department of the Interior | U.S. Geological Survey ISIS | Privacy & Disclaimers | Astrogeology Research Program To contact us, please post comments and questions on the USGS Astrogeology Discussion Board To report a bug, or suggest a feature go to: ISIS Github File Modified: 07/13/2023 00:24:30 |