PDS_JP2
|
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...
#include <Generic_PDS_Converter.hh>
Public Member Functions | |
Generic_PDS_Converter () | |
Constructs an empty Generic_PDS_Converter. More... | |
Generic_PDS_Converter (const std::string &pathname, const char **excluded_names=NULL, const char **image_names=NULL) | |
Constructs a Generic_PDS_Converter from a named file. More... | |
std::string | product_names () const |
Get the name of the product types that this converter is intended to process. More... | |
bool | label_recognized () const |
Test whether the label parameters are recognized by this converter. More... | |
void | write_PDS_JP2_label (const std::string &PDS_label_pathname, const std::string &JP2_pathname, const char **removed_parameter_names=NULL, PDS_Data *additional_parameters=NULL) |
Write a detached PDS/JP2 label file. More... | |
void | write_PDS_label (const std::string &PDS_label_pathname, const Rectangle *image_region=NULL, unsigned int resolution_level=1, const char **removed_parameter_names=NULL, PDS_Data *additional_parameters=NULL) |
Write a PDS label for image data to be appended. More... | |
Public Member Functions inherited from PDS_Converter | |
PDS_Converter () | |
Constructs an empty PDS_Converter. More... | |
PDS_Converter (const std::string &pathname, const char **excluded_names=NULL, const char **image_names=NULL) | |
Constructs a PDS_Converter from a named file. More... | |
PDS_Converter (const PDS_Converter &converter) | |
Copies a PDS_Converter. More... | |
virtual PDS_Converter & | operator= (const PDS_Converter &converter) |
Assigns another PDS_Converter to this PDS_Converter. More... | |
virtual | ~PDS_Converter () |
Frees the PDS_Data::PDS_Data_Block_List and its contents. More... | |
PDS_Converter & | label_size (unsigned int size) |
Set the preferred size of a label file. More... | |
unsigned int | label_size () const |
Get the preferred size of a label file. More... | |
PDS_Data::PDS_Data_Block_List * | data_blocks () const |
Get the list of data blocks in the PDS label. More... | |
void | refresh_data_blocks () |
Refresh the list of data blocks. More... | |
Image_Data_Block * | image_data () |
Get the Image_Data_Block from the PDS_Data::PDS_Data_Block_List. More... | |
PDS_Converter & | excluded_data_block_names (const char **names) |
Set the names of parameters to be excluded from the data block list. More... | |
const char ** | excluded_data_block_names () const |
Get the names of parameters to be excluded from the data block list. More... | |
PDS_Converter & | image_data_block_names (const char **names) |
Set the parameter names of image data blocks. More... | |
const char ** | image_data_block_names () const |
Get the parameter names of image data blocks. More... | |
idaeim::PVL::Aggregate * | PDS_JP2_image_parameters (const std::string &JP2_pathname) |
Assemble PDS/JP2 image file description parameters. More... | |
unsigned int | write_label (const std::string &pathname, PDS_Data &label, idaeim::PVL::Lister *lister=NULL, bool pad_label=false) |
Write a label file. More... | |
Public Member Functions inherited from PDS_Data | |
PDS_Data () | |
Construct PDS_Data with no parameters. More... | |
PDS_Data (const idaeim::PVL::Aggregate ¶meters) | |
Construct PDS_Data from a PVL Parameter Aggregate. More... | |
PDS_Data (const idaeim::PVL::Aggregate ¶meters, const std::string &detached) | |
Construct PDS_Data from a PVL Parameter Aggregate. More... | |
PDS_Data (const std::string &pathname) | |
Construct PDS_Data from a named file. More... | |
PDS_Data_Block_List * | data_blocks (const char **excluded=NULL, const char **image_block_names=NULL) |
Get a list of all binary data blocks in the PDS data. More... | |
idaeim::PVL::Parameter * | find_parameter (const std::string &pathname, bool case_sensitive=false, int skip=0, Parameter_Class_Selection parameter_class=ANY_PARAMETER) const |
Find a named Parameter. More... | |
virtual PDS_Data & | parameters (const std::string &pathname) |
Set the parameters from a source file. More... | |
virtual PDS_Data & | parameters (const idaeim::PVL::Aggregate ¶meters) |
Set the parameters from a Parameter Aggregate. More... | |
idaeim::PVL::Parameter * | remove_parameter (const std::string &pathname, bool case_sensitive=false, int skip=0, Parameter_Class_Selection parameter_class=ANY_PARAMETER) |
Removes a named Parameter. More... | |
template<typename T > | |
bool | parameter_value (const std::string &pathname, T &value, bool case_sensitive=false, int skip=0) |
Set the value of a named parameter. More... | |
double | numeric_value (const std::string &pathname, bool case_sensitive=false, int skip=0) const |
Get the numeric value of a named parameter. More... | |
std::string | string_value (const std::string &pathname, bool case_sensitive=false, int skip=0) const |
Get the string value of a named parameter. More... | |
Public Member Functions inherited from Aggregate | |
Aggregate & | add (const Parameter ¶meter) |
Aggregate & | add (Parameter *parameter) |
Aggregate (const Aggregate &aggregate) | |
Aggregate (Parser &parser, const std::string name="") | |
Aggregate (const std::string name="", const idaeim::PVL::Parameter::Type type_code=Default_Subtype) | |
Aggregate (const Parameter ¶meter) | |
Depth_Iterator | begin_depth () |
Aggregate * | clone () const |
int | compare (const Parameter ¶meter) const |
Aggregate & | copy_in (const Aggregate &aggregate) |
Depth_Iterator | end_depth () |
void | entering (Parameter *parameter) |
Parameter * | find (const std::string &pathname, bool case_sensitive=false, int skip=0, idaeim::PVL::Parameter::Type type=(Type)(ASSIGNMENT|AGGREGATE)) const |
bool | is (const Type type) const |
bool | is_Aggregate () const |
bool | is_Group () const |
bool | is_Object () const |
Aggregate & | move_in (Aggregate &aggregate) |
Aggregate & | operator= (const Parameter ¶meter) |
Aggregate & | operator= (const Aggregate ¶meter) |
Aggregate & | operator= (const Assignment ¶meter) |
Aggregate & | operator= (const Value &value) |
const Parameter & | operator[] (unsigned int index) const |
Parameter & | operator[] (unsigned int index) |
void | read (std::istream &in=std::cin) |
void | read (Parser &parser) |
Parameter * | remove (size_type index) |
Parameter * | remove (Parameter *parameter) |
Parameter * | remove (iterator position) |
Parameter * | remove_depth (Parameter *parameter) |
void | removing (Parameter *parameter) |
size_type | total_size () |
Aggregate & | type (const int type) |
Type | type () const |
std::string | type_name () const |
Value & | value () const |
~Aggregate () | |
Public Member Functions inherited from Parameter | |
bool | at_pathname (std::string pathname, bool case_sensitive, const Parameter *root=NULL) const |
bool | at_pathname (std::string pathname) const |
bool | at_pathname (std::string pathname, bool case_sensitive, const Parameter &root) const |
std::string | comment () const |
Parameter & | comment (const std::string &comment) |
bool | has_children () const |
Parameter & | indenting (const MODE_STATE state, const WHICH_MODE which=LOCAL_MODE_SET) |
Parameter & | indenting (const bool enable) |
MODE_STATE | indenting (const WHICH_MODE which=RECURSIVE_MODE_SET) const |
virtual bool | is_Assignment () const |
virtual bool | is_Token () const |
Parameter & | mode_state (const MODE mode, const MODE_STATE state, const WHICH_MODE which=LOCAL_MODE_SET) |
const MODE_STATE * | mode_state (const WHICH_MODE which=LOCAL_MODE_SET) const |
MODE_STATE | mode_state (const MODE mode, const WHICH_MODE which=RECURSIVE_MODE_SET) const |
Parameter & | mode_state (const MODE_STATE *const modes, const WHICH_MODE which=LOCAL_MODE_SET) |
std::string | name () const |
Parameter & | name (const std::string &name) |
bool | operator!= (const Parameter ¶meter) const |
bool | operator< (const Parameter ¶meter) const |
bool | operator<= (const Parameter ¶meter) const |
bool | operator== (const Parameter ¶meter) const |
bool | operator> (const Parameter ¶meter) const |
bool | operator>= (const Parameter ¶meter) const |
Parameter (const Parameter ¶meter) | |
Parameter (const std::string &name="") | |
Aggregate * | parent () const |
std::string | pathname (const Parameter *root=NULL) const |
std::string | pathname (const Parameter &root) const |
std::string | pathname_to (const Parameter *root=NULL) const |
std::string | pathname_to (const Parameter &root) const |
std::ostream & | print (std::ostream &out=std::cout) const |
Aggregate * | root () const |
MODE_STATE | verbatim_strings (const WHICH_MODE which=RECURSIVE_MODE_SET) const |
Parameter & | verbatim_strings (const bool enable) |
Parameter & | verbatim_strings (const MODE_STATE state, const WHICH_MODE which=LOCAL_MODE_SET) |
unsigned int | write (std::ostream &out=std::cout, int depth=0) const |
virtual | ~Parameter () |
Public Member Functions inherited from Vectal< Parameter > | |
void | assign (size_type number, const_reference value) |
void | assign (Iterator start, Iterator stop) |
reference | at (size_type index) |
const_reference | at (size_type index) const |
reference | back () |
const_reference | back () const |
Iterator | begin () |
Const_Iterator | begin () const |
void | clear () |
Iterator | end () |
Const_Iterator | end () const |
void | erase (size_type index) |
iterator | erase (iterator start, iterator stop) |
iterator | erase (iterator position) |
reference | front () |
const_reference | front () const |
iterator | insert (iterator position, const_reference value) |
void | insert (size_type index, const_reference value) |
void | insert (iterator position, size_type number, const_reference value) |
void | insert (iterator position, InputIterator start, InputIterator stop) |
Vectal & | operator= (const Vectal< value_type > &vectal) |
const_reference | operator[] (size_type index) const |
reference | operator[] (size_type index) |
pointer | peek (const iterator &position) |
pointer | peek (const const_iterator &position) const |
pointer | peek_back () |
pointer | peek_back () const |
iterator | poke (iterator position, pointer value_pointer) |
void | poke (size_type index, pointer value_pointer) |
iterator | poke (iterator position, const_iterator start, const_iterator stop) |
void | poke_back (pointer value_pointer) |
void | pop_back () |
iterator | pull (iterator position) |
iterator | pull (iterator start, iterator stop) |
pointer | pull_back () |
pointer | pull_out (size_type index) |
pointer | pull_out (iterator position) |
void | push_back (const_reference value) |
Reverse_Iterator | rbegin () |
Const_Reverse_Iterator | rbegin () const |
Const_Reverse_Iterator | rend () const |
Reverse_Iterator | rend () |
pointer | replace (iterator position, pointer value_pointer) |
void | resize (size_type new_size) |
void | resize (size_type new_size, const_reference value) |
Vectal (Iterator start, Iterator stop) | |
Vectal (const Vectal &vectal) | |
Vectal () | |
Vectal (size_type size, const_reference value) | |
Base & | vector_base () |
void | wipe () |
virtual | ~Vectal () |
Static Public Attributes | |
static const char *const | ID |
Class identification name with source code version and date. More... | |
static const char * | PRODUCT_TYPE = "generic" |
The PDS product type name. More... | |
static const char * | DATA_POINTER_PARAMETER_UNITS = "BYTES" |
Units of parameters pointing to data blocks. More... | |
static const char * | REMOVED_PDS_PARAMETER_NAMES [] |
Names of parameters to be removed from the copy of the source PDS label when generating the converted PDS/JP2 label. More... | |
static const char * | REMOVED_PDS_JP2_PARAMETER_NAMES [] |
Names of parameters to be removed from the copy of the source PDS/JP2 label when generating the converted PDS label. More... | |
static const int | DEFAULT_PDS_LABEL_SIZE = 2048 |
Default size (bytes) of an attached PDS label. More... | |
Static Public Attributes inherited from PDS_Converter | |
static const char *const | ID |
Class identification name with source code version and date. More... | |
static const char * | DEFAULT_PRODUCT_TYPE = "unspecified" |
Default product name. More... | |
static const char * | UNCOMPRESSED_FILE_PARAMETERS_GROUP = "UNCOMPRESSED_FILE" |
Name of the PDS/JP2 label parameter group describing the source uncompressed file. More... | |
static const char * | COMPRESSED_FILE_PARAMETERS_GROUP = "COMPRESSED_FILE" |
Names of the PDS/JP2 label parameter group describing the destination compressed file. More... | |
static const char * | GeoTIFF_PARAMETER_NAME = "GeoTIFF_Included" |
GeoTIFF included. More... | |
static const char * | GML_PARAMETER_NAME = "GML_Included" |
GML included. More... | |
static const char * | NO_VERSION_CHANGE_PARAMETER_NAME = "No_Version_Change" |
No Version number change. More... | |
Static Public Attributes inherited from PDS_Data | |
static const char *const | ID |
Class identification name with source code version and date. More... | |
static const char * | PDS_ID_PARAMETER_NAME = "PDS_VERSION_ID" |
Name of the parameter providing the PDS ID. More... | |
static const char * | RECORD_TYPE_PARAMETER_NAME = "RECORD_TYPE" |
Name of the parameter specifying the type of label records. More... | |
static const char * | BYTE_RECORD_TYPE = "UNDEFINED" |
The record type used to define byte count based records. More... | |
static const char * | FIXED_LENGTH_RECORD_TYPE = "FIXED_LENGTH" |
The record type used to define fixed length records. More... | |
static const char * | LABEL_RECORDS_PARAMETER_NAME = "LABEL_RECORDS" |
Name of the parameter specifying the number of records in the label. More... | |
static const char * | RECORD_BYTES_PARAMETER_NAME = "RECORD_BYTES" |
Name of the parameter specifying the number of bytes per record. More... | |
static const char * | FILE_RECORDS_PARAMETER_NAME = "FILE_RECORDS" |
Name of the parameter specifying the number of records in the file. More... | |
static const char * | INTERCHANGE_FORMAT_PARAMETER_NAME = "INTERCHANGE_FORMAT" |
Name of the parameter indicating the data format. More... | |
static const char * | IMAGE_DATA_BLOCK_NAME = "IMAGE" |
Name of the Image_Data_Block parameter group. More... | |
static const char * | BYTES_UNITS = "BYTES" |
Units name for storage measured in bytes. More... | |
static const char | RECORD_POINTER_PARAMETER_MARKER = '^' |
Record pointer parameter prefix. More... | |
Static Public Attributes inherited from Parameter | |
static const bool | DEFAULT_CASE_SENSITIVITY |
static const char | DEFAULT_PATHNAME_DELIMITER |
static const char *const | ID |
Static Public Attributes inherited from Vectal_ID | |
static const char *const | ID |
Protected Member Functions | |
Parameter * | parameter_of (idaeim::PVL::Aggregate ¶meters, const char *name, bool throw_unless_found=true) |
Convenience parameter finder function that may throw an exception on failure. More... | |
Protected Member Functions inherited from PDS_Converter | |
void | clear_data_blocks () |
Clear the data blocks list. More... | |
Protected Member Functions inherited from Vectal< Parameter > | |
virtual void | entering (pointer value_pointer) |
virtual void | removing (pointer value_pointer) |
Additional Inherited Members | |
Public Types inherited from PDS_Data | |
enum | Parameter_Class_Selection { AGGREGATE_PARAMETER = -1 , ANY_PARAMETER = 0 , ASSIGNMENT_PARAMETER = 1 } |
Selects the class of parameter to find. More... | |
typedef std::vector< PDS_Data_Block * > | PDS_Data_Block_List |
A vector of PDS_Data_Block object pointers. More... | |
Public Types inherited from Aggregate | |
typedef Parameter_List::const_iterator | const_iterator |
typedef Depth_Iterator | depth_iterator |
typedef Parameter_List::iterator | iterator |
typedef Vectal< Parameter > | Parameter_List |
Public Types inherited from Parameter | |
enum | MODE |
enum | MODE_STATE |
enum | Type |
enum | WHICH_MODE |
typedef Integer | Default_Value |
Public Types inherited from Vectal< Parameter > | |
typedef Base::allocator_type | allocator_type |
typedef std::vector< Parameter * > | Base |
typedef Base::const_iterator | Base_const_iterator |
typedef Base::const_reverse_iterator | Base_const_reverse_iterator |
typedef Base::iterator | Base_iterator |
typedef Base::reverse_iterator | Base_reverse_iterator |
typedef Const_Iterator | const_iterator |
typedef const pointer | const_pointer |
typedef const value_type & | const_reference |
typedef Const_Reverse_Iterator | const_reverse_iterator |
typedef const value_type | const_value_type |
typedef Base::difference_type | difference_type |
typedef Iterator | iterator |
typedef value_type * | pointer |
typedef value_type & | reference |
typedef Reverse_Iterator | reverse_iterator |
typedef Base::size_type | size_type |
typedef Parameter | value_type |
Static Public Member Functions inherited from PDS_Data | |
static Image_Data_Block * | image_data (PDS_Data_Block_List *data_block_list) |
Get the Image_Data_Block from a PDS_Data::PDS_Data_Block_List. More... | |
Static Public Member Functions inherited from Aggregate | |
static Type | default_type () |
static Type | default_type (const int type) |
Static Public Member Functions inherited from Parameter | |
static bool | case_sensitive () |
static bool | case_sensitive (bool enable) |
static char | path_delimiter (const char delimiter) |
static char | path_delimiter () |
static std::string | type_name (const Type type) |
Public Attributes inherited from Aggregate | |
CASE_INSENSITIVE | |
CASE_SENSITIVE | |
Public Attributes inherited from Parameter | |
Verbatim_Strings | |
Indenting | |
TOTAL_LOCAL_MODES | |
MODE_FALSE | |
MODE_TRUE | |
MODE_INHERITED | |
ASSIGNMENT | |
TOKEN | |
AGGREGATE | |
GROUP | |
OBJECT | |
END | |
END_GROUP | |
END_OBJECT | |
LOCAL_MODE_SET | |
DEFAULT_MODE_SET | |
RECURSIVE_MODE_SET | |
Protected Attributes inherited from PDS_Converter | |
const char ** | Excluded_Data_Block_Names |
Names (NULL-terminated array) of data blocks to be exluded from the list of data blocks (probably because they are redundant with other data blocks). More... | |
PDS_Data::PDS_Data_Block_List * | Data_Blocks |
Pointer to the list of data blocks found in the PDS label. More... | |
const char ** | Image_Data_Block_Names |
Names (NULL-terminated array) of data blocks that are Image_Data_Blocks. More... | |
Image_Data_Block * | IMAGE_Data_Block |
Pointer to the IMAGE data block in the Data_Blocks list. More... | |
unsigned int | Label_Size |
The preferred size of the attached PDS label. More... | |
Protected Attributes inherited from Parameter | |
std::string | Comment |
MODE_STATE | Modes [TOTAL_LOCAL_MODES] |
std::string | Name |
Aggregate * | Parent |
Static Protected Attributes inherited from Parameter | |
static bool | Case_Sensitive |
static MODE_STATE | DEFAULT_MODES [TOTAL_LOCAL_MODES] |
static char | Path_Delimiter |
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.
N.B.: Only the IMAGE description is modified; no product-specific modfications are made. Thus this class is intended as a catch-all PDS_Converter implementation.
Constructs an empty Generic_PDS_Converter.
|
explicit |
Constructs a Generic_PDS_Converter from a named file.
The PDS file may contain an attached PDS label or be a detached PDS/JP2 label file. Either the write_PDS_label or write_PDS_JP2_label methods can be used to convert either source, respectively.
pathname | The pathname to the source file containing the PDS label. |
excluded_names | The NULL-terminated array of character strings naming data blocks to be excluded from conversion consideration. May be NULL. |
image_names | The NULL-terminated array of character strings naming data blocks that describe image data. N.B.: The PDS_Data::IMAGE_DATA_BLOCK_NAME is always implicitly included. May be NULL. |
References Generic_PDS_Converter::DEFAULT_PDS_LABEL_SIZE, and PDS_Converter::label_size().
|
virtual |
Get the name of the product types that this converter is intended to process.
Reimplemented from PDS_Converter.
Reimplemented in HiRISE_PDS_Converter, and HiPrecision_PDS_Converter.
References Generic_PDS_Converter::PRODUCT_TYPE.
|
virtual |
Test whether the label parameters are recognized by this converter.
The test will succeed if an image data block is found in the source file label.
Implements PDS_Converter.
Reimplemented in HiRISE_PDS_Converter, and HiPrecision_PDS_Converter.
References PDS_Converter::image_data().
|
virtual |
Write a detached PDS/JP2 label file.
A copy is made of the source label represented by the Parameter Aggregate of the PDS_Converter base class. The parameters with the REMOVED_PDS_PARAMETER_NAMES are removed from the new label parameters. If a removed_parameter_names list is provided these additional parameters are also removed. In addition, any data block groups are removed. N.B.: If applied to a HiRISE EDR data product all the binary data blocks will be dropped; this may not be what is desired.
The new image file parameter groups are then added to the label, after any Image_Data_Block::LINE_PREFIX_BYTES_PARAMETER_NAME or Image_Data_Block::LINE_SUFFIX_BYTES_PARAMETER_NAME parameters have been removed (N.B.: This assumes that the JP2_Encoder does not include line prefix or suffix bytes when processing the image data block). These parameters replace the original image data block parameters.
The new PDS label file is then written with PDS standard label formatting applied.
PDS_label_pathname | The pathname for the detached label file. |
JP2_pathname | The name of the JP2 image data file referened by the label file. |
removed_parameter_names | A NULL terminated array of character strings that are the names of parameters to be removed from the source label before being written. May be NULL. |
additional_parameters | A pointer to PDS_Data that contains additional parameters with product-specific label conversion information. May be NULL. |
ios::failure | If the label file could no be created. |
Implements PDS_Converter.
Reimplemented in HiRISE_PDS_Converter, and HiPrecision_PDS_Converter.
References UA::HiRISE::absolute_pathname(), PDS_Converter::Data_Blocks, PDS_Converter::excluded_data_block_names(), Aggregate::move_in(), Parameter::name(), PDS_Data::parameters(), Parameter::pathname(), PDS_Converter::PDS_JP2_image_parameters(), PDS_Data::RECORD_POINTER_PARAMETER_MARKER, PDS_Data::remove_parameter(), Generic_PDS_Converter::REMOVED_PDS_PARAMETER_NAMES, and PDS_Converter::write_label().
Referenced by HiPrecision_PDS_Converter::write_PDS_JP2_label(), and HiRISE_PDS_Converter::write_PDS_JP2_label().
|
virtual |
Write a PDS label for image data to be appended.
A copy is made of the source label represented by the Parameter Aggregate of the PDS_Converter base class. The parameters with the REMOVED_PDS_JP2_PARAMETER_NAMES are removed from the new label parameters. If a removed_parameter_names list is provided these additional parameters are also removed.
Immediately following the PDS_Data::PDS_ID_PARAMETER_NAME parameter a PDS_Data::RECORD_TYPE_PARAMETER_NAME parameter with the BYTE_RECORD_TYPE value is inserted. This is followed by a PDS_Data::LABEL_RECORDS_PARAMETER_NAME parameter with the DEFAULT_PDS_LABEL_SIZE value. Next a PDS_Data::IMAGE_DATA_BLOCK_NAME parameter with a PDS_Data::RECORD_POINTER_PARAMETER_MARKER prefix with a value of DEFAULT_PDS_LABEL_SIZE + 1 is inserted.
The original image data block parameters are copied and the Image_Data_Block::IMAGE_WIDTH_PARAMETER_NAME and Image_Data_Block::IMAGE_HEIGHT_PARAMETER_NAME parameter values are changed to the image width and image height values, respectively. The modified image data block parameters are then appended to the modified label parameters.
The new PDS label file is then written with PDS standard label formatting applied. The file is appended with space characters to pad out the DEFAULT_PDS_LABEL_SIZE. If the size of the label is greater than the DEFAULT_PDS_LABEL_SIZE, then it is rewritten with a size expanded to the next 2K byte increment and the PDS_Data::LABEL_RECORDS_PARAMETER_NAME and Image_Data_Block::IMAGE_HEIGHT_PARAMETER_NAME pointer parameter values adjusted accordingly.
PDS_label_pathname | The pathname for the file that begins with the converted PDS label. |
image_region | A Rectangle pointer that specifies a region within the image that was rendered. N.B.: The rendered image region is specifed after any resolution change has been applied (don't just shift the full resolution image region by the resolution level, which may be inaccurate, get the rendered image size from the JP2 decoder). If NULL, the entire image was selected. |
resolution_level | The resolution level at which the image is rendereed from the JP2 codestream is rendered. 1 is full resolution, 2 is half resolution, 3 is quarter resolution, etc.; i.e. the rendering scale is 1 / (2**(L - 1)). |
removed_parameter_names | A NULL terminated array of character strings that are the names of parameters to be removed from the source label before being written. May be NULL. |
additional_parameters | A pointer to PDS_Data that contains additional parameters with product-specific label conversion information. May be NULL. |
runtime_error | If the source label does not contain the expected parameters required to achieve the conversion. |
ios::failure | If the label file could no be created. |
Implements PDS_Converter.
Reimplemented in HiRISE_PDS_Converter, and HiPrecision_PDS_Converter.
References UA::HiRISE::absolute_pathname(), Aggregate::add(), Vectal< T >::begin(), PDS_Data::BYTE_RECORD_TYPE, Parameter::comment(), Generic_PDS_Converter::DATA_POINTER_PARAMETER_UNITS, Vectal< T >::end(), Size_2D::Height, Generic_PDS_Converter::ID, PDS_Converter::image_data(), PDS_Data::IMAGE_DATA_BLOCK_NAME, Image_Data_Block::IMAGE_HEIGHT_PARAMETER_NAME, Image_Data_Block::IMAGE_WIDTH_PARAMETER_NAME, Vectal< T >::insert(), UA::HiRISE::label_lister(), PDS_Data::LABEL_RECORDS_PARAMETER_NAME, PDS_Converter::label_size(), PDS_Converter::Label_Size, Image_Data_Block::LINE_PREFIX_BYTES_PARAMETER_NAME, Image_Data_Block::LINE_SUFFIX_BYTES_PARAMETER_NAME, Parameter::name(), Generic_PDS_Converter::parameter_of(), Parameter::pathname(), PDS_Data::PDS_Data(), PDS_Data::PDS_ID_PARAMETER_NAME, PDS_Data::RECORD_POINTER_PARAMETER_MARKER, PDS_Data::RECORD_TYPE_PARAMETER_NAME, PDS_Data::remove_parameter(), Generic_PDS_Converter::REMOVED_PDS_JP2_PARAMETER_NAMES, Lister::total(), Aggregate::type(), Parameter::value(), Size_2D::Width, PDS_Converter::write_label(), Point_2D::X, and Point_2D::Y.
Referenced by HiPrecision_PDS_Converter::write_PDS_label(), and HiRISE_PDS_Converter::write_PDS_label().
|
protected |
Convenience parameter finder function that may throw an exception on failure.
parameters | An Aggregate reference that contains the parameters to be searched. |
name | The name of the parameter to find. The first parameter with a case insensitive matching name is selected. |
throw_unless_found | If true, a runtime_error will be thrown if a matching parameter name is not found; otherwise a NULL value will be returned in this case. |
runtime_error | If a matching parameter name was not found and throw_unless_found is true. |
References PDS_Data::ASSIGNMENT_PARAMETER, UA::HiRISE::find_parameter(), Generic_PDS_Converter::ID, Parameter::name(), and PDS_Data::parameters().
Referenced by HiRISE_PDS_Converter::adjust_image_map_projection(), and Generic_PDS_Converter::write_PDS_label().
|
static |
Class identification name with source code version and date.
Referenced by Generic_PDS_Converter::parameter_of(), and Generic_PDS_Converter::write_PDS_label().
|
static |
The PDS product type name.
Referenced by Generic_PDS_Converter::product_names().
|
static |
Units of parameters pointing to data blocks.
Referenced by Generic_PDS_Converter::write_PDS_label().
|
static |
Names of parameters to be removed from the copy of the source PDS label when generating the converted PDS/JP2 label.
Referenced by Generic_PDS_Converter::write_PDS_JP2_label().
|
static |
Names of parameters to be removed from the copy of the source PDS/JP2 label when generating the converted PDS label.
Referenced by Generic_PDS_Converter::write_PDS_label().
|
static |
Default size (bytes) of an attached PDS label.
Referenced by Generic_PDS_Converter::Generic_PDS_Converter().