This software was developed at the Planetary Image Research Laboratory (PIRL) HiRISE Operations Center (HiROC) of the University of Arizona Department of Planetary Sciences for the purpose of managing observation data sets produced by the High Resolution Imaging Science Experiment (HiRISE) instrument, part of the NASA Mars Reconnaissance Orbiter (MRO) mission.
The PDS_JP2 subsystem contains applications and a library of reusable C++ classes for the conversion between PDS uncompressed image data files with an attached metadata label and a compressed JP2 image data file with a detached PDS metadata label file. Applications are provided for the conversion in either direction.
The PDS_to_JP2 application (see the usage and main descriptions) converts PDS image data products with an attached PDS metadata label to a JP2 formatted image data file with a detached PDS label file. The detached PDS label file is an adjusted copy of the contents of the attached PDS label with binary data block objects removed. The IMAGE description parameters of the attached PDS label are replaced with new parameter groups describing the original source file, including the original IMAGE description group, and the new JP2 file. The JP2 file conforms to the JPEG2000 Part 1 standard (ISO/IEC 15444-1:2004). The image data is losslessly compressed into the JPEG2000 codestream with selective bit precision and signedness. Both tile and packet location markers are included in the JPEG2000 codestream to assist rendering software in accessing the image data from large files as quickly as possible. A UUID Info box is also included that provides an optional data producer UUID signature in addition to a URL that references the detached science metadata PDS label file.
The JP2_to_PDS application (see the usage and main descriptions) converts a PDS/JP2 file pair - a standard JP2 file and a detached PDS metadata label file - to a PDS file with a label attached to the uncompressed image data. The image data rendered from the JP2 codestream into the output PDS file may be selected from a subarea of the source image and/or rendered at less than full resolution. This feature takes advantage of the ability of JPEG2000 codestreams to be selectively rendered by area and resolution. Because JP2 files may contain very large image data sets which, if completely decompressed, can required more than 2 GB of file storage the ability to selectively render subareas of the image is critical for users with computer systems that can not store files larger than 2 GB. Selective resolution rendering, based on discreet wavelet transforms (DWT), supports the generation of thumbnail or browser views of the image and other image zooming operations from a single source image file; no image pyramids with their additional storage requirements are used.
Both applications provide reasonable default values for their command line options whenever possible. Use the -help command line option for a list of usage details.
The PDS_JP2 library - libPDS_JP2 - includes a set of C++ classes for PDS label management and format conversion plus classes for encoding and decoding JP2 files from raw pixel data. The PDS label classes - rooted in the UA::HiRISE::PDS_Data class, a subclass of the idaeim::PVL::Aggregate class - provide for the general manipulation of the PDS label as PVL data structures, distinguishing label objects (parameter groups) that describe binary data blocks and the image data block in particular. The conversion of label information between their attached PDS image file form and their detached PDS/JP2 file form is managed by an implementation of the abstract UA::HiRISE::PDS_Converter class, which is itself a subclass of PDS_Data that contains the label structure to be converted. The base class provides support for the common label conversion operations, including the generation of the PDS/JP2 image description parameters from the PDS image description parameters required by the PDS standards. A UA::HiRISE::Generic_PDS_Converter is provided that converts the primary parameters required to maintain PDS file structure validity and image data description consistency. However, parameters specific to particular products may be left in an inconsistent state by the Generic_PDS_Converter, especially if selective area and/or resolution rendering is applied. The UA::HiRISE::HiRISE_PDS_Converter adds the adjustment of image projection parameters to provide complete label consistency for all conversions.
Additional product-specific PDS_Converter classes can be added to address the particular requirements of various PDS image data products. The Generic_PDS_Converter provides a good basic model and the HiRISE_PDS_Converter is an example of how it can be extended. New PDS_Converter classes are made known to the system by adding them to the list of known PDS_Converters. Applications automatically detect the converter that recognizes a PDS file label. The Generic_PDS_Converter is at the end of this list so as long as the basic requirement that an image description is included in the label is met a PDS_Converter will be found.
Image data conversion between uncompressed pixels in a conventional PDS image file and compressed JPEG2000 codestream in a standard JP2 file are the responsibility of the UA::HiRISE::JP2_Encoder and UA::HiRISE::JP2_Decoder classes. The JP2_Encoder class is responsible for the conversion of the source image data to its JP2 formatted JPEG2000 codestream form, plus the provision of all metadata as directed by the PDS_to_JP2 application. The JP2_Decoder class is responsible for rendering the selected portion of the JPEG2000 codestream to a raster of pixels. Selective rendering may be by an image subarea and/or at less than full resolution. These classes employ the Kakadu Software for managing the JP2 file format and its JPEG2000 codestream content. Currently, only column major band sequential organized pixel raster data is supported.
This software is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License with this software; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA.