This document describes how to operate the Transform Tool. The following topics can be found in this document:
Note: The command-line examples in this section have been broken into multiple lines for readability. The commands should be reassembled into a single line prior to execution.
The Transform Tool can be executed in various ways. This section describes how to run the tool, as well as its behaviors and caveats.
The following table describes the command-line options available:
Command-Line Option | Description |
---|---|
-t, --target | Explicitly specify a PDS3 or PDS4 product label that contains a reference to an image file to transform. The target can be specified implicitly as well. (example: transform array2DImage.xml) |
-o, --output | Specify an output file where the transformed image will reside. This is a required flag option. |
-f, --format-type | Specify a format type to use for the transformation. The valid values are: raw, jpeg, tif, WBMP, PNM, JPG, wbmp, JPEG, PNG, jpeg 2000, tiff, BMP, JPEG2000, RAW, jpeg2000, GIF, TIF, TIFF, bmp, jpg, pnm, png, gif, JPEG 2000 |
-V, --version | Display the release number and copyright information. |
-h, --help | Display tool usage. |
The Transform Tool requires the passing in of a PDS3 or PDS4 product label that contains a reference to an image file. In addition, the tool assumes that the referenced image file is co-located with the product label. Under the current implementation, if there are multiple image files referenced in a target label, the tool will default to only transforming the first image file reference. Other notable caveats with this initial version of the tool include:
This section demonstrates some of the ways that the tool can be executed using the command-line option flags:
The files used in the command-line examples below are packaged with the tool in the examples directory.
Transform a Single PDS4 Array 2D Image
The following command demonstrates transforming a PDS4 array 2D image referenced in the associated product label, i943630r.xml, into a jpeg image file named i943630r.jpg:
% transform ../examples/i943630r.xml -o i943630r.jpg -f jpg
Under the current implementation, for PDS4 data products, the tool only supports the transformation of array 2D images.
Transform a Single PDS4 Label To Parameter Value Language (PVL) File
The following command demonstrates transforming a PDS4 label, i943630r.xml, to a PVL file, i943630r.pvl:
% transform ../examples/i943630r.xml -o i943630r.pvl -f pvl
Transform a Single 8-Bit PDS3 Image
The following command demonstrates transforming a PDS3, 8-bit image referenced in the associated attached label, FHA01118.LBL, into a bitmap image file named FHA01118.BMP:
% transform ../examples/FHA01118.LBL -o FHA01118.BMP -f bmp
The following command demonstrates transforming a PDS3, 8-bit image referenced in the associated detached label, FF01.LBL, into a portable network graphics file named FF01.PNG:
% transform ../examples/FF01.LBL -o FF01.PNG -f PNG