PDS_VERSION_ID = PDS3 RECORD_TYPE = STREAM OBJECT = TEXT PUBLICATION_DATE = 2013-05-20 NOTE = "Description of the SOFTWARE directory contents as well as the software provided for the MSL Mastcam, MAHLI, and MARDI data products for the PDS Archive" END_OBJECT = TEXT END 1. Introduction This directory contains the PDS software distribution for data products from the Mastcam, MAHLI, and MARDI (MMM) instruments on the MSL rover. Initial implementation by Michael Caplinger, Malin Space Science Systems 2. Software Description 2.1 Summary The code included provides extraction and decompression capabilities for all 21 MMM EDR instrument data products. Extraction consists of decoding the MMM mini-header contained in the first 64 bytes of a DAT file. The remaining data may be un-compressed, compressed via JPEG, or compressed via first difference Huffman encoding. For images that are Huffman compressed, pixels are re-assembled in sensor pixel order preserving the Bayer pattern. 2.2 JPEG decompressor The provided JPEG library is an implementation of JPEG compression specified by the Joint Photographics Experts Group in ITU-T recommendation T.81. This library was implemented by the Independent JPEG Group as release 6b of 27-Mar-1998. The provided example image files have been removed. 2.3 Huffman table The Huffman code table in HUFFMAN_TABLE.TXT is included here only for reference. dat2img performs Huffman decompression internally. 2.4 Compilation Compilation of the supplied software produces a single executable named dat2img. This build example is for a UNIX shell command line. It requires the gcc compiler (not provided) from version 4.1 of the Gnu Compiler Collection. cd jpeg-6b ./configure make clean make cd .. gcc dat2img.c pdecom_msl.c -o dat2img -I jpeg-6b -Ljpeg-6b -ljpeg Note: If your OS suppports it, after unzipping MMM_DAT2IMG.ZIP, sourcing build_all should build dat2img automatically. source build_all The "source build_all" and resulting dat2img binaries have been tested on Red Hat Enterprise Linux release 5 and Apple OS X 10.7. 2.5 Running With a MMM DAT file product as input, dat2img produces a valid PDS IMG with an optional detached label. Usage: dat2img [-d ] input.DAT [output_dir] Use -d option for detached label file (default is attached label) Default output file is input_nn.IMG in the current directory Example: ./dat2img -d 0000MD9999000032E1_XXXX.DAT out_dir out_dir/0000MD9999000032E1_XXXX_00.LBL out_dir/0000MD9999000032E1_XXXX_00.IMG 3. Software Directory Structure File Description ------------------- --------------------------------- SOFTINFO.TXT this file HUFFMAN_TABLE.TXT Huffman code table for losslessly compressed images < document directory > MMM_DAT2IMG.TXT in , build and usage instructions < source directory > MMM_DAT2IMG.ZIP in , standard zip file of source and example binaries MMM_DAT2IMG.LBL in , the label for MMM_DAT2IMG.ZIP < Mac OS binary directory > DAT2IMG in , executable DAT2IMG.LBL in , the label for DAT2IMG < Red Hat 5 Linux binary directory > DAT2IMG in , executable DAT2IMG.LBL in , the label for DAT2IMG Contents of MMM_DAT2IMG.ZIP: File Description ------------------- --------------------------------- README quick build guide build_all script to build dat2img dat2img.c C source code pdecom_msl.c C source code < directory containing the JPEG library source code > Makefile in , JPEG library code, files, scripts README ansi2knr.1 ansi2knr.c cderror.h cdjpeg.c cdjpeg.h change.log cjpeg.1 cjpeg.c ckconfig.c coderules.doc config.guess config.sub configure djpeg.1 djpeg.c example.c filelist.doc install-sh install.doc jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c jchuff.h jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jconfig.bcc jconfig.cfg jconfig.dj jconfig.doc jconfig.h jconfig.mac jconfig.manx jconfig.mc6 jconfig.sas jconfig.st jconfig.vc jconfig.vms jconfig.wat jcparam.c jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jdct.h jddctmgr.c jdhuff.c jdhuff.h jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c jdpostct.c jdsample.c jdtrans.c jerror.c jerror.h jfdctflt.c jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jinclude.h jmemansi.c jmemdos.c jmemdosa.asm jmemmac.c jmemmgr.c jmemname.c jmemnobs.c jmemsys.h jmorecfg.h jpegint.h jpeglib.h jpegtran.1 jpegtran.c jquant1.c jquant2.c jutils.c jversion.h libjpeg.doc ltconfig ltmain.sh makcjpeg.st makdjpeg.st makeapps.ds makefile.ansi makefile.bcc makefile.cfg makefile.dj makefile.manx makefile.mc6 makefile.mms makefile.sas makefile.unix makefile.vc makefile.vms makefile.wat makelib.ds makeproj.mac makljpeg.st maktjpeg.st makvms.opt rdbmp.c rdcolmap.c rdgif.c rdjpgcom.1 rdjpgcom.c rdppm.c rdrle.c rdswitch.c rdtarga.c structure.doc transupp.c transupp.h usage.doc wizard.doc wrbmp.c wrgif.c wrjpgcom.1 wrjpgcom.c wrppm.c wrrle.c wrtarga.c 4. Software License Information and Disclaimers 4.1 Malin Space Science Systems The software accompanying this notice (the "Software") is provided to the user to facilitate the use of the data collected by the Mars Science Laboratory MAHLI/MARDI/Mastcam (the "MMM Data"). Malin Space Science Systems ("MSSS") grants the user (either as an individual or entity) a personal, non-transferable, and non-exclusive right (i) to use and reproduce the Software solely for the purpose of accessing the MMM Data; (ii) to modify the source code of the Software as necessary to maintain or adapt the Software to run on alternate computer platforms; and (iii) to compile, use and reproduce the modified versions of the Software solely for the purpose of accessing the MMM Data. The user may not redistribute the Software or any modifications thereof, for any purpose. The user acknowledges that no title to the intellectual property in the Software is transferred to the user. The user further acknowledges that title and full ownership rights to the Software will remain the exclusive property of MSSS or its suppliers, and the user will not acquire any rights to the Software except as expressly set forth above. The Software is provided to the user AS IS. MSSS MAKES NO WARRANTY, EXPRESS OR IMPLIED, WITH RESPECT TO THE SOFTWARE, AND SPECIFICALLY DISCLAIMS THE IMPLIED WARRANTIES OF NON-INFRINGEMENT OF THIRD PARTY RIGHTS, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO SUCH LIMITATIONS OR EXCLUSIONS MAY NOT APPLY TO THE USER. The user's use or reproduction of the Software constitutes the user's agreement to the terms of this Notice. If the user does not agree with the terms of this notice, promptly return or destroy all copies of the Software in the user's possession. Copyright (C) 2013 Malin Space Science Systems. All Rights Reserved. For further restrictions on distribution, see the archive volume SIS. 4.2 JPEG Refer to the README in the jpeg-6b for a full description. The following is an excerpt from that file. This distribution contains the sixth public release of the Independent JPEG Group's free JPEG software. This software is the work of Tom Lane, Philip Gladstone, Jim Boucher, Lee Crocker, Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi, Guido Vollbeding, Ge' Weijers, and other members of the Independent JPEG Group.