The Tcl/Tk GUI for AIR 3.0

Example screen

Here is what the AIR3.0 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. In AIR 3.0, the number of options associated with these programs makes 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 3.0 GUI.

Getting and compiling Tcl/Tk

If you do not already have Tcl/Tk, you can download it at: http://www.sunlabs.com:80/research/tcl/. Get Tcl 7.4 and Tk 4.0 if you want to use the same versions that the scripts were written for (more recent Tcl 7.x and Tck 4.x releases should also work).

If you are compiling Tk under SunOS 4.1.3, you will hopefully find all the X11 libraries that Tk needs in /usr/openwin/lib on your system. If you don't have all of the X11 libraries, they are available on the internet, but be sure to download the release version that matches your system (don't be tempted by the assertion that the newest X11 release is compatible with 4.1.3).

Modifying the Tcl/Tk AIR scripts to work properly

Once Tcl/Tk and AIR 3.0 are installed, you need to modify the scripts align.tcl, align_warp.tcl, reslice.tcl and reslice_warp.tcl in the AIR3.0 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 3.0 program that the script will execute. Unless AIR 3.0 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"

should be changed to:

set program "/usr/local/AIR3.0/alignlinear"

if you have placed the entire AIR package in the subdirectory /usr/local/.

The corresponding line to change in reslice.tcl is:

set program "reslice"

This line is also near the end of the script.

Configuring the Tcl/Tk AIR scripts


All of the default values and colors in the align.tcl and reslice.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: June 16, 1997

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