The Tcl/Tk GUI for AIR 5.x

Example screen

Here is what the AIR alignment tool looks like. There is also a similar reslice tool.

Why use Tcl/Tk

The programs alignlinear, align_warp, reslice, and reslice_warp form the core of the AIR package. The number of options associated with these programs can make them difficult to use. Consequently, a graphical user interface (GUI) is available using Tcl/Tk. Tcl/Tk is a freely available package for creating window driven front ends to programs on UNIX platforms. You must download, compile, and install Tcl/Tk before you can use the AIR 5.x GUI.

Getting and compiling Tcl/Tk

If you do not already have Tcl/Tk, you can download it at: http://www.scriptics.com.

Modifying the Tcl/Tk AIR scripts to work properly

Once Tcl/Tk and AIR 5.x are installed, you need to modify the scripts align.tcl, align_warp.tcl, reslice.tcl and reslice_warp.tcl in the AIR5.x directory before you can successfully use these scripts. The two critical modifications are:
1. Change the first line of each script to identify the full path name for the shell wish (this is the Tk shell). The current first line:
#!/usr/local/bin/wish4.0
is only acceptable if you have a Tk shell called wish4.0 in the subdirectory /usr/local/bin on your computer.
2. Change the line near the end of the script that identifies the AIR program that the script will execute. Unless AIR is on your normal search path (so that the programs can be invoked from any directory simply by typing the name of the program), you must supply a full path name to the program (alignlinear or reslice). For example, the current line:
set program "alignlinear"
might need to be changed to:
set program "/usr/local/AIR5.1/alignlinear"
if you have placed the AIR executable binary files that you have compiled into the subdirectory /usr/local/AIR5.1/.
Similar changes need to be made to align_warp.tcl, reslice.tcl and reslice_warp.tcl

Configuring the Tcl/Tk AIR scripts

All of the default values and colors in the align.tcl, align_warp.tcl, reslice.tcl and reslice_warp.tcl scripts can be configured to better suite your preferences. Colors are located at the begining of the scripts in lines like:
set color1 #fffccceee
These are RGB colors in the form #RRRGGGBBB with values 0123456789abcdef available.
More importantly, thresholds, etc., are configured near the end of the align.tcl script. Default variables that you might want to change are listed here using the alignlinear flags that correspond:
-t1 threshold1
-t2 threshold2
-b1 xsmooth1 ysmooth1 zsmooth1
-b2 xsmooth2 ysmooth2 zsmooth2
-x costfxn
-m model
-s initial final decrement
-r iterations
-c converge
The program align_warp does not have variables for cost function since only one cost function is implemented.

Modified: July 21, 2002

© 1995-2002 Roger P. Woods, M.D.(rwoods@ucla.edu)