Importing Data into the IDL Workbench

The Visualize Perspective gives you an easy way to quickly visualize data. The basic workflow involves opening data, then dragging variables onto a Tool Palette tool or action. There are many ways to use these tools, so feel free to be creative and experiment.

This section describes ways to bring your data into the IDL Workbench so you can use the Tool Palette.

Importing Data Using File →  Open File

Use File →  Open File from the IDL Workbench menu to open files. See Types of Data You Can Import Using iOpen.

Importing Data Using the iOpen Procedure

A procedure called iOpen allows the tools and actions in the Tool Palette to access many different file types directly from the workbench. You can also use IOPEN at the command line to create variables in the current IDL session. When you use IOPEN through the tools or from the command line, IDL creates the variables using its own naming convention. The data variables appear in the IDL Variables View. See IOPEN for more information.

Types of Data You Can Import Using iOpen

The following table describes the data types that you can open and use in the Tool Palette. The functionality in IDL that opens these files is the iOpen procedure.

The iOpen procedure recognizes the following file types, but you can expand its capabilities by writing a file reader for other data types. See Adding Custom File Readers for more information.

Table 17-1: Available Data Types

File Type
IDL Handling of File Type

.bmp

Image file—IDL displays this type in an iImage window.

.csv

Comma-separated value text file—IDL makes data variables available in the Variables view.

.dcm

Image file—IDL displays this type in an iTool.

.gif

Image file—IDL displays this type in an iTool.

.h5

Hierarchical Data Format—IDL makes data variables available in the Variables view.

.isv

Saved iTool visualization file—IDL displays the data in the appropriate iTool.

.j2k, .jp2, .jpx

JPEG 2000 image—IDL uses the READ_JPEG2000 procedure to read a .jp2, .jpx, or .j2k file and display the image data in an iTool.

.jpg, .jpeg

Image file—IDL displays this type in an iTool.

.pct, .pict

Image file—IDL displays this type in an iTool.

.png

Image file—IDL displays this type in an iTool.

.shp

Shape file—IDL makes data variables available in the Variables view.

.tif, .tiff

Image file—IDL displays this type in an iTool.

.txt

Text file—IDL opens the ASCII Template dialog, and then makes data variables available in the Variables view.

.wav

Sound file—IDL makes data variables available in the Variables view.

Use Variables Created by IDL Programs in the Tool Palette

The Visualize Perspective can use any variables that are available in the current IDL session, including those from a running IDL program and variables you enter at the command line.

Use Variables from a Running IDL Program

When you compile and run an IDL program, the variables from that program display in the Variables View. You can drag the variables to the appropriate Tool Palette tool or action.

Define Variables on the Command Line

Use the command line to define variables. The variables appear in the Variables View, where you can drag them to the appropriate Tool Palette tool or action.

For more information, see the Surface and Contour Example.

Use IDL's File Input/Output Routines

Use IDL procedures such as OPEN and READ to open data files not supported by default and create variables manually. See Files and Input/Output and OPENR/OPENU/OPENW.