McIDAS Learning Guide
Version 2015

[Search Manual] [Table of Contents] [Go to Previous] [Go to Next]


Graphics and the Cursor - Saving and Restoring Graphics and Frames

In this exercise, you will save and restore virtual graphics files, virtual frame files, and GIF files.

Virtual Graphics Files

In these five steps, you will generate a map over a satellite image and save the map as a virtual graphics file with the VIRT keyword. Then you'll erase the image and the graphics, locate the saved virtual graphics file, and restore it with the SHOWVG command.
  1. Show frame 1.
    Type:  SF 1
  2. Generate a map over the image and save it as a virtual graphic assigned to file 9110. You must assign the graphic to a virtual file at the time you run the graphics command.
    Type:  MAP H VIRT=9110
    The VIRT keyword is a global keyword which displays a specified virtual graphic. This keyword only works with commands that generate graphics. The output is written to virtual graphics file VIRT9110 as well as the frame.

  3. List virtual graphic 9110 on your workstation to verify it was saved.
    Type:  DMAP VIRT9110
     DMAP VIRT9110
     PERM      SIZE LAST CHANGED FILENAME DIRECTORY
     ---- --------- ------------ -------- ---------
     -rw-    158992 Oct 26 16:06 VIRT9110 /home/user/mcidas/data 
     158992 bytes in 1 files
    
  4. Erase the image and graphics.
    Type:  ERASE
  5. Restore virtual graphic 9110 to frame 1.
    Type:  SHOWVG 9110 1
    Notice only the graphic was saved not the satellite image.

  6. Erase the graphic on frame 1.
    Type:  ERASE G

Virtual Frame Files

In the next five steps, you will use the SVF command to save a satellite image and map. Then you'll list the virtual frame files on your workstation using the LVF command, and restore a virtual frame file using the RVF command.
  1. Display the first GOES-7 4km Vis image centered on Washington DC, draw a map, and set the loop bounds from 1 to 4.
    Type:  IMGDISP GV4.1 1 STA=DCA;MAP H;LS 1-4
  2. Save the satellite image and map as a virtual frame file named SATMAP.
    Type:  SVF 1 X SATMAP
    Be sure the message "Frames saved in SATMAP.PIX - 1" is displayed in the text window before continuing.

  3. List the virtual frame files on your workstation.
    Type:  LVF
    A list of virtual frame files and corresponding information for each is displayed in the text window as shown below. Notice that virtual frame files are saved with the extension .PIX.
     PERM      SIZE LAST CHANGED FILENAME   DIRECTORY
     ---- --------- ------------ ---------- ---------
     -rw-    311272 Oct 26 10:16 SATMAP.PIX /home/user/mcidas/data 
     311272 bytes in 1 files
  4. List information about the number of frames, frame size, graphics, and image levels for the virtual frame file SATMAP. The frame size and graphic and image levels in the virtual frame file must be the same as the frame where it is being restored.
    Type:  LVF SATMAP FORM=ALL
     PERM      SIZE LAST CHANGED FILENAME   DIRECTORY              
     ---- --------- ------------ ---------- ---------               
     -rw-    311272 Oct 26 10:16 SATMAP.PIX /home/user/mcidas/data
     311272 bytes in 1 files                                       
                                                                   
     file is in new format and contains 1 frame 
     frame  1 is   480  by   640 
     LVF: DONE
    
  5. Show frame 2 and restore the virtual frame file you saved as SATMAP.
    Type:  SF 2;RVF 2 X SATMAP
    Press:  Alt B
    Press:  Alt A
    The image and graphics are displayed in frame 2. Notice that the frame's annotation line is saved with the image and may not match the frame number where the virtual frame file is restored. When you advance through the frames, use the status line to determine which frame is displayed.

GIF files

In the following steps, you will load an area into frame 4, draw a map on it and then save the image as a GIF file.
  1. Display the first GOES-7 4km Vis image centered on Washington DC onto frame 4 and draw a map on the image.
    Type:  IMGDISP GV4.1 4 STA=DCA SF=Y;MAP H
  2. Save frame 4 in GIF format.
    Type:  FRMSAVE 4 PICTURE
    The default for FRMSAVE is to save the frame in the GIF format, but you can also specify the FORM keyword to choose to save it in a PPM, BMP, JPEG, PostScript, or color PostScript format.

  3. List the GIF image PICTURE on your workstation to verify that it was saved and to where it was saved.
    Type:  DMAP PICTURE
    Notice that the file was saved with the extension .GIF

  4. Use your workstation's image viewer (ex: xloadimage, xv, PMJPEG) to display the GIF file from a terminal window.

[Search Manual] [Table of Contents] [Go to Previous] [Go to Next]