John Louie louie@seismo.unr.edu, 10/28/04
This tutorial will help you convert sequences of images output by Shawn Larsen’s E3D seismic-modeling code to movies that you can play on a computer, like in a Powerpoint presentation.
Click on an image to see the final movie, for 10-sec
waves in the Las Vegas region. There are also 8.8 Mb
QuickTime and 5.7 Mb AVI movies of the Reno
region for 2-sec, 3-component waves.
The commands below should compile the codes on a Sun or MacOS X (use a Terminal window to access Darwin commands):
cc -o argbimage argbimage.c –lm
cc -o convimage convimage.c –lm
cc -o 3compimage 3compimage.c –lm
You can run these codes on a Sun or on MacOS X. I don’t expect they will work without alteration if compiled under Linux on an Intel machine.
In a Shell Tool or Terminal window, cd to the folder where the E3D image files are. Alter the conv.sh script (below) to fit your job. Create subfolders called argb and jpegs with mkdir argb and mkdir jpegs commands.
#!/bin/csh
set
files=( `ls profile.????.z ` )
foreach
afile ( $files )
./convimage <$afile
>./argb/${afile}.argb
echo $afile converted
end
In 2nd line of this script profile is the root name of the image files, sometimes set in the E3D input file. You must change this to the root name of your files. The ???? denotes that all 4-digit image numbers will be accepted, and this script will only translate the z-component images.
I suggest running the script on one component at a time, and carrying through all the subsequent steps for that component. When you are finished with the movie for one component, remove the argb and jpeg files from their respective folders, change the z in the 2nd line to x or y, and run the script for the next component.
In the 4th line, this script runs the convimage program for Intel-binary images. Replace convimage with argbimage if you are translating Sun-binary images. Note that the binary must be present in the folder with the images. Run the script with a csh conv.sh command. Make sure you have sufficient disk space; each argb file will be almost as large as each original image file.
Converting
to JPEGs with GraphicConverterStart and register GraphicConverter. The options I use below are not available on unregistered versions. Select Convert:
In the
dialogue that comes up there are several tasks (at least the settings are
retained between sessions):
Use the top left menu and the left file list to navigate to your new argb folder. Use the top right menu and right file list to navigate to your new jpegs folder.
Set the Dest. Format menu to JPEG/JFIF, then press the Options… button underneath. Set Quality: high and Progressive JPEG 6.0.
Set the Filter menu to RAW. You should see your argb files now. Select the top file in the list on the left, and then shift-select the bottom file in the list. (You did remove all the other old files from other components?) So all the argb files from one component should be selected.
Press the Convert button top center.

In the RAW format dialogue that appears, you enter the width of your image (should be n from the E3D grid input line, and is also reported by convimage and argbimage), set the Offset to 0 bytes, and press Guess. The guessed height should be the same as l or m from the E3D grid line.
Set the format as Color, 32 Bit, ARGB; but uncheck Interlaced.
Set Number Format as Motorola and press OK. For several minutes you will see GraphicConverter grinding through all the argb files in your subfolder.
Start and register Quicktime Player. The options I use are, again, only available to registered customers of the Pro version. Select Open Image Seguence…

In the Open dialogue, navigate to your jpegs folder, select the top file in the list, then shift-select the bottom file.

After you press Open, you will have the opportunity to select the frame rate. At least 10 frames/sec are needed for a movie viewer to perceive smooth motion. By combining this rate with the time dt and image movie setting for the E3D run, you can compute the modeled frames per second or seconds per frame. When the frame rate is set, a Player window will appear and you can try your movie.
E3D movies of map views, where the height is y, will need a top-to-bottom flip to have the right sense of north and south. Quicktime can do the flip for you. In Movie select Get Movie Properties. In that dialogue select Video Track on the left and Size on the right:

Click the Adjust button, click the up-down flip button below, and then click Done, and close the Properties dialogue.
Now save your movie. In the Save dialogue, make sure you check the Make movie self-contained button:

This movie should play in the free Quicktime player on both Windows and Mac, but not UNIX. For more compatibility, use Quicktime Pro’s Export function to save the movie as an AVI file with maximum-quality cinepak compression.