HiRISE
 PDS_JP2

UA::HiRISE Namespace Reference


Classes

struct  Point_2D
 A Point_2D holds 2-dimensional position information. More...
struct  Size_2D
 A Size_2D holds 2-dimensional size information. More...
struct  Rectangle
 A Rectangle is a position with a size. More...
class  Generic_PDS_Converter
 A Generic_PDS_Converter is used to convert a generic image data product PDS label between its attached PDS form and its detached PDS/JP2 form. More...
class  HiRISE_PDS_Converter
 A HiRISE_PDS_Converter is used to convert a HiRISE image data product PDS label between its attached PDS form and its detached PDS/JP2 form. More...
class  Image_Data_Block
 An Image_Data_Block describes PDS image data. More...
class  JP2_Box
 A JP2_Box contains JP2 file format box data. More...
class  JP2_Decoder
 A JP2_Decoder decodes image pixel data from a JPEG2000 JP2 image file. More...
class  JP2_Encoder
 A JP2_Encoder encodes image pixel data into a JPEG2000 JP2 file. More...
class  PDS_Converter
 A PDS_Converter is used to convert an attached PDS image label to or from a detached PDS/JP2 label. More...
class  PDS_Data
 PDS_Data contains PDS label PVL parameters. More...
class  PDS_Data_Block
 A PDS_Data_Block describes a binary data block in a PDS label. More...
class  PDS_Projection_Data
 The PDS_Projection_Data provides geographic projection capabilities between image and real world coordinates. More...

Functions

bool power_of_2 (unsigned int value)
 Test if a value is a power of 2.
PDS_Converterconverter_for (const std::string &pathname)
 Get a PDS_Converter for a data source.
Parameterfind_parameter (const idaeim::PVL::Aggregate &parameters, const std::string &pathname, bool case_sensitive=false, int skip=0, PDS_Data::Parameter_Class_Selection parameter_class=PDS_Data::ANY_PARAMETER)
 Find a named Parameter within a Parameter Aggregate.
Parameterremove_parameter (idaeim::PVL::Aggregate &parameters, const std::string &pathname, bool case_sensitive=false, int skip=0, PDS_Data::Parameter_Class_Selection parameter_class=PDS_Data::ANY_PARAMETER)
 Removes a named Parameter within a Parameter Aggregate.
double numeric_value (const idaeim::PVL::Parameter &parameter)
 Get the numeric value of a parameter.
std::string string_value (const idaeim::PVL::Parameter &parameter)
 Get the string value of a parameter.
std::string absolute_pathname (const std::string &pathname)
 Ensure an absolute pathname.
string to_uppercase (const string &a_string)
string indent (std::string lines, int amount)
 Indent lines of text by the specified number of spaces.
idaeim::PVL::Listerlabel_lister ()
 Get a PVL Lister appropriately configured for PDS label generation.
std::string to_uppercase (const std::string &a_string)
 Convert a string to all uppercase form.


Function Documentation

bool power_of_2 unsigned int  value  ) 
 

Test if a value is a power of 2.

Parameters:
value An unsigned integer value.
Returns:
true if the value is a power of 2 (including 0); false otherwise.

PDS_Converter * converter_for const std::string &  pathname  ) 
 

Get a PDS_Converter for a data source.

An attempt is made to construct a specific PDS_Converter on the source pathname. The most specific converters are tried before the Generic_PDS_Converter is finally tried. Each known PDS_Converter implementation is tried until one can be constructed and the source file label is recognized. If the constructor throws an exception it, and the converter, will be ignored.

N.B.: When a new PDS_Converter is implemented it must be added to the sequence of constructor tries. The converter's label_recognized method must return true to indicate that it is suitable for the specified source.

Any exception thrown by the Generic_PDS_Converter will be propogated.

Parameters:
pathname The pathname string to the data source.
Returns:
A pointer to a PDS_Converter, or NULL if no suitable converter can be constructed.
See also:
PDS_Converter

Generic_PDS_Converter

HiRISE_PDS_Converter

idaeim::PVL::Parameter * find_parameter const idaeim::PVL::Aggregate parameters,
const std::string &  pathname,
bool  case_sensitive = false,
int  skip = 0,
PDS_Data::Parameter_Class_Selection  parameter_class = PDS_Data::ANY_PARAMETER
 

Find a named Parameter within a Parameter Aggregate.

The Parameter to be found may be specified by a simple name, a relative pathname or an absolute pathname. A simple name is the name of a Parameter itself. A relative pathname is a simple name preceeded by the pathname of an Aggregate Parameter that must contain the Parameter with the simple name. An absolute pathname is a pathname that begins with a pathname delimiter ('/'); i.e. it is a fully qualified pathname beginning at the root of the Aggregate hierarchy, compared to a relative pathname that may begin at any Aggregate in the hierarchy.

Since it is not necessary that the pathname to each Parameter be unique, the number of matching pathnames to skip before selecting a Parameter may need to be specified to get the desired Parameter. Also, a specific type of Parameter - an Aggregate of Parameters or an Assignment of Values - may be specified. When skipping parameters, only the specified type, if any, are counted.

Parameters:
parameters The Aggregate within which to search.
pathname The pathname of the parameter to find.
case_sensitive If true, the name search is case sensitive; case insensitive otherwise.
skip The number of parameters that match the name to skip before selecting a matching parameter.
parameter_class A PDS::Parameter_Class_Selection: If PDS_Data::AGGREGATE_PARAMETER, only Aggregate parameters will be selected; if PDS_Data::ASSIGNMENT_PARAMETER, only Assignment parameters will be selected; otherwise any type of parameter (PDS_Data::ANY_PARAMETER) is acceptable.
Returns:
A pointer to the matching parameter, or NULL if it could not be found.
See also:
PVL::Parameter::at_pathname()

idaeim::PVL::Parameter * remove_parameter idaeim::PVL::Aggregate parameters,
const std::string &  pathname,
bool  case_sensitive = false,
int  skip = 0,
PDS_Data::Parameter_Class_Selection  parameter_class = PDS_Data::ANY_PARAMETER
 

Removes a named Parameter within a Parameter Aggregate.

Parameters:
parameters The Aggregate within which to search.
pathname The name of the parameter to find.
case_sensitive If true, the name search is case sensitive; case insensitive otherwise.
skip The number of parameters that match the name to skip before selecting a matching parameter.
parameter_class A Parameter_Class_Selection: If AGGREGATE_PARAMETER, only Aggregate parameters will be selected; if ASSIGNMENT_PARAMETER, only Assignment parameters will be selected; otherwise any type of parameter (ANY_PARAMETER) is acceptable.
Returns:
A pointer to the parameter that was removed, or NULL if it could not be found.

double numeric_value const idaeim::PVL::Parameter parameter  ) 
 

Get the numeric value of a parameter.

Parameters:
parameter The parameter from which to obtain a numeric value.
Returns:
The value of the parameter as a double.
Exceptions:
idaeim::PVL_Invalid_Value If the Value is not Numeric.

std::string string_value const idaeim::PVL::Parameter parameter  ) 
 

Get the string value of a parameter.

Parameters:
parameter The parameter from which to obtain a string value.
Returns:
The value of the parameter as a string.
Exceptions:
idaeim::PVL_Invalid_Value If the Value is not a String.

std::string absolute_pathname const std::string &  pathname  ) 
 

Ensure an absolute pathname.

If the pathname does not begin with a Parameter pathname delimiter one is prepended. An empty pathname results in an empty string.

Parameters:
pathname A Parameter pathname string.
Returns:
The pathname in absolute form.

string UA::HiRISE::to_uppercase const string &  a_string  ) 
 

std::string indent std::string  lines,
int  amount
 

Indent lines of text by the specified number of spaces.

The beginning of each line of text - where a line is terminated by a new-line ('
') character - is prepended with the specified amount of whitespace (' ' characters). If no new-line is present but the lines string is not empty it is taken to be a single line that is shifted.

Parameters:
lines An arbitrary string.
amount The amount of whitespace to shift the lines. If this is less than or equal to zero no shifting is done.
Returns:
The modified lines string.

idaeim::PVL::Lister * label_lister  ) 
 

Get a PVL Lister appropriately configured for PDS label generation.

The Lister will be configured to use strict mode except: Begin and End name markers on Aggregates will not be included, assignment value alignment will be enabled, array indenting will be enabled, single line commenting style will be used, and the statement end delimiter will not be used.

Returns:
A pointer to an idaeim::PVL::Lister that has been allocated on the heap. N.B.: Delete when no longer needed.

std::string UA::HiRISE::to_uppercase const std::string &  a_string  ) 
 

Convert a string to all uppercase form.

Parameters:
a_string The string to be converted.
Returns:
A copy of the given string with all characters converted to uppercase.


Generated on Tue Jul 15 14:22:55 2008 for UA::HiRISE::PDS_JP2 by  doxygen 1.4.6