USGS

ISIS 2 Documentation


Isis Accessing an ISIS Cube from an IDL Program

----

The READISIS, READBACKPLANE, READRAWISIS, and WRITEISIS routines provide a simplified way to access an ISIS cube from an IDL program.

In addition, we have created an example IDL program that illustrates how to access an ISIS cube file from IDL. This includes reading label keyword values, reading the core of the cube (both with and without application of CORE_BASE/CORE_MULTIPLIER), and reading a backplane into a LONG array (which would be the appropriate data type for a Region of Interest (ROI) backplane created with "cv"). The example program is located in:

        $ISISIDL/example.pro

There are a number of additional ISIS routines that can be called from IDL using CALL_EXTERNAL. The source files for these routines (which include documentation for the caller) are contained in $ISIS/idl/externals. Many of these are simply interfaces that call the corresponding ISIS C or Fortran routine, but there are some that do more complicated things.

Note the following concerning the example program:

  1. The isislib string variable contains the name and location of the isis2idl.so file that contains the compiled library of the CALL_EXTERNAL routines.
  2. Normally the location of isis2idl.so is obtained from the ISISIDLLIB environment variable, which is set to /usgs/isisr/exe by the standard ISIS user initialization. (This location might be different on a different ISIS installation.)
  3. When you supply the name of a variable in a CALL_EXTERNAL call, the variable must already exist - it will not be created if it is to receive a value.
  4. All integer variables in CALL_EXTERNAL calls must be LONGs.
  5. Strings (and string arrays) are passed to CALL_EXTERNAL as IDL byte arrays rather than as IDL strings. The STRING function can be used to convert a returned byte array to an IDL string.

----
Documentation | Tutorials | Technical Documents | Isis Support Center (URL: http://isis.astrogeology.usgs.gov/IsisSupport/) | Home

Last updated: Mar 6 2012