An official website of the United States government
Here’s how you know
Official websites use .gov A
.gov website belongs to an official government
organization in the United States.
Secure .gov websites use HTTPS A
lock
() or https:// means you’ve safely connected to
the .gov website. Share sensitive information only on official,
secure websites.
This program will import several standard image formats to an Isis cube.
The input image formats may include PNG, JPEG, JP2, TIFF, BMP, and GIF. Not all
formats are available as the program implementation depends on the Qt
library by TrollTech. This is not true of JPEG2000 files (JP2). It has
support in the ISIS library. By default, the number of bands in the output cube
will be one, three, and four when the input image is all gray, RGB,
and RGB with an alpha channel, respectively. The user can, however, specify
the color mode manually. The JP2 file can have any number of bands up to
16384. The output from a JP2 file will be a multi-spectral ISIS image file.
Added special pixel ranges and updated example images
Travis Addair
2009-12-01
Added support for RGB and ARGB imports.
Travis Addair
2009-12-03
Added AUTO option for automatically determining MODE.
Travis Addair
2009-12-04
Changed example and added two new examples.
Janet Barrett
2010-01-24
Added support for JPEG2000 files.
Kimberly Oyama
2014-01-17
Updated the default app test to make sure the history group is in the resulting cube label.
References #1894.
Parameters
Files
Use this parameter to select the filename to import.
Type
filename
File Mode
input
Filter
*.PNG *.JPG* .JPEG *.BMP *.TIF *.TIFF *.GIF *.JP2
Use this parameter to specify the name of the output cube.
Type
cube
File Mode
output
Pixel Type
real
Color Model Options
This parameter specifies the image mode for the output cube. If
GRAYSCALE, a single one-band cube will be created. If RGB, a
three-band cube is created. Finally, if ARGB is selected, then
a four-band cube will be created where the four bands correspond
to first Red, second Green, third Blue, and last Alpha.
Type
string
Default
AUTO
Option List:
Option
Brief
Description
AUTO
Automatically determine output mode
Checks to see if the image is a grayscale image, and if not,
if it has an alpha channel, and sets the output mode
accordingly.
GRAYSCALE
Grayscale mode
A single-channel image.
RGB
RGB mode
A three-channel image (red, green, and blue).
ARGB
ARGB mode
A four-channel image (red, green, blue, and alpha).
Special Pixels
If this option is used input raw pixels below minimum and
above maximum will be converted to LRS and HRS respectively. Otherwise
pixels in the input raw file will be left unchanged in most cases. For
example, importing a raw 8-bit file and outputing to a 16-bit or 32-bit real will
cause 0 and 255 to be actual values. If left as 8-bit then 0 will
be NULL and 255 will be HRS.
Type
boolean
Default
NO
Inclusions
NULLMIN
NULLMAX
Minimum valid value. Anything below this value will be
set to LRS.
Type
double
Inclusions
SETNULLRANGE
Maximum valid value. Anything above this value will be
set to HRS.
Type
double
Inclusions
SETNULLRANGE
If this option is used input raw pixels below minimum and
above maximum will be converted to LRS and HRS respectively. Otherwise
pixels in the input raw file will be left unchanged in most cases. For
example, importing a raw 8-bit file and outputing to a 16-bit or 32-bit real will
cause 0 and 255 to be actual values. If left as 8-bit then 0 will
be NULL and 255 will be HRS.
Type
boolean
Default
NO
Inclusions
HRSMIN
HRSMAX
Minimum valid value. Anything below this value will be
set to LRS.
Type
double
Inclusions
SETHRSRANGE
Maximum valid value. Anything above this value will be
set to HRS.
Type
double
Inclusions
SETHRSRANGE
If this option is used input raw pixels below minimum and
above maximum will be converted to LRS and HRS respectively. Otherwise
pixels in the input raw file will be left unchanged in most cases. For
example, importing a raw 8-bit file and outputing to a 16-bit or 32-bit real will
cause 0 and 255 to be actual values. If left as 8-bit then 0 will
be NULL and 255 will be HRS.
Type
boolean
Default
NO
Inclusions
LRSMIN
LRSMAX
Minimum valid value. Anything below this value will be
set to LRS.
Type
double
Inclusions
SETLRSRANGE
Maximum valid value. Anything above this value will be
set to HRS.
Type
double
Inclusions
SETLRSRANGE
Example 1
Converting an image to an Isis Cube in Automatic mode
This example will show the conversion from a color PNG image to a cube,
automatically determining the color mode. Here, the output image will
be a four-band ARGB cube, because the input image is both in color, and
has an alpha channel.
Command Line
Convert the PNG to an Isis Cube, with the default option of
automatically determining the color mode
std2isis from=input.png to=argb.cub
GUI Screenshot
Example GUI
Convert the image input.png to the Isis Cube argb.cub
Screenshot of the GUI for std2isis, ready to convert the image
input.png to the Isis Cube argb.cub, with mode left at its default
of AUTOMATIC.
Input Image
Input Image
Input Image
The input image, a color PNG in this example.
Output Images
Output Isis Cube with Grayscale
Output Image in Black-and-White
The four-band ARGB output image viewed in black-and-white with a
grayscale.
Output Isis Cube with RGB
Output Image in Color
The same four-band ARGB output image viewed in color with RGB
filtering (Band 1 = Red, Band 2 = Green, Band 3 = Blue). Note that
the image here appears brighter than the original, because qview has
auto-stretched the DN values, and can be adjusted back with qview's
"stretch" tool. The actual data, however, has not been changed.
Output Isis Cube with RGA
Output Image in Color with Band 4 in Blue
The same four-band ARGB output image viewed in color with RGB
filtering as in the previous image, but here Band 4 (the alpha
channel) is viewed through the Blue filter.
Example 2
Converting an image to an Isis Cube in Grayscale mode
This example will show the conversion from a color PNG image to a cube,
with the color mode set to GRAYSCALE, meaning that the output image will
be a single-band black-and-white cube.
Command Line
Convert the image input.png to the Isis Cube gray.cub. In order to
get a single-band black-and-white image, we set the mode equal to
GRAYSCALE.
Convert the image input.png to the Isis Cube gray.cub
Screenshot of the GUI for std2isis, ready to convert the image
input.png to the Isis Cube gray.cub with mode set to GRAYSCALE.
Input Image
Input Image
Input Image
The input image, in this example, the same color PNG from the
previous example.
Output Image
Output Isis Cube
Output Image
The is the output Isis Cube peaks.cub generated from this example.
Example 3
Converting an image to an Isis Cube in RGB mode
This example will show the conversion from a color PNG image to a cube,
with the color mode set to RGB, meaning that the output image will
be a three-band color cube.
Command Line
Convert the image input.png to the Isis Cube rgb.cub. In order to
get a three-band color image, we set the mode equal to
RGB.
std2isis from=input.png to=rgb.cub mode=rgb
GUI Screenshot
Example GUI
Convert the image input.png to the Isis Cube rgb.cub
Screenshot of the GUI for std2isis, ready to convert the image
input.png to the Isis Cube rgb.cub with mode set to RGB.
Input Image
Input Image
Input Image
The input image, in this example, the same color PNG from the
first example.
Output Images
Output Isis Cube with Grayscale
Output Image in Black-and-White
The three-band RGB output image viewed in black-and-white with a
grayscale.
Output Isis Cube with RGB
Output Image in Color
The same three-band RGB output image viewed in color with RGB
filtering (Band 1 = Red, Band 2 = Green, Band 3 = Blue). Once
again, the output image appears to be brighter than the original due
to qview's auto-stretching, but can be adjusted in qview with the
"stretch" tool.