USGS

Isis 3.0 Application Source Code Reference

Home

MdisGeometry Class Reference

Computes all MDIS Geometric keywords. More...

#include <MdisGeometry.h>

List of all members.

Public Member Functions

 MdisGeometry ()
 Default constructor.
 MdisGeometry (const QString &filename)
 Constructor using an ISIS cube file name.
 MdisGeometry (Cube &cube)
 Construct using an ISIS Cube class.
virtual ~MdisGeometry ()
void setCube (const QString &filename)
 Initialize class with an ISIS file.
virtual void refCenterCoord (double &sample, double &line) const
 Returns the center line and sample coordinate of the image.
virtual void refUpperLeftCoord (double &sample, double &line) const
 Returns the upper left line and sample coordinate of the image.
virtual void refUpperRightCoord (double &sample, double &line) const
 Returns the upper right line and sample coordinate of the image.
virtual void refLowerLeftCoord (double &sample, double &line) const
 Returns the lower left line and sample coordinate of the image.
virtual void refLowerRightCoord (double &sample, double &line) const
 Returns the lower right line and sample coordinate of the image.
Pvl getGeometry (const QString &filename)
 Compute and retrieve geometric parameters for given file.
void setPrecision (int ndigits)
 Sets digits of precision for floating point keywords.
void setNull (const QString &nullstring)
 Sets the string to be used for uncomputable values.
QString getNull () const
 Value in use for uncomputable values.
void updateNullKeys (bool action=true)
 Select action when values cannot be computed.

Static Public Member Functions

static bool validateTarget (Pvl &label, bool makeValid=true)
 Checks for the TargetName keyword for validity.

Protected Member Functions

const Camera & getCamera () const
 Return const reference to Camera model.
Camera & getCamera ()
 Return reference to Camera model.

Detailed Description

Computes all MDIS Geometric keywords.

This class computes a set of MESSENGER/MIDS geometric parameters from an ISIS cube file. The cube file must have been initialized with SPICE kernels (typically by spiceinit).

Many of the parameters are provided by the ISIS Spice/Cameraclass hierarchy, but there are a few that utilize NAIF toolkit functionality/features that require loading of the kernels that otherwise would not be necessary. These are parameters that require velecity vectors and pixel smear components (currently not provided directly via the ISIS API).

Some of the keywords may not be computable for several reasons. There may not be appropriate kernel data coverage for the specified image acquisition time, the boresight pixel does not intersect the surface, or the corner pixels are off planet. In these cases, the null string is replaced if the actions is set appropriately.

Author:
2007-08-14 Kris Becker

Definition at line 75 of file MdisGeometry.h.


Constructor & Destructor Documentation

MdisGeometry (  )  [inline]

Default constructor.

Definition at line 79 of file MdisGeometry.h.

MdisGeometry ( const QString &  filename  ) 

Constructor using an ISIS cube file name.

Parameters:
filename Name of ISIS cube file

Definition at line 55 of file MdisGeometry.cpp.

MdisGeometry ( Cube cube  ) 

Construct using an ISIS Cube class.

Parameters:
cube ISIS cube class

Definition at line 65 of file MdisGeometry.cpp.

virtual ~MdisGeometry (  )  [inline, virtual]

Definition at line 84 of file MdisGeometry.h.


Member Function Documentation

void setCube ( const QString &  filename  ) 

Initialize class with an ISIS file.

This method is reentrant in that it can be used repeatedly in computing MDIS geometry. If a file has already been processed, it will be cleared to make way for the specified file.

Parameters:
filename Name of ISIS cube file

Definition at line 78 of file MdisGeometry.cpp.

bool validateTarget ( Pvl &  label,
bool  makeValid = true 
) [static]

Checks for the TargetName keyword for validity.

This static method will check the value of the Targetname keyword for a valid NAIF target code. If it is not valid, ISIS cannot spiceinit the image and we will not be able to get any geometric data.

The value of the TargetName keyword is extracted and is checked for a NAIF body code, indicating it is a valid target. This result is returned to the caller.

If the target is not a recognized NAIF code and the makeValid parameter is true, the TargetName keyword values is changed to "Sky". This will allow for the basic values to be computed.

Parameters:
label Label to validate target
makeValid True if the caller wants a valid Sky target if NAIF knows nothing about it
Returns:
bool True if the target is a recognized target, false if not.

Definition at line 108 of file MdisGeometry.cpp.

void refCenterCoord ( double &  sample,
double &  line 
) const [virtual]

Returns the center line and sample coordinate of the image.

This method returns the reference line and sample coordinate at the center of the image.

Parameters:
sample Sample coordinate at the center
line Line coordinate at the center

Definition at line 135 of file MdisGeometry.cpp.

void refUpperLeftCoord ( double &  sample,
double &  line 
) const [virtual]

Returns the upper left line and sample coordinate of the image.

This method returns the reference line and sample coordinate at the upper left corner of the image.

Parameters:
sample Sample coordinate at the upper left
line Line coordinate at the upper left

Definition at line 158 of file MdisGeometry.cpp.

void refUpperRightCoord ( double &  sample,
double &  line 
) const [virtual]

Returns the upper right line and sample coordinate of the image.

This method returns the reference line and sample coordinate at the upper right corner of the image.

Parameters:
sample Sample coordinate at the upper right
line Line coordinate at the upper right

Definition at line 174 of file MdisGeometry.cpp.

void refLowerLeftCoord ( double &  sample,
double &  line 
) const [virtual]

Returns the lower left line and sample coordinate of the image.

This method returns the reference line and sample coordinate at the lower left corner of the image.

Parameters:
sample Sample coordinate at the lower left
line Line coordinate at the lower left

Definition at line 197 of file MdisGeometry.cpp.

void refLowerRightCoord ( double &  sample,
double &  line 
) const [virtual]

Returns the lower right line and sample coordinate of the image.

This method returns the reference line and sample coordinate at the lower right corner of the image.

Parameters:
sample Sample coordinate at the lower right
line Line coordinate at the lower right

Definition at line 220 of file MdisGeometry.cpp.

Pvl getGeometry ( const QString &  filename  ) 

Compute and retrieve geometric parameters for given file.

This routine invokes a series of methods that compute geometric parameters for MESSENGER MDIS camera observations. These parameters are expressly for population of PDS keyword values in the original EDRs.

A camera model is required when computing these values and is provided through several constructor options and a method.

The filename argument is only for recording in the FILENAME keyword as the source of the actual ISIS file is likely from a PDS EDR file. This satisifies a need to associate the data with the original EDR. The camera model is invoked from the ISIS verision of the cube.

Parameters:
filename File to record as orginal source of data
Returns:
Pvl Contains PvlKeywords of all computed parameters

Definition at line 253 of file MdisGeometry.cpp.

void setPrecision ( int  ndigits  )  [inline]

Sets digits of precision for floating point keywords.

This method can be used to set the number of digits that follow the decimal point when formatting floating point keyword values. PDS will typically specify 5 digits of precision (which is the defined by _defaultDigits).

Definition at line 107 of file MdisGeometry.h.

void setNull ( const QString &  nullstring  )  [inline]

Sets the string to be used for uncomputable values.

Use this method to set the string that will be used when values cannot be computed. PDS recommends the value of "N/A" for these cases.

Parameters:
nullstring Value of the string to use

Definition at line 119 of file MdisGeometry.h.

QString getNull (  )  const [inline]

Value in use for uncomputable values.

Returns:
QString Uncomputed value string

Definition at line 128 of file MdisGeometry.h.

void updateNullKeys ( bool  action = true  )  [inline]

Select action when values cannot be computed.

When keyword values cannot be computed, the caller can set the action taken for the keyword. If action is true, the keyword value is set to the null string. If false, no action is taken and the keyword is not generated.

Parameters:
action True sets uncomputable keywords to null string, false is a noop.

Definition at line 143 of file MdisGeometry.h.

const Camera& getCamera (  )  const [inline, protected]

Return const reference to Camera model.

Definition at line 149 of file MdisGeometry.h.

Camera& getCamera (  )  [inline, protected]

Return reference to Camera model.

Definition at line 153 of file MdisGeometry.h.


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