convert2analyze (written by Dr. Ardekani)

The convert2analyze program is used for converting the Picker VHF (formerly SMIS) *.sur image format to the ANALYZE format™. This is necessary for importing SMIS images into programs that only read the ANALYZE format (e.g., SPM). The smis2analyze program runs on the SUN workstations. The procedure for running the program is as follows:

  1. The program writes the converted images in the "current working directory." So you must change directory to where you want to save the outputted ANALYZE images before starting the program. You must make sure that you have enough disk space and write permission in this directory. The program currently does not check for these conditions and its behavior is undefined when these conditions are not satisfied.

  2. To start the program type: convert2analyze.

  3. A file selection window will appear (see Fig. below). In this window, you must select the SMIS (*.sur) images that are to be converted. The program can handle multiple volumes. For example, let's suppose that you have 10 volumes of size 64×64×25. Therefore, you must select 10×25=250 images in the file selection window. The first selected file must be the first slice from volume 1; the second file is the second slice from volume 1 and so on. In this example, the last file is the 25th slice from volume 10. Under the "Selection Policy" menu, you can use the "Extended" option to select a continuous range of files. The "Interval" option allows you to select a range of files by selecting its first and last file.

    File selection window
    File selection window.

  4. After selecting the SMIS images and clicking OK in the file selection window, the Image Dimensions Popup window will appear (see Fig. below). The program will read the matrix and voxel sizes of the SMIS images and display them in this window. These values will be saved in the ANALYZE *.hdr file. You must make sure that these numbers are correct. If not, you should enter the correct numbers in the appropriate fields.

    Image dimensions window
    Image dimensions window.

    The output ANALYZE images will be saved as <stem>00001.img <stem>00002.img ..., where the file prefix (stem) can be specified in the "Output file stem" field of the Image Dimensions Popup window. The "Output file stem" field can be left empty.
    The three check boxes "Reverse X", "Reverse Y", and "Reverse Z" will allow you to reflect your input SMIS images with respect to X, Y and Z axes, respectively, before saving them in ANALYZE format. Most image display programs use the upper left corner of the image as the origin with X-axis pointing to the right, Y-axis pointing down, and Z-axis pointing into the screen. In ANALYZE format, the X-axis must point to the subject left, the Y-axis in the anterior direction, and the Z-axis in the superior direction. You must select the "Reverse X", "Reverse Y", and "Reverse Z" check boxes as necessary, so that your output images will have the ANALYZE format orientation. For example, let' assume that the Y-axis of your image points in the posterior direction (first Fig. below). You must the select "Reverse Y" so that the Y-axis will be pointing to the anterior direction (second Fig. below) as required by the ANALYZE format. Note that in the last figure, the Y-axis points in the anterior direction. Similarly, if the slices in your original SMIS images are arranged from superior to inferior direction (that is, the first slice is from the most superior section), you must check "Reverse Z" in order to correct this in the outputted ANALYZE images.

    Transaxial image 1 Transaxial image 2
    Transaxial MR images.

  5. Click OK to start the conversion process. The number of volumes is determined automatically based on the number of files that you have selected. For example, if you have selected 40 files and there are 18 slices per volume, then the program will define 2 volumes (36 files). The remaining 4 files will be ignored.

Please contact Babak Ardekani for further information about this program.


This page was last updated on 1/16/2002.