import

From DavinciWiki

Jump to: navigation, search


Description

Load data from a file

Arguments and Return Values

Arguments: A string containing the path of file to be loaded

Return Value: The appropriate data array

Usage

Syntax: import(filename = STRING [, record = INT] [, xlow = INT] [, xhigh = INT] [, xskip = INT] [, ylow = INT] [, yhigh = INT] [, yskip = INT] [, zlow = INT] [, zhigh = INT] [, zskip = INT]))

The import() function loads the specified data file. The import() function can automatically recognize and load the following file formats:

  • SpecPR_FS2
  • VICAR
  • PDS/ISIS Qube and Image
  • PBMPlus: PBM, PGM and PPM formats
  • USGS GRD
  • Imath
  • GOES weather satellite
  • AVIRIS
  • GIF, JPEG, TIFF, PNG, BMP
  • HDF5

If the specified path is not absolute (ie: it doesn't start with a '/'), and the specified file cannot be found in the current directory, the DATAPATH variable is used as a list of directories to additionally search. The specified path is appended to each directory listed in the DATAPATH variable.

If the variable VERBOSE is set to a value greater than zero, details of the file loading process are printed to stderr. Higher values (up to 3)produce more output.

The record value is required for SpecPR files. If it is given with another file type, it is used as the high and low value for a Z axis subset, causing a single image to be extracted from cubes.

The values low, high and skip can be specified for each axis (ie: xlow, zhigh, etc) to specify a precise subset to be read. All the subsetting arguments are optional.

Reading a PPM image produces a 3-plane, BIP cube of byte values. Each plane represents the red, green and blue values respectivly.

The functions load() and import() are aliases for the read() function.

Examples

dv> a=import("/work/knowicki/I01002002.project.00082523.QUB")
..........1356x7100x10 array of float, bsq format [385,104,000 bytes]

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left

Related Functions

Modified On: 03-27-2006

Personal tools