NAME animate filename AUTHOR Andy Jacobson UCLA Dept. Pharmacology / Crump Inst. UCLA School of Medicine CHS B2-086 Los Angeles, CA 90024-1721 afj@DrMemory.nuc.ucla.edu DATE: 6-2-94 SUMMARY Name unix command Type data output Inputs integer Outputs none Parameter Name Type Default Min Max command string none begin arg " " integer precision int 4 1 10 Optional end arg string none run/stop boolean stop oneshot oneshot stop DESCRIPTION Often there will be a need to convert a string in AVS to a command or argument in unix to be performed at the command line. This module allows the user to output strings and integers to the command line for execution by the shell in the directory that AVS was run from. The syntax is: {command}_{begin arg}{integer}{end arg} The only required input is the initial command string. Any of the other values may or may not be used as needed. Once a command has been entered, it and any arguments are displayed on the "output command line". The value can not be changed here, it is for display only. Execution occurs with either the oneshot button, or with run/stop highlighted. In run mode, any parameter changes will trigger the module. NOTE: There is a space between the command and the begin arg, but no others. Users may choose to insert spaces as necessary. The command line is up to a max of 512 characters. NOTE: Any commands that produce output to std. out or std. err. will display on the AVS console. Similarly, any commands that produce errors will kill the module. EXAMPLE command: "echo" begin arg: "mydata" integer precision: 4 integer input: <-output from animate integer (set for min=1, max=20, step=10) end arg:".x >> /home/mydir/mydata.list" Result: The file /home/mydir/mydata.list will contain: mydata0001.x mydata0003.x mydata0005.x mydata0007.x mydata0009.x mydata0011.x mydata0013.x mydata0015.x mydata0017.x mydata0019.x APPLICATION This is especially useful for making lists of iterations, filenames, etc. It can also be used to perform operations on files, for example, moving files to a remote system using the rcp command as they are generated. It could be used just as well to run command line driven programs to generate data for reading into avs. Or to record system parameters during an avs batch run. Our use is to cull individual frames from a series of consecutively viewed image files for conversion with a command line driven tool. (This is the reason for the oneshot button, to allow the viewer to grab selected frames while viewing a long series.) Similarly, we use it to automate generation of batch files for deleting unneeded frames of animation, (with the echo command, using rm and the file prefix in the begin arg.) Example NETWORK animate integer | | animate filename | | | read image | | | display image unix command This network can be used for example to copy selected image files from a series to a new location for further processing. Example NETWORK 2 animate integer | | animate filename | | |-----------+ read image | | | | | display image unix command unix command This network can be used for example to rcp selected files to a remote system (without NFS access) and then delete the images to save filespace on the local system. (This requires care in selecting which module gets executed first!)