Home

User Documentation

Getting Started
Learn More
Explore in Detail
Get Inspired

Contributor Documentation

Getting Started
Learn More
Explore in Detail
Get Inspired

Quick Links

Software Manual
AstroDiscuss
GitHub
API Reference

Documentation Versions


ISIS 2

Documentation
Tutorials
Technical Documents
USGS

ISIS Application Documentation


isis2std

Standard View | TOC | Home

Exports a cube to PNG, BMP, TIFF, JPEG, or JPEG 2000

Description
Categories
Groups
Examples
History


Description

This program exports an ISIS cube to one of several popular standard image formats. The current supported formats are BMP, JPEG, JP2, PNG, and TIFF.

This program uses TrollTech's version of the Qt Library to export BMP and JPEG formatted output images. For these format types, due to limitations of Qt, the input file size must not exceed 2 gigabytes and the only valid output bit type is 8-bit.

The JPEG2000 (JP2) and TIFF formats do not depend on the Qt library. These formats do not have the 2 GB limitation for input files and the output bit type may be 8-bit, U16-bit or S16-bit. For these formats, the writing routines output are streamed lines from the cube, and little of the image is held in memory at any one time, therefore increasing the processing speed to convert the file. It is recommended that large images are exported to JP2 or TIFF format. For some output image types, users may specify a value for the level of compression represented as a percentage using the QUALITY parameter. The default is no compression (i.e. QUALITY = 100%). For the TIFF format a compression algorithm can be selected.

Each of the input cube parameters (FROM, ALPHA, RED, GREEN, and BLUE) requires a single band from an ISIS cube. If a cube contains multiple bands, the user must specify a single band of the input image. To do this, the user must append a plus sign and the band number to be used to the input file name. For example, inputFile.cub+4 indicates that the 4th band in the cube will be used. No band needs to be specified if the cube only has a single band.

In addition, if the cube has Mapping labels, the program will produce a world file for use in Arc and/or other GIS packages. The file will have an extension that uses the first and last letters for the image extension and a "w". For example, .tif produces a world file extension of .tfw.

To ensure acceptable contrast in the output file, the user may select from three stretch options: linear, piecewise-linear, or manual.

Special pixels such as Low Saturation values and Nulls are set to black and High Saturation values are set to white. See the BITTYPE parameter documentation for more information about which output pixel values are assigned for particular input DNs of the various bit types.


Categories


Related Applications to Previous Versions of ISIS

This program replaces the following applications existing in previous versions of ISIS:

Related Objects and Documents

Applications


Parameter Groups

Files

Name Description
FROM Input cube to export
ALPHA Input cube to export as the alpha channel
RED Input cube to export as the red channel
GREEN Input cube to export as the green channel
BLUE Input cube to export as the blue channel
TO Output file
MODEImage mode

Output Settings

Name Description
FORMATFormat of output image
QUALITYSpecify output image quality
BITTYPEBit type of output file
COMPRESSIONThe compression algorithm for TIFF format

Stretch Options

Name Description
STRETCHType of stretch
MINIMUMMinimum pixel value
MAXIMUMMaximum pixel value
AMINMinimum pixel value for the alpha channel
AMAXMaximum pixel value for the alpha channel
RMINMinimum pixel value for the red channel
RMAXMaximum pixel value for the red channel
GMINMinimum pixel value for the green channel
GMAXMaximum pixel value for the green channel
BMINMinimum pixel value for the blue channel
BMAXMaximum pixel value for the blue channel
MINPERCENTMinimum Percent
MAXPERCENTMaximum Percent

Files: FROM

Description

Use this parameter to select the filename and band to export. For example, file.cub+5 will select band 5.

Type cube
File Mode input
Filter *.cub

Files: ALPHA

Description

Use this parameter to select the filename and band to export. For example, file.cub+5 will select band 5.

Type cube
File Mode input
Filter *.cub

Files: RED

Description

Use this parameter to select the filename and band to export. For example, file.cub+5 will select band 5.

Type cube
File Mode input
Filter *.cub

Files: GREEN

Description

Use this parameter to select the filename and band to export. For example, file.cub+5 will select band 5.

Type cube
File Mode input
Filter *.cub

Files: BLUE

Description

Use this parameter to select the filename and band to export. For example, file.cub+5 will select band 5.

Type cube
File Mode input
Filter *.cub

Files: TO

Description

Use this parameter to specify the name of the output file.

Type filename
File Mode output

Files: MODE

Description

This parameter specifies the image mode. If GRAYSCALE, a single one-band cube is used. If RGB, three one-band cubes are used. If ARGB, four one-band cubes are used.

Type string
Default GRAYSCALE
Option List:
Option Brief Description
GRAYSCALE Output has one channel (gray scaled). If this option is chosen, the output image will have a single channel and the user will be required to specify the parameter FROM.

Exclusions

  • ALPHA
  • RED
  • GREEN
  • BLUE
  • AMIN
  • AMAX
  • RMIN
  • RMAX
  • GMIN
  • GMAX
  • BMIN
  • BMAX
RGB Output has three channels (red, green, and blue). If this option is chosen, the output image will have three channels and the user will be required to specify the parameters RED, GREEN, and BLUE.

Exclusions

  • FROM
  • ALPHA
  • MINIMUM
  • MAXIMUM
  • AMIN
  • AMAX
ARGB Output has four channels (alpha, red, green, and blue). If this option is chosen, the output image will have four channels and the user will be required to specify the parameters ALPHA, RED, GREEN, and BLUE.

Exclusions

  • FROM
  • MINIMUM
  • MAXIMUM

Output Settings: FORMAT

Description

This parameter is used to select the output format. It can be one of PNG, BMP, JPEG, TIF, or JP2. Note that not all formats may be available. It will depend on your installation of the Qt libraries.

In addition, if the cube has Mapping labels, the program will produce a world file for use in Arc and/or other GIS packages. The file will have an extension that uses the first and last letters for the image extension and a "w". For example, .tif produces a world file extension of .tfw.

Type string
Default PNG
Option List:
Option Brief Description
PNGOutput image will be PNG The output image is in PNG (Portable Network Graphics) format. The default extension for this format is "png."

Exclusions

  • BITTYPE
  • COMPRESSION
BMPOutput image will be BMP The output image is in BMP (Bit Mapped Graphics) format. The default extension for this format is "bmp."

Exclusions

  • BITTYPE
  • COMPRESSION
TIFFOutput image will be TIFF The output image is in TIFF (Tagged Image Files Format) format. The default extension for this format is "tif."
JPEGOutput image will be JPEG The output image is in JPEG (Joint Photographic Experts Group) format. The default extension for this format is "jpg."

Exclusions

  • BITTYPE
  • COMPRESSION
JP2Output image will be JPEG2000 The output image is in JPEG2000 (Joint Photographic Experts Group 2000) format. The default extension for this format is "jp2."

Exclusions

  • QUALITY
  • COMPRESSION

Output Settings: QUALITY

Description

This parameter allows the user to specify level of quality (compression) for the output image. Some output image types may not utilize this parameter. The range is from 100 (no compression and highest quality) to 0 (highest compression and reduced quality). A value of -1 can be given to use the default settings.

Type integer
Default 100
Minimum -1 (inclusive)
Maximum 100 (inclusive)

Output Settings: BITTYPE

Description

This parameter allows the userPackBits is also known as Macintosh RLE. to set the bit type of the output image. Some FORMAT values will only allow 8-bit outputs. 16 bit signed (-32767=black, 32768=white)

Type string
Default 8BIT
Option List:
Option Brief Description
8BITOutput is 8 bit unsigned integer data Pixels values are within 8-bit unsigned integer data range from 0 to 255.
U16BIT Output is 16 bit unsigned integer data Pixel values are within the 16-bit unsigned integer data range from 0 to 65535. This option is not available for some output formats.
S16BIT Output is 16 bit signed integer data Pixel values are in 16-bit signed integer data range -32768 to 32767. This option is not available for some output formats.

Output Settings: COMPRESSION

Description

The compression algorithm used to compress an output TIFF format image. Only used if the format is set to TIFF. The default is no compression. PACKBITS is the most widely supported compression algorithm for the TIFF format.

Type string
Default NONE
Option List:
Option Brief Description
NONEUse no compression Use no compression on the output TIFF image.
PACKBITSUse PackBits compression Use PackBits compression on the output TIFF format image. PackBits is also known as Macintosh RLE. This compression algorithm should be supported by all TIFF readers that conform to the Baseline TIFF specification.
LZWUse LZW compression Use Lempel-Ziv-Welch(LZW) compression on the output TIFF format image.
DEFLATEUse Deflate compression Use Deflate compression on the output TIFF format image. Note: This uses the official version of Deflate for TIFF images described in the TIFF Specification Supplement 2. Other versions of deflate for TIFF images are considered obsolete.

Stretch Options: STRETCH

Description

This parameter is used to select one of three ways to stretch (or map) output pixels. The are LINEAR, PIECEWISE, or MANUAL.

Type string
Default LINEAR
Option List:
Option Brief Description
LINEAR Linear stretch A minimum and maximum are automatically computed based on the statistics of the selected band. A histogram of the band is used to pick the minimum at 0.5% of the data and the maximum at 99.5% of the data. Input pixels less than or equal to the minimum are stretched to black while pixels greater than or equal to the maximum are stretched to white. A linear mapping occurs between the minimum and maximum.

Exclusions

  • MINIMUM
  • MAXIMUM
  • AMIN
  • AMAX
  • RMIN
  • RMAX
  • GMIN
  • GMAX
  • BMIN
  • BMAX
PIECEWISE Piecewise-linear stretch This option is similar to the LINEAR option. A minimum and maximum are automatically computed. Additionally, the median is computed and it is mapped to the middle gray value (halfway between white and black). Therefore, it is a piecewise-linear stretch with input pixels mapped linearly between either 1) the minimum/median or 2) the median/maximum. This option is useful for contrast stretching cubes with skewed histograms to ensure a balanced contrast.

Exclusions

  • MINIMUM
  • MAXIMUM
  • AMIN
  • AMAX
  • RMIN
  • RMAX
  • GMIN
  • GMAX
  • BMIN
  • BMAX
MANUAL Manual stretch This option allows you to pick your own stretch. You must enter a value for MINIMUM and MAXIMUM

Exclusions

  • MINPERCENT
  • MAXPERCENT

Stretch Options: MINIMUM

Description

The minimum input pixel value which will be mapped to black.

Type double
Less Than
  • MAXIMUM

Stretch Options: MAXIMUM

Description

The maximum input pixel value which will be mapped to white.

Type double
Greater Than
  • MINIMUM

Stretch Options: AMIN

Description

The minimum input pixel value which will be mapped to black.

Type double
Less Than
  • AMAX

Stretch Options: AMAX

Description

The maximum input pixel value which will be mapped to white.

Type double
Greater Than
  • AMIN

Stretch Options: RMIN

Description

The minimum input pixel value which will be mapped to black.

Type double
Less Than
  • RMAX

Stretch Options: RMAX

Description

The maximum input pixel value which will be mapped to white.

Type double
Greater Than
  • RMIN

Stretch Options: GMIN

Description

The minimum input pixel value which will be mapped to black.

Type double
Less Than
  • GMAX

Stretch Options: GMAX

Description

The maximum input pixel value which will be mapped to white.

Type double
Greater Than
  • GMIN

Stretch Options: BMIN

Description

The minimum input pixel value which will be mapped to black.

Type double
Less Than
  • BMAX

Stretch Options: BMAX

Description

The maximum input pixel value which will be mapped to white.

Type double
Greater Than
  • BMIN

Stretch Options: MINPERCENT

Description

The percentage of data in the histogram used to compute the minimum pixel value in the stretch.

Type double
Default 0.5
Less Than
  • MAXPERCENT

Stretch Options: MAXPERCENT

Description

The percentage of data in the histogram used to compute the maximum pixel value in the stretch.

Type double
Default 99.5
Greater Than
  • MINPERCENT

Examples


Example 1

Example of red/green/blue output of isis2std program.

Description

This example creates an output TIFF format file from 3 bands of an ISIS cube, designated red, green, and blue using a linear stretch and 8-bit output type. A histogram is created from the input values. Using this histogram, we determine the minimum value to be any DN in the bottom 0.2% of the data. These DNs will be set to black in the output. Similarly, the maximum value is any DN in the top 99.8% of the data and these DNs will be set to white.

Command Line

isis2std red=rgb.cub+1 green=rgb.cub+2 blue=rgb.cub+3 to=rgb.tif mode=rgb format=tiff bittype=8bit stretch=linear minpercent=0.2 maxpercent=99.8
Command line for this example.

GUI Screenshot

isis2std with RGB input and 8-bit output

GUI for this example.

This image show the graphical user interface for this program.

Input Images

The first band of the input cube, shown in red.

Red band.

Parameter Name: RED

The input cube band to be exported as the red channel in the output image.

The first band of the input cube, shown in green.

Green band.

Parameter Name: GREEN

The input cube band to be exported as the green channel in the output image.

The first band of the input cube, shown in blue

Blue band.

Parameter Name: BLUE

The input cube band to be exported as the blue channel in the output image.

Data File

Output world text file. The output text world file for this image.

Output Image

The color output image.

Output image.

Parameter Name: TO

The 8-bit output image, in TIFF format, created using the input red, green, and blue channels.


History

Jeff Anderson2005-06-15 Original version
Drew Davidson2005-06-27 Added application test
Jacob Danton2006-02-06 Added two new modes (rgb and argb) and updated the appTest.
Elizabeth Miller2006-05-08 Added MIN and MAX percent options
Jacob Danton2006-05-22 Added seperate MINIMUM and MAXIMUM parameters for all channels.
Brendan George2007-05-03 Modified to use Filename class, and added appropriate appTest
Steven Lambright2007-07-10 Modified to give an error if write fails. Memory leak fixed.
Jeff Anderson2007-08-20 Modified so that ISIS Null pixels are written as zeros in the output cube and low data in the input is written as a one
Steven Koechle2007-08-22 Added a check to see that raw image data will be less than 4GB. Throw exception if it is too big.
Steven Lambright2008-05-12 Removed references to CubeInfo
Kris Becker2008-10-17 Added QUALITY parameter to set compression levels
Christopher Austin2008-11-04 Fixed checkDataSize() since Qimage has a maximum size of 2 GB, not 4GB. Added some QT error catching.
Steven Koechle2009-02-20 Documentation Change
Janet Barrett2010-01-27 Added support for JPEG2000 files.
Stuart Sides and Steven Lambright2012-04-03 Added minimum and maximum input stretch values and output file name to the output log. fixes #761
Travis Addair2012-04-03 Added support for exporting cubes greater than 2GB to TIFFs.
Steven Lambright2012-08-28 Fixed some problems with the big tiff exports that caused corrupt outputs. The 2GB limitation should be removed completely now. References #579.
Jeannie Backer2013-06-05 Fixed bug where alpha channel was not being utilized for ARGB option. Fixed bug that mapped Nulls as the min value for TIFF and JP2 formats. Changed ImageExporter calls to new method names, where needed. Added test for ARGB parameter. Added xml example. Added appTests to improve coverage for isis2std program and the ImageExporter and its derived classes. Fixes #1380.
Jeffrey Covington2015-02-12 Changed default compression of TIFF format images to no compression. Added COMPRESSION parameter to choose the compression algorithm for TIFF format images. Fixes #1745
Kaitlyn Lee2018-02-08 Removed the option to export as a GIF because Qt does not support GIF exports. Fixes #1667.