|
Getting Started with IDL: Surfaces and Contours |
|
For this example we will use the binary dataset of the Maroon Bells Mountains. We will use the BINARY_TEMPLATE and READ_BINARY functions to read this data set. Once you have read the file into IDL, you are ready to move on to visualizing the data set three-dimensionally.
To import binary data directly into IDL, use the BINARY_TEMPLATE function in conjunction with the READ_BINARY function. To import a binary data file into IDL, you must first describe the format of the data using the Binary Template.
The binary file that we will read in the following example is stored as an integer array and contains an image of the Maroon Bells mountains, a group of mountains located among the Rocky Mountains of Colorado.
MARBELLSTEMPLATE=BINARY_TEMPLATE(FILEPATH('surface.dat', $
SUBDIR = ['examples', 'data']))
The binary template dialog box appears.
MARBELLS_BINARY=READ_BINARY (FILEPATH('surface.dat', $
SUBDIR=['examples', 'data']),TEMPLATE=MARBELLSTEMPLATE)
IDL Online Help (March 06, 2007)