ascii2isis
Import ascii file as a cube
This program will read an ascii file and create a cube. The ascii values
can be delimited by spaces, tabs, commas or any other character that is
not a number, a period, a plus sign or a minus sign.
Categories
History
Tracie L Sucharski | 2006-08-05 | Original version |
Brendan George | 2006-09-28 | Documentation fixes |
Brendan George | 2007-01-11 | Fixed problems with mixed separators. Added appTest. |
Steven Koechle | 2008-08-30 | Added ability to change special pixel ranges. Added example. |
Makayla Shepherd | 2015-07-15 | Fixed a problem with non-numeric characters in the file which resulted ascii2isis hanging. Fixes #2066. |
Ian Humphrey | 2017-03-16 | Added an error message when the reading fails if the file header isn't skipped. Fixes #4596. |
Parameters
Files
The file name of the input ascii file to be converted to cube.
Type | filename |
---|---|
File Mode | input |
Filter | *.txt |
The file name of the output cube.
Type | cube |
---|---|
File Mode | output |
Pixel Type | real |
Filter | *.cub |
Ascii file dimensions
Storage order of image data defines which dimension varies the
fastest and the third varying the slowest (sample, line or band).
BSQ = Band Sequential (sample, line, band)
BIL = Band Interleaved by Line (sample, band, line)
BIP = Band Interleaved by Pixel (band, sample, line)
Type | string | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Default | BSQ | ||||||||||||
Option List: |
|
This defines the number of samples in the ascii.
Type | integer |
---|
This defines the number of lines in the raw image.
Type | integer |
---|
This defines the number of bands in the raw image. If
greater than 1, the image is assumed to be in band sequential
order.
Type | integer |
---|---|
Default | 1 |
This defines the number of bytes to skip before the actual image
data is read. This would be for raw images with header data.
Type | integer |
---|---|
Default | 0 |
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 |
|
Minimum valid value. Anything below this value will be
set to LRS.
Type | double |
---|---|
Inclusions |
|
Maximum valid value. Anything above this value will be
set to HRS.
Type | double |
---|---|
Inclusions |
|
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 |
|
Minimum valid value. Anything below this value will be
set to LRS.
Type | double |
---|---|
Inclusions |
|
Maximum valid value. Anything above this value will be
set to HRS.
Type | double |
---|---|
Inclusions |
|
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 |
|
Minimum valid value. Anything below this value will be
set to LRS.
Type | double |
---|---|
Inclusions |
|
Maximum valid value. Anything above this value will be
set to HRS.
Type | double |
---|---|
Inclusions |
|
Example 1
Converting an ascii file to an Isis Cube
This example will show the conversion from a ascii file to a cube.
Command Line
Convert the image input.txt to the Isis Cube out.cub
ascii2isis
FROM=input.txt TO=out.cub
samples=10 lines=10 skip=35
GUI Screenshot
Convert the image input.txt to the Isis Cube out.cub
Convert ascii.txt to the Isis Cube out.cubThe is the GUI for ascii2isis when converting the ascii file input.txt to the Isis Cube out.cub
Data File
Links open in a new window.Ascii input file. | This is the ascii data |
---|