reply to post by ArMaP
No, grayscale I can do anytime.
The Image progression is (as I see it and understand it);
.DAT - As acquired binary (with the .LBL twin)
Then,
.IMG - First Generation From Translated Binary (with the .LBL twin)
Then,
Take your pick ... TIF/JPEG/GIF/PNG
Yes?
-------------------------------------
I would love to work with a freshly opened ".DAT" file, but I am stuck there. The program that you authored opens the ".IMG", but the colorizing
is apparently degrading/artifacting the detail. It would be good to work with the uncolorized 1st generation ".IMG", as opened.
Am I correct in assuming that the ".DAT" is not able to be opened as the "Generation Zero" source image???
Thank you ArMaP. Also, I thought the below might be of interest to you.
==============================================================================
This is the documentation for DAT2IMG.ZIP from the PDS source site...
Of course, I'm Windows 8, not supported
==============================================================================
PDS_VERSION_ID = PDS3
RECORD_TYPE = STREAM
OBJECT = TEXT
PUBLICATION_DATE = 2013-05-20
NOTE = "Instructions on how to build and
run dat2img, the software provided to
decompress the MSSS EDR data products
in this PDS Archive."
END_OBJECT = TEXT
END
1. Overview
The software provided to the PDS by MSSS for processing the MMM data is
available to the community from the PDS in executable form for the
following computer operating systems: Apple Macintosh OSX 10.7 and
LINUX RedHat 5. It is PDS's responsibility to maintain the software
and to upgrade it to other operating systems.
The distribution includes a single tool for reading, extracting, and
decompressing MMM EDR products into an image .IMG viewable by NASAView.
The tool, "dat2img" only works on XXXX.DAT files created by
MMM instruments. As mentioned in the Mast Camera (Mastcam),
Mars Hand Lens Imager (MAHLI), and Mars Descent Imager (MARDI)
Experiment Data Record (EDR) and Reduced Data Record (RDR)
PDS Data Products Software Interface Specification,
a MMM PDS EDR product consists of a detached label (.LBL) and a .DAT
file.
1. 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. Running
The software
1. extracts the data contained in the mini-header
2. decompresses the image data (if compressed)
3. creates an image (IMG) formatted file
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
Images are single band 8 bit, 3 band 8 bit RGB, or single band 16 bit
images depending on the EDR contents. The labels for sequential GOP
images are identical except for name.
Note: video GOP products output 1 to 16 individual .IMG files with
paired detached label (.LBL) files. For GOP video products the output
is
filename_00.LBL
filename_00.IMG
filename_01.LBL
filename_02.IMG
…
filename_15.LBL
filename_15.IMG
==============================================================================