PDS_JP2
|
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 | HiPrecision_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 | 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 | |
std::ostream & | operator<< (std::ostream &stream, const Point_2D &point) |
Print a Point_2D description to an output stream. | |
std::ostream & | operator<< (std::ostream &stream, const Size_2D &size) |
Print a Size_2D description to an output stream. | |
std::ostream & | operator<< (std::ostream &stream, const Rectangle &rectangle) |
Print a Rectangle description to an output stream. | |
bool | power_of_2 (unsigned int value) |
Test if a value is a power of 2. | |
PDS_Converter * | converter_for (const std::string &pathname) |
Get a PDS_Converter for a data source. | |
Parameter * | find_parameter (const idaeim::PVL::Aggregate ¶meters, 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. | |
Parameter * | remove_parameter (idaeim::PVL::Aggregate ¶meters, 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 ¶meter) |
Get the numeric value of a parameter. | |
std::string | string_value (const idaeim::PVL::Parameter ¶meter) |
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::Lister * | label_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. |
std::ostream & operator<< | ( | std::ostream & | stream, |
const Point_2D & | point | ||
) |
std::ostream & operator<< | ( | std::ostream & | stream, |
const Size_2D & | size | ||
) |
std::ostream & operator<< | ( | std::ostream & | stream, |
const Rectangle & | rectangle | ||
) |
bool power_of_2 | ( | unsigned int | value ) |
Test if a value is a power of 2.
value | An unsigned integer value. |
Referenced by JP2_Encoder::invalid_precinct_size(), main(), and JP2_Encoder::precinct_size().
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.
pathname | The pathname string to the data source. |
Referenced by main().
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 | 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. |
References Parameter::name().
Referenced by PDS_Data::data_blocks(), HiRISE_PDS_Converter::data_set_version(), HiPrecision_PDS_Converter::data_set_version(), PDS_Data::find_parameter(), PDS_Data::numeric_value(), Generic_PDS_Converter::parameter_of(), remove_parameter(), PDS_Data::string_value(), and HiRISE_PDS_Converter::write_PDS_label().
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 | 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. |
References find_parameter(), Parameter::parent(), and Aggregate::remove().
Referenced by PDS_Data::remove_parameter().
double numeric_value | ( | const idaeim::PVL::Parameter & | parameter ) |
Get the numeric value of a parameter.
parameter | The parameter from which to obtain a numeric value. |
idaeim::PVL_Invalid_Value | If the Value is not Numeric. |
References PDS_Data::ID, Value::is_Numeric(), Parameter::pathname(), Value::type_name(), and Parameter::value().
Referenced by PDS_Projection_Data::JP2_GML(), and PDS_Data::numeric_value().
std::string string_value | ( | const idaeim::PVL::Parameter & | parameter ) |
Get the string value of a parameter.
parameter | The parameter from which to obtain a string value. |
idaeim::PVL_Invalid_Value | If the Value is not a String. |
References PDS_Data::ID, Value::is_String(), Parameter::pathname(), Value::type_name(), and Parameter::value().
Referenced by HiRISE_PDS_Converter::data_set_version(), HiPrecision_PDS_Converter::data_set_version(), and PDS_Data::string_value().
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.
pathname | A Parameter pathname string. |
Referenced by Generic_PDS_Converter::write_PDS_JP2_label(), and Generic_PDS_Converter::write_PDS_label().
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.
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. |
Referenced by main().
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.
Referenced by PDS_Converter::write_label(), and Generic_PDS_Converter::write_PDS_label().
std::string UA::HiRISE::to_uppercase | ( | const std::string & | a_string ) |
Convert a string to all uppercase form.
a_string | The string to be converted. |