Displaying Images

The iImage tool's primary design is to visualize image data, though the tool is capable of much more once the data is displayed. The iImage tool also allows you to manipulate and edit the displays. The first task is to display the image data.

Your options for invoking the iImage tool are:

For more information on accepted arguments and keywords, see "IIMAGE" (IDL Reference Guide).

To visualize image data from the IDL Workbench:

  1. Image data of any supported type can also be directly visualized into the iImage tool using File → Open File or the File Open icon openfcf.gif at the top left of the IDL Workbench. Select either one and the Open File dialog appears.
  2. In the Files of Type field of the Open File dialog, select iOpen Files. The file types accepted by iOpen now display.
  3. Select the desired image file from your directory structure. For example here we will visualize an examples/data file named afrpolitsm.png. Select the file name and click Open. The image opens in an iImage window.
  4. Note
    The image file name now also appears as a variable in the Variables View in the Workbench. Even when the iImage window is closed, the variable is available for use. To visualize it again, simply drag and drop the variable onto the Image icon in the Visualization Palette.

To visualize image data in the iImage tool:

  1. Image data of any supported type can also be directly visualized into the iImage tool from an iImage window. To open an iImage window, enter IIMAGE at the IDL command line. Select File → Open or the File Open icon openfcf.gif at the top left of your iImage window, and the File Open Dialog appears.
  2. Select the desired image file from your directory structure. For example here we will visualize an examples/data file named afrpolitsm.png. Select the file name and click Open.
  3. Figure 11-1: A JPEG File Visualized Using the iImage Tool

    iimage01.gif

    Note
    The examples/data subdirectory of your IDL distribution contains a text file named index.txt. This file lists all data files available in the example directory and also lists their dimensions and values.

Displaying Multiple Images

You can use the window layout dialog to provide for multiple image display within your window. To add another image to the window containing the image you just visualized:

  1. From the iImage window displaying the political map of Africa JPEG image, select Window  Layout.
  2. Figure 11-2: The Window Layout Dialog

    iimage02.gif

    The Window Layout dialog contains these items:

    • Dimensions — Allows you to enter specific window dimensions.
    • Layout — Allows you to pick from a scroll-down list of layout options and grids.
    • Preview — Gives you a visual preview of the selected layout.
    • For more information on working with window layouts, see Window Layouts.

  3. Select a layout, in this case select Gridded and then enter 2 and 1 for Columns and Rows and then OK.
  4. The window now displays a two by two arrangement of views. You will notice the original political map of Africa image is shifted to the top-left view. Select and highlight the top-right view.
  5. Select File → Open or the File Open icon openfcf.gif at the top left of your iImage window, and from the File Open Dialog select the examples/data image named africavlc.png and click Open.
  6. The second image of the African continent now appears in the top-right view.
  7. Figure 11-3: Displaying Multiple Images in iImage

    iimage03.gif