|
|
PDS_JP2
|
#include <Generic_PDS_Converter.hh>
Inheritance diagram for Generic_PDS_Converter:


Public Member Functions | |
| Generic_PDS_Converter () | |
| Constructs an empty Generic_PDS_Converter. | |
| 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. | |
| std::string | product_names () const |
| Get the name of the product types that this converter is intended to process. | |
| bool | label_recognized () const |
| Test whether the label parameters are recognized by this converter. | |
| 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. | |
| 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. | |
Static Public Attributes | |
| static const char *const | ID |
| Class identification name with source code version and date. | |
| static const char * | PRODUCT_TYPE = "generic" |
| The PDS product type name. | |
| static const char * | DATA_POINTER_PARAMETER_UNITS = "BYTES" |
| Units of parameters pointing to data blocks. | |
| 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. | |
| 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. | |
| static const int | DEFAULT_PDS_LABEL_SIZE = 2048 |
| Default size (bytes) of an attached PDS label. | |
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. | |
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.
|
|
||||||||||||||||
|
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.
|
|
|
Get the name of the product types that this converter is intended to process.
Reimplemented from PDS_Converter. Reimplemented in HiRISE_PDS_Converter. |
|
|
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. |
|
||||||||||||||||||||
|
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.
Implements PDS_Converter. Reimplemented in HiRISE_PDS_Converter. |
|
||||||||||||||||||||||||
|
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.
Implements PDS_Converter. Reimplemented in HiRISE_PDS_Converter. |
|
||||||||||||||||
|
Convenience parameter finder function that may throw an exception on failure.
|
|
|
Initial value:
"UA::HiRISE::Generic_PDS_Converter (1.10 2008/05/21 22:02:41)"
Reimplemented from PDS_Converter. Reimplemented in HiRISE_PDS_Converter. |
|
|
The PDS product type name.
|
|
|
Units of parameters pointing to data blocks.
|
|
|
Initial value:
{
RECORD_TYPE_PARAMETER_NAME,
LABEL_RECORDS_PARAMETER_NAME,
RECORD_BYTES_PARAMETER_NAME,
FILE_RECORDS_PARAMETER_NAME,
INTERCHANGE_FORMAT_PARAMETER_NAME,
0
}
|
|
|
Initial value: Names of parameters to be removed from the copy of the source PDS/JP2 label when generating the converted PDS label.
|
|
|
Default size (bytes) of an attached PDS label.
Reimplemented in HiRISE_PDS_Converter. |
1.4.6